mirror of
https://github.com/aiclientproxy/proxycast.git
synced 2026-09-24 23:10:56 +08:00
fix: resolve release build type errors
This commit is contained in:
@@ -654,7 +654,7 @@ export function ProfileSettings() {
|
||||
</span>
|
||||
<span className="rounded-full border border-slate-200 bg-slate-50 px-3 py-1.5 text-xs font-medium text-slate-600">
|
||||
{t("settings.profile.hero.tags", {
|
||||
count: tagsCountLabel,
|
||||
count: tags.length,
|
||||
defaultValue: "标签:{{count}}",
|
||||
})}
|
||||
</span>
|
||||
@@ -737,7 +737,7 @@ export function ProfileSettings() {
|
||||
{extraTagCount > 0 && (
|
||||
<span className="rounded-full border border-slate-200 bg-white px-3 py-1.5 text-xs font-medium text-slate-500">
|
||||
{t("settings.profile.avatar.extraTags", {
|
||||
count: extraTagCountLabel,
|
||||
count: extraTagCount,
|
||||
defaultValue: "+{{count}} 个标签",
|
||||
})}
|
||||
</span>
|
||||
@@ -792,7 +792,7 @@ export function ProfileSettings() {
|
||||
</div>
|
||||
<span className="rounded-full border border-slate-200 bg-slate-50 px-3 py-1 text-xs font-medium text-slate-500">
|
||||
{t("settings.profile.basic.itemCount", {
|
||||
count: profileFieldCountLabel,
|
||||
count: profileFields.length,
|
||||
defaultValue: "{{count}} 项",
|
||||
})}
|
||||
</span>
|
||||
@@ -859,7 +859,7 @@ export function ProfileSettings() {
|
||||
</div>
|
||||
<span className="rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-xs font-medium text-emerald-700">
|
||||
{t("settings.profile.tags.selectedCount", {
|
||||
count: tagsCountLabel,
|
||||
count: tags.length,
|
||||
defaultValue: "{{count}} 个已选",
|
||||
})}
|
||||
</span>
|
||||
|
||||
@@ -315,7 +315,7 @@ describe("UserCenterSessionSettings", () => {
|
||||
it("应按当前 locale 格式化会话时间与能力数量", () => {
|
||||
mockUseTranslation.mockImplementationOnce((_namespace?: string) => ({
|
||||
i18n: { language: "en-US" },
|
||||
t: (key: string, options?: unknown) => {
|
||||
t: vi.fn((key: string, options?: unknown) => {
|
||||
if (typeof options === "string") {
|
||||
return options;
|
||||
}
|
||||
@@ -330,7 +330,7 @@ describe("UserCenterSessionSettings", () => {
|
||||
}
|
||||
|
||||
return key;
|
||||
},
|
||||
}),
|
||||
}));
|
||||
mockUseOemCloudAccess.mockReturnValue(
|
||||
createAccessState({
|
||||
|
||||
@@ -53,7 +53,8 @@ const SLASH_COMMAND_I18N_PREFIX = "workspace.document.editor.slashCommand";
|
||||
|
||||
function getWorkspaceTranslator(): WorkspaceTranslator {
|
||||
const instance = i18next.isInitialized ? i18next : initLimeI18n();
|
||||
return (key: string) => String(instance.t(key, { ns: "workspace" }));
|
||||
const t = instance.getFixedT(instance.language, "workspace");
|
||||
return (key: string) => String(t(key as never));
|
||||
}
|
||||
|
||||
function getWorkspaceText(key: string): string {
|
||||
|
||||
@@ -143,8 +143,8 @@ describe("UpdateNotificationPage", () => {
|
||||
let resolveDownload: (() => void) | undefined;
|
||||
mockDownloadUpdate.mockImplementationOnce(
|
||||
() =>
|
||||
new Promise<void>((resolve) => {
|
||||
resolveDownload = resolve;
|
||||
new Promise<undefined>((resolve) => {
|
||||
resolveDownload = () => resolve(undefined);
|
||||
}),
|
||||
);
|
||||
const container = await renderUpdateNotification(
|
||||
|
||||
Reference in New Issue
Block a user