feat(i18n): add Turkish locale
This commit is contained in:
1 parent
232426ced2
commit
79dbda2a8f
26 files changed
+9540
-18
No files matched your search
+1
-1
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
|
|||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
|
|
||||||
const source = readFileSync(new URL("../AiAssistant.vue", import.meta.url), "utf8");
|
const source = readFileSync(new URL("../AiAssistant.vue", import.meta.url), "utf8");
|
||||||
const localePaths = ["en", "es", "it", "ja", "ko", "pt-BR", "zh-CN", "zh-TW"];
|
const localePaths = ["en", "es", "it", "ja", "ko", "pt-BR", "tr", "zh-CN", "zh-TW"];
|
||||||
|
|
||||||
describe("AI assistant write confirmation replacement", () => {
|
describe("AI assistant write confirmation replacement", () => {
|
||||||
it("renders a localized confirmation from the backend's semantic event", () => {
|
it("renders a localized confirmation from the backend's semantic event", () => {
|
||||||
|
|||||||
+4
-4
@@ -104,7 +104,7 @@ describe("EditorSettingsDialog live preview placement", () => {
|
|||||||
it("describes the execute shortcut below the mode selector in every supported locale", () => {
|
it("describes the execute shortcut below the mode selector in every supported locale", () => {
|
||||||
expect(editorSection.indexOf("executeModeDescription")).toBeGreaterThan(editorSection.indexOf("executeModeLabel"));
|
expect(editorSection.indexOf("executeModeDescription")).toBeGreaterThan(editorSection.indexOf("executeModeLabel"));
|
||||||
|
|
||||||
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR"]) {
|
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR", "tr"]) {
|
||||||
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||||
expect(source, locale).toContain("executeModeDescription:");
|
expect(source, locale).toContain("executeModeDescription:");
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,7 @@ describe("EditorSettingsDialog live preview placement", () => {
|
|||||||
expect(editorSection).toContain("{{ completionTriggerModeDescription }}");
|
expect(editorSection).toContain("{{ completionTriggerModeDescription }}");
|
||||||
expect(editorSection).not.toContain('t("settings.completionTriggerModeDescription")');
|
expect(editorSection).not.toContain('t("settings.completionTriggerModeDescription")');
|
||||||
|
|
||||||
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR"]) {
|
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR", "tr"]) {
|
||||||
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||||
for (const key of ["completionTriggerModeManualDescription", "completionTriggerModeRequirePrefixDescription", "completionTriggerModePositionalDescription"]) {
|
for (const key of ["completionTriggerModeManualDescription", "completionTriggerModeRequirePrefixDescription", "completionTriggerModePositionalDescription"]) {
|
||||||
expect(source, `${locale}:${key}`).toContain(`${key}:`);
|
expect(source, `${locale}:${key}`).toContain(`${key}:`);
|
||||||
@@ -174,7 +174,7 @@ describe("EditorSettingsDialog live preview placement", () => {
|
|||||||
expect(dataSection.match(/editDataGridFilterEditorView = '(quick|conditions|text)'/g)).toHaveLength(3);
|
expect(dataSection.match(/editDataGridFilterEditorView = '(quick|conditions|text)'/g)).toHaveLength(3);
|
||||||
expect(dataSection).not.toContain('<SelectTrigger id="data-grid-filter-view"');
|
expect(dataSection).not.toContain('<SelectTrigger id="data-grid-filter-view"');
|
||||||
|
|
||||||
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR"]) {
|
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR", "tr"]) {
|
||||||
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||||
for (const key of ["dataGridFilterViewPreview", "dataGridFilterViewPreviewExpand", "dataGridFilterViewPreviewCollapse"]) {
|
for (const key of ["dataGridFilterViewPreview", "dataGridFilterViewPreviewExpand", "dataGridFilterViewPreviewCollapse"]) {
|
||||||
expect(source, `${locale}:${key}`).toContain(`${key}:`);
|
expect(source, `${locale}:${key}`).toContain(`${key}:`);
|
||||||
@@ -215,7 +215,7 @@ describe("EditorSettingsDialog live preview placement", () => {
|
|||||||
expect(editorPreview.indexOf('t("settings.previewSyntaxErrorHint")')).toBeGreaterThan(preview);
|
expect(editorPreview.indexOf('t("settings.previewSyntaxErrorHint")')).toBeGreaterThan(preview);
|
||||||
});
|
});
|
||||||
|
|
||||||
it.each(["en", "zh-CN", "zh-TW", "es", "pt-BR", "it", "ja", "ko"])("locale %s translates settings.previewSyntaxErrorHint", (locale) => {
|
it.each(["en", "zh-CN", "zh-TW", "es", "pt-BR", "it", "ja", "ko", "tr"])("locale %s translates settings.previewSyntaxErrorHint", (locale) => {
|
||||||
const localeSource = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
const localeSource = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||||
expect(localeSource).toMatch(/previewSyntaxErrorHint: ".+"/);
|
expect(localeSource).toMatch(/previewSyntaxErrorHint: ".+"/);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import "dayjs/locale/it";
|
|||||||
import "dayjs/locale/ja";
|
import "dayjs/locale/ja";
|
||||||
import "dayjs/locale/ko";
|
import "dayjs/locale/ko";
|
||||||
import "dayjs/locale/pt-br";
|
import "dayjs/locale/pt-br";
|
||||||
|
import "dayjs/locale/tr";
|
||||||
import { Copy, FileText, ListChecks, Settings } from "@lucide/vue";
|
import { Copy, FileText, ListChecks, Settings } from "@lucide/vue";
|
||||||
import * as api from "@/lib/backend/api";
|
import * as api from "@/lib/backend/api";
|
||||||
import type { MeilisearchIndexOverview } from "@/lib/backend/tauri";
|
import type { MeilisearchIndexOverview } from "@/lib/backend/tauri";
|
||||||
@@ -29,6 +30,7 @@ const DAYJS_LOCALES: Record<string, string> = {
|
|||||||
it: "it",
|
it: "it",
|
||||||
ja: "ja",
|
ja: "ja",
|
||||||
ko: "ko",
|
ko: "ko",
|
||||||
|
tr: "tr",
|
||||||
};
|
};
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import itLocale from "../locales/it";
|
|||||||
import ja from "../locales/ja";
|
import ja from "../locales/ja";
|
||||||
import ko from "../locales/ko";
|
import ko from "../locales/ko";
|
||||||
import ptBR from "../locales/pt-BR";
|
import ptBR from "../locales/pt-BR";
|
||||||
|
import tr from "../locales/tr";
|
||||||
import zhCN from "../locales/zh-CN";
|
import zhCN from "../locales/zh-CN";
|
||||||
import zhTW from "../locales/zh-TW";
|
import zhTW from "../locales/zh-TW";
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ const locales: Array<[string, Messages]> = [
|
|||||||
["ja", ja],
|
["ja", ja],
|
||||||
["ko", ko],
|
["ko", ko],
|
||||||
["pt-BR", ptBR],
|
["pt-BR", ptBR],
|
||||||
|
["tr", tr],
|
||||||
["zh-CN", zhCN],
|
["zh-CN", zhCN],
|
||||||
["zh-TW", zhTW],
|
["zh-TW", zhTW],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import it from "@/i18n/locales/it";
|
|||||||
import ja from "@/i18n/locales/ja";
|
import ja from "@/i18n/locales/ja";
|
||||||
import ko from "@/i18n/locales/ko";
|
import ko from "@/i18n/locales/ko";
|
||||||
import ptBR from "@/i18n/locales/pt-BR";
|
import ptBR from "@/i18n/locales/pt-BR";
|
||||||
|
import tr from "@/i18n/locales/tr";
|
||||||
import zhCN from "@/i18n/locales/zh-CN";
|
import zhCN from "@/i18n/locales/zh-CN";
|
||||||
import zhTW from "@/i18n/locales/zh-TW";
|
import zhTW from "@/i18n/locales/zh-TW";
|
||||||
import { PHOENIX_DRIVER_NOT_INSTALLED_ERROR, PHOENIX_JDBC_PLUGIN_NOT_INSTALLED_ERROR } from "@/lib/database/phoenixConnection";
|
import { PHOENIX_DRIVER_NOT_INSTALLED_ERROR, PHOENIX_JDBC_PLUGIN_NOT_INSTALLED_ERROR } from "@/lib/database/phoenixConnection";
|
||||||
@@ -20,6 +21,7 @@ const LOCALES = {
|
|||||||
ja,
|
ja,
|
||||||
ko,
|
ko,
|
||||||
"pt-BR": ptBR,
|
"pt-BR": ptBR,
|
||||||
|
tr,
|
||||||
"zh-CN": zhCN,
|
"zh-CN": zhCN,
|
||||||
"zh-TW": zhTW,
|
"zh-TW": zhTW,
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import it from "@/i18n/locales/it";
|
|||||||
import ja from "@/i18n/locales/ja";
|
import ja from "@/i18n/locales/ja";
|
||||||
import ko from "@/i18n/locales/ko";
|
import ko from "@/i18n/locales/ko";
|
||||||
import ptBR from "@/i18n/locales/pt-BR";
|
import ptBR from "@/i18n/locales/pt-BR";
|
||||||
|
import tr from "@/i18n/locales/tr";
|
||||||
import zhCN from "@/i18n/locales/zh-CN";
|
import zhCN from "@/i18n/locales/zh-CN";
|
||||||
import zhTW from "@/i18n/locales/zh-TW";
|
import zhTW from "@/i18n/locales/zh-TW";
|
||||||
|
|
||||||
@@ -23,6 +24,7 @@ describe("cached result messages", () => {
|
|||||||
["Japanese", ja],
|
["Japanese", ja],
|
||||||
["Korean", ko],
|
["Korean", ko],
|
||||||
["Brazilian Portuguese", ptBR],
|
["Brazilian Portuguese", ptBR],
|
||||||
|
["Turkish", tr],
|
||||||
["Simplified Chinese", zhCN],
|
["Simplified Chinese", zhCN],
|
||||||
["Traditional Chinese", zhTW],
|
["Traditional Chinese", zhTW],
|
||||||
])("provides the missing-result actions in %s", (_locale, messages) => {
|
])("provides the missing-result actions in %s", (_locale, messages) => {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import it_ from "../locales/it";
|
|||||||
import ja from "../locales/ja";
|
import ja from "../locales/ja";
|
||||||
import ko from "../locales/ko";
|
import ko from "../locales/ko";
|
||||||
import ptBR from "../locales/pt-BR";
|
import ptBR from "../locales/pt-BR";
|
||||||
|
import tr from "../locales/tr";
|
||||||
import zhCN from "../locales/zh-CN";
|
import zhCN from "../locales/zh-CN";
|
||||||
import zhTW from "../locales/zh-TW";
|
import zhTW from "../locales/zh-TW";
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ const locales: Array<[string, Record<string, unknown>]> = [
|
|||||||
["ja", ja],
|
["ja", ja],
|
||||||
["ko", ko],
|
["ko", ko],
|
||||||
["pt-BR", ptBR],
|
["pt-BR", ptBR],
|
||||||
|
["tr", tr],
|
||||||
["zh-CN", zhCN],
|
["zh-CN", zhCN],
|
||||||
["zh-TW", zhTW],
|
["zh-TW", zhTW],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import itLocale from "@/i18n/locales/it";
|
|||||||
import ja from "@/i18n/locales/ja";
|
import ja from "@/i18n/locales/ja";
|
||||||
import ko from "@/i18n/locales/ko";
|
import ko from "@/i18n/locales/ko";
|
||||||
import ptBR from "@/i18n/locales/pt-BR";
|
import ptBR from "@/i18n/locales/pt-BR";
|
||||||
|
import tr from "@/i18n/locales/tr";
|
||||||
import zhCN from "@/i18n/locales/zh-CN";
|
import zhCN from "@/i18n/locales/zh-CN";
|
||||||
import zhTW from "@/i18n/locales/zh-TW";
|
import zhTW from "@/i18n/locales/zh-TW";
|
||||||
|
|
||||||
@@ -13,7 +14,7 @@ type Messages = {
|
|||||||
contextMenu: typeof en.contextMenu;
|
contextMenu: typeof en.contextMenu;
|
||||||
};
|
};
|
||||||
|
|
||||||
const locales = { es, it: itLocale, ja, ko, "pt-BR": ptBR, "zh-CN": zhCN, "zh-TW": zhTW } as unknown as Record<string, Messages>;
|
const locales = { es, it: itLocale, ja, ko, "pt-BR": ptBR, tr, "zh-CN": zhCN, "zh-TW": zhTW } as unknown as Record<string, Messages>;
|
||||||
|
|
||||||
describe("custom type translations", () => {
|
describe("custom type translations", () => {
|
||||||
it("provides localized labels in every supported non-English locale", () => {
|
it("provides localized labels in every supported non-English locale", () => {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import it_ from "../locales/docs/it";
|
|||||||
import ja from "../locales/docs/ja";
|
import ja from "../locales/docs/ja";
|
||||||
import ko from "../locales/docs/ko";
|
import ko from "../locales/docs/ko";
|
||||||
import ptBR from "../locales/docs/pt-BR";
|
import ptBR from "../locales/docs/pt-BR";
|
||||||
|
import tr from "../locales/docs/tr";
|
||||||
import zhCN from "../locales/docs/zh-CN";
|
import zhCN from "../locales/docs/zh-CN";
|
||||||
import zhTW from "../locales/docs/zh-TW";
|
import zhTW from "../locales/docs/zh-TW";
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ const locales: Array<[string, Record<string, unknown>]> = [
|
|||||||
["ja", ja],
|
["ja", ja],
|
||||||
["ko", ko],
|
["ko", ko],
|
||||||
["pt-BR", ptBR],
|
["pt-BR", ptBR],
|
||||||
|
["tr", tr],
|
||||||
["zh-CN", zhCN],
|
["zh-CN", zhCN],
|
||||||
["zh-TW", zhTW],
|
["zh-TW", zhTW],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import it_ from "../locales/it";
|
|||||||
import ja from "../locales/ja";
|
import ja from "../locales/ja";
|
||||||
import ko from "../locales/ko";
|
import ko from "../locales/ko";
|
||||||
import ptBR from "../locales/pt-BR";
|
import ptBR from "../locales/pt-BR";
|
||||||
|
import tr from "../locales/tr";
|
||||||
import zhCN from "../locales/zh-CN";
|
import zhCN from "../locales/zh-CN";
|
||||||
import zhTW from "../locales/zh-TW";
|
import zhTW from "../locales/zh-TW";
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ const locales: Array<[string, Messages]> = [
|
|||||||
["ja", ja],
|
["ja", ja],
|
||||||
["ko", ko],
|
["ko", ko],
|
||||||
["pt-BR", ptBR],
|
["pt-BR", ptBR],
|
||||||
|
["tr", tr],
|
||||||
["zh-CN", zhCN],
|
["zh-CN", zhCN],
|
||||||
["zh-TW", zhTW],
|
["zh-TW", zhTW],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import it from "@/i18n/locales/it";
|
|||||||
import ja from "@/i18n/locales/ja";
|
import ja from "@/i18n/locales/ja";
|
||||||
import ko from "@/i18n/locales/ko";
|
import ko from "@/i18n/locales/ko";
|
||||||
import ptBR from "@/i18n/locales/pt-BR";
|
import ptBR from "@/i18n/locales/pt-BR";
|
||||||
|
import tr from "@/i18n/locales/tr";
|
||||||
import zhCN from "@/i18n/locales/zh-CN";
|
import zhCN from "@/i18n/locales/zh-CN";
|
||||||
import zhTW from "@/i18n/locales/zh-TW";
|
import zhTW from "@/i18n/locales/zh-TW";
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ describe("SQLite rebuild notice", () => {
|
|||||||
["Japanese", ja],
|
["Japanese", ja],
|
||||||
["Korean", ko],
|
["Korean", ko],
|
||||||
["Brazilian Portuguese", ptBR],
|
["Brazilian Portuguese", ptBR],
|
||||||
|
["Turkish", tr],
|
||||||
["Simplified Chinese", zhCN],
|
["Simplified Chinese", zhCN],
|
||||||
["Traditional Chinese", zhTW],
|
["Traditional Chinese", zhTW],
|
||||||
])("warns about retained backup, forced CAST conversion, lossy values, and rollback in %s", (_locale, messages) => {
|
])("warns about retained backup, forced CAST conversion, lossy values, and rollback in %s", (_locale, messages) => {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import itLocale from "@/i18n/locales/it";
|
|||||||
import ja from "@/i18n/locales/ja";
|
import ja from "@/i18n/locales/ja";
|
||||||
import ko from "@/i18n/locales/ko";
|
import ko from "@/i18n/locales/ko";
|
||||||
import ptBR from "@/i18n/locales/pt-BR";
|
import ptBR from "@/i18n/locales/pt-BR";
|
||||||
|
import tr from "@/i18n/locales/tr";
|
||||||
import zhCN from "@/i18n/locales/zh-CN";
|
import zhCN from "@/i18n/locales/zh-CN";
|
||||||
import zhTW from "@/i18n/locales/zh-TW";
|
import zhTW from "@/i18n/locales/zh-TW";
|
||||||
|
|
||||||
@@ -15,7 +16,7 @@ describe("user administration Host translations", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("provides localized Host-change labels in every non-English locale", () => {
|
it("provides localized Host-change labels in every non-English locale", () => {
|
||||||
const locales = { es, it: itLocale, ja, ko, "pt-BR": ptBR, "zh-CN": zhCN, "zh-TW": zhTW };
|
const locales = { es, it: itLocale, ja, ko, "pt-BR": ptBR, tr, "zh-CN": zhCN, "zh-TW": zhTW };
|
||||||
for (const [locale, messages] of Object.entries(locales)) {
|
for (const [locale, messages] of Object.entries(locales)) {
|
||||||
expect(messages.userAdmin.changeHost, locale).not.toBe(en.userAdmin.changeHost);
|
expect(messages.userAdmin.changeHost, locale).not.toBe(en.userAdmin.changeHost);
|
||||||
expect(messages.userAdmin.newHost, locale).not.toBe(en.userAdmin.newHost);
|
expect(messages.userAdmin.newHost, locale).not.toBe(en.userAdmin.newHost);
|
||||||
|
|||||||
@@ -3,14 +3,14 @@ import en from "./locales/en";
|
|||||||
import { safeLocalStorageGet, safeLocalStorageSet } from "@/lib/backend/safeStorage";
|
import { safeLocalStorageGet, safeLocalStorageSet } from "@/lib/backend/safeStorage";
|
||||||
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
|
import { isTauriRuntime } from "@/lib/backend/tauriRuntime";
|
||||||
|
|
||||||
export type Locale = "en" | "es" | "it" | "ja" | "ko" | "pt-BR" | "zh-CN" | "zh-TW";
|
export type Locale = "en" | "es" | "it" | "ja" | "ko" | "pt-BR" | "tr" | "zh-CN" | "zh-TW";
|
||||||
type LocaleMessages = Record<string, unknown>;
|
type LocaleMessages = Record<string, unknown>;
|
||||||
type I18nGlobal = {
|
type I18nGlobal = {
|
||||||
locale: { value: Locale };
|
locale: { value: Locale };
|
||||||
setLocaleMessage: (locale: Locale, messages: LocaleMessages) => void;
|
setLocaleMessage: (locale: Locale, messages: LocaleMessages) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const supportedLocales: Locale[] = ["en", "es", "it", "ja", "ko", "pt-BR", "zh-CN", "zh-TW"];
|
const supportedLocales: Locale[] = ["en", "es", "it", "ja", "ko", "pt-BR", "tr", "zh-CN", "zh-TW"];
|
||||||
const defaultLocale: Locale = "en";
|
const defaultLocale: Locale = "en";
|
||||||
const loadedLocales = new Set<Locale>([defaultLocale]);
|
const loadedLocales = new Set<Locale>([defaultLocale]);
|
||||||
const localeLoaders: Record<Exclude<Locale, "en">, () => Promise<{ default: LocaleMessages }>> = {
|
const localeLoaders: Record<Exclude<Locale, "en">, () => Promise<{ default: LocaleMessages }>> = {
|
||||||
@@ -19,6 +19,7 @@ const localeLoaders: Record<Exclude<Locale, "en">, () => Promise<{ default: Loca
|
|||||||
ja: () => import("./locales/ja"),
|
ja: () => import("./locales/ja"),
|
||||||
ko: () => import("./locales/ko"),
|
ko: () => import("./locales/ko"),
|
||||||
"pt-BR": () => import("./locales/pt-BR"),
|
"pt-BR": () => import("./locales/pt-BR"),
|
||||||
|
tr: () => import("./locales/tr"),
|
||||||
"zh-CN": () => import("./locales/zh-CN"),
|
"zh-CN": () => import("./locales/zh-CN"),
|
||||||
"zh-TW": () => import("./locales/zh-TW"),
|
"zh-TW": () => import("./locales/zh-TW"),
|
||||||
};
|
};
|
||||||
@@ -45,6 +46,7 @@ export function localeFromLanguageTag(value: string | null | undefined): Locale
|
|||||||
if (normalized === "ja" || normalized.startsWith("ja-")) return "ja";
|
if (normalized === "ja" || normalized.startsWith("ja-")) return "ja";
|
||||||
if (normalized === "ko" || normalized.startsWith("ko-")) return "ko";
|
if (normalized === "ko" || normalized.startsWith("ko-")) return "ko";
|
||||||
if (normalized === "pt" || normalized.startsWith("pt-")) return "pt-BR";
|
if (normalized === "pt" || normalized.startsWith("pt-")) return "pt-BR";
|
||||||
|
if (normalized === "tr" || normalized.startsWith("tr-")) return "tr";
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
export default {
|
||||||
|
title: "Dokümantasyon",
|
||||||
|
groupBySchema: "Şemalar",
|
||||||
|
groupByTableGroup: "Tablo Grupları",
|
||||||
|
noGroup: "(grup yok)",
|
||||||
|
noSchema: "(şema yok)",
|
||||||
|
search: "Tablo, sütun, grup ara…",
|
||||||
|
columns: "Sütunlar",
|
||||||
|
indexes: "Dizinler",
|
||||||
|
references: "Başvurular",
|
||||||
|
referencedBy: "Başvuranlar",
|
||||||
|
localNote: "YEREL",
|
||||||
|
shadowedComment: "Veritabanı açıklaması: {comment}",
|
||||||
|
addNote: "Not ekle",
|
||||||
|
editNote: "Notu düzenle",
|
||||||
|
newGroup: "Yeni grup…",
|
||||||
|
groupName: "Grup adı",
|
||||||
|
groupColour: "Renk",
|
||||||
|
deleteGroup: "Grubu sil",
|
||||||
|
enumValues: "Değerler",
|
||||||
|
usedBy: "Kullananlar",
|
||||||
|
openDiagram: "Şema diyagramını aç",
|
||||||
|
saving: "Kaydediliyor…",
|
||||||
|
saved: "Kaydedildi",
|
||||||
|
saveFailed: "Notlar kaydedilemedi: {error}",
|
||||||
|
overview: "Genel Bakış",
|
||||||
|
groupBy: "Gruplama ölçütü",
|
||||||
|
searchLabel: "Ara",
|
||||||
|
groups: "Gruplar",
|
||||||
|
relationships: "İlişkiler",
|
||||||
|
columnHeader: "Sütun",
|
||||||
|
typeHeader: "Tür",
|
||||||
|
settingsHeader: "Ayarlar",
|
||||||
|
noteHeader: "Not",
|
||||||
|
nameHeader: "Ad",
|
||||||
|
definitionHeader: "Tanım",
|
||||||
|
noOutgoingRelationships: "Bu tablo başka bir tabloya başvurmuyor.",
|
||||||
|
noIncomingRelationships: "Hiçbir tablo buna başvurmuyor.",
|
||||||
|
diagram: "Diyagram",
|
||||||
|
language: "Dil",
|
||||||
|
theme: "Tema",
|
||||||
|
themeLight: "Açık",
|
||||||
|
themeDark: "Koyu",
|
||||||
|
exportHtml: "HTML olarak dışa aktar…",
|
||||||
|
exporting: "Dışa aktarılıyor…",
|
||||||
|
exportFailed: "Dışa aktarılamadı: {error}",
|
||||||
|
warnings: {
|
||||||
|
tableSkipped: {
|
||||||
|
title: "Bir tablo belgelenemedi",
|
||||||
|
detail: "{table} atlandı: {reason}. Bu dokümantasyonda yer almıyor.",
|
||||||
|
},
|
||||||
|
noForeignKeyMetadata: {
|
||||||
|
title: "İlişki bilgisi yok",
|
||||||
|
detail: "{engine} yabancı anahtar meta verisi bildirmediği için ilişki bağlantıları türetilemedi. Diyagram, bu motor için eksiksizdir.",
|
||||||
|
},
|
||||||
|
commentsUnsupported: {
|
||||||
|
title: "Veritabanı açıklamaları kullanılamıyor",
|
||||||
|
detail: "{engine} tablo veya sütun açıklamalarını desteklemiyor, bu yüzden buradaki her açıklama bu projenin kendi notlarından gelir.",
|
||||||
|
},
|
||||||
|
orphanedNotes: {
|
||||||
|
title: "Bazı notlar artık hiçbir şeyle eşleşmiyor",
|
||||||
|
detail: "{count} not, artık var olmayan bir tabloya veya sütuna başvuruyor. Hiçbir şey silinmedi — notlar dosyasında yeniden eşleyin ya da kaldırın.",
|
||||||
|
},
|
||||||
|
dbmlOmitted: {
|
||||||
|
title: "DBML'de gösterilemiyor",
|
||||||
|
detail: "{table} üzerindeki {item} burada belgeleniyor ancak dışa aktarılan DBML'de yer almıyor: {reason}.",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -385,6 +385,34 @@ export const meilisearchManagementMessages = {
|
|||||||
deleteTaskHistory: "Excluir histórico",
|
deleteTaskHistory: "Excluir histórico",
|
||||||
readOnlyDisabled: "As ações ficam desativadas em conexões somente leitura.",
|
readOnlyDisabled: "As ações ficam desativadas em conexões somente leitura.",
|
||||||
},
|
},
|
||||||
|
tr: {
|
||||||
|
...en,
|
||||||
|
systemManagement: "Sistem yönetimi",
|
||||||
|
overview: "Genel bakış",
|
||||||
|
apiKeys: "API Anahtarları",
|
||||||
|
tasks: "Görevler",
|
||||||
|
health: "Sağlık",
|
||||||
|
version: "Sürüm",
|
||||||
|
indexCount: "Dizinler",
|
||||||
|
totalDocuments: "Toplam belge",
|
||||||
|
keyCount: "Anahtarlar",
|
||||||
|
refresh: "Yenile",
|
||||||
|
rowActions: "İşlemler",
|
||||||
|
previous: "Önceki",
|
||||||
|
next: "Sonraki",
|
||||||
|
createKey: "Anahtar oluştur",
|
||||||
|
editKey: "Anahtarı düzenle",
|
||||||
|
deleteKey: "Anahtarı sil",
|
||||||
|
noKeys: "API anahtarı yok",
|
||||||
|
filters: "Filtreler",
|
||||||
|
applyFilters: "Filtreleri uygula",
|
||||||
|
receivedDocuments: "Alınan belgeler",
|
||||||
|
indexedDocuments: "Dizinlenen belgeler",
|
||||||
|
noTasks: "Görev yok",
|
||||||
|
cancelTask: "Görevi iptal et",
|
||||||
|
deleteTaskHistory: "Geçmişi sil",
|
||||||
|
readOnlyDisabled: "Salt okunur bağlantılarda işlemler devre dışıdır.",
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const meilisearchManagementEn = meilisearchManagementMessages.en;
|
export const meilisearchManagementEn = meilisearchManagementMessages.en;
|
||||||
@@ -395,3 +423,4 @@ export const meilisearchManagementKo = meilisearchManagementMessages.ko;
|
|||||||
export const meilisearchManagementEs = meilisearchManagementMessages.es;
|
export const meilisearchManagementEs = meilisearchManagementMessages.es;
|
||||||
export const meilisearchManagementIt = meilisearchManagementMessages.it;
|
export const meilisearchManagementIt = meilisearchManagementMessages.it;
|
||||||
export const meilisearchManagementPtBR = meilisearchManagementMessages["pt-BR"];
|
export const meilisearchManagementPtBR = meilisearchManagementMessages["pt-BR"];
|
||||||
|
export const meilisearchManagementTr = meilisearchManagementMessages.tr;
|
||||||
File diff suppressed because it is too large.
Load diff
+1
-1
@@ -4,7 +4,7 @@ import { describe, expect, it } from "vitest";
|
|||||||
const dialogSource = readFileSync(new URL("../../../components/connection/ConnectionDialog.vue", import.meta.url), "utf8");
|
const dialogSource = readFileSync(new URL("../../../components/connection/ConnectionDialog.vue", import.meta.url), "utf8");
|
||||||
const enSource = readFileSync(new URL("../../../i18n/locales/en.ts", import.meta.url), "utf8");
|
const enSource = readFileSync(new URL("../../../i18n/locales/en.ts", import.meta.url), "utf8");
|
||||||
const zhCnSource = readFileSync(new URL("../../../i18n/locales/zh-CN.ts", import.meta.url), "utf8");
|
const zhCnSource = readFileSync(new URL("../../../i18n/locales/zh-CN.ts", import.meta.url), "utf8");
|
||||||
const fallbackLocaleSources = ["es", "it", "ja", "ko", "pt-BR", "zh-TW"].map((locale) => readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8"));
|
const fallbackLocaleSources = ["es", "it", "ja", "ko", "pt-BR", "tr", "zh-TW"].map((locale) => readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8"));
|
||||||
|
|
||||||
describe("ZooKeeper connection dialog", () => {
|
describe("ZooKeeper connection dialog", () => {
|
||||||
it("binds the existing Select component to the ZooKeeper auth_scheme helper", () => {
|
it("binds the existing Select component to the ZooKeeper auth_scheme helper", () => {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export const LOCALE_OPTIONS: { value: Locale; flag: string; label: string }[] =
|
|||||||
{ value: "ja", flag: "🇯🇵", label: "日本語" },
|
{ value: "ja", flag: "🇯🇵", label: "日本語" },
|
||||||
{ value: "ko", flag: "🇰🇷", label: "한국어" },
|
{ value: "ko", flag: "🇰🇷", label: "한국어" },
|
||||||
{ value: "pt-BR", flag: "🇧🇷", label: "Português" },
|
{ value: "pt-BR", flag: "🇧🇷", label: "Português" },
|
||||||
|
{ value: "tr", flag: "🇹🇷", label: "Türkçe" },
|
||||||
{ value: "zh-CN", flag: "🇨🇳", label: "简体中文" },
|
{ value: "zh-CN", flag: "🇨🇳", label: "简体中文" },
|
||||||
{ value: "zh-TW", flag: "繁", label: "繁體中文" },
|
{ value: "zh-TW", flag: "繁", label: "繁體中文" },
|
||||||
];
|
];
|
||||||
@@ -101,7 +101,7 @@ describe("settings search", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("defines the WebDAV Web-runtime notice in every supported locale", () => {
|
it("defines the WebDAV Web-runtime notice in every supported locale", () => {
|
||||||
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR"]) {
|
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR", "tr"]) {
|
||||||
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||||
expect(source, locale).toContain("syncWebDavWebDescription:");
|
expect(source, locale).toContain("syncWebDavWebDescription:");
|
||||||
}
|
}
|
||||||
@@ -212,7 +212,7 @@ describe("settings search", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("defines the performance section title in every supported locale", () => {
|
it("defines the performance section title in every supported locale", () => {
|
||||||
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR"]) {
|
for (const locale of ["zh-CN", "zh-TW", "en", "es", "it", "ja", "ko", "pt-BR", "tr"]) {
|
||||||
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
const source = readFileSync(new URL(`../../../i18n/locales/${locale}.ts`, import.meta.url), "utf8");
|
||||||
expect(source, locale).toContain("performanceSection:");
|
expect(source, locale).toContain("performanceSection:");
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+1
-1
@@ -61,4 +61,4 @@ ${this.parser.parse(e)}</blockquote>
|
|||||||
${e}</tr>
|
${e}</tr>
|
||||||
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
||||||
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ec(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=tc(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+ec(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=tc(e);if(i===null)return ec(n);e=i;let a=`<img src="${e}" alt="${ec(n)}"`;return t&&(a+=` title="${ec(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:ec(e.text)}},fc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},pc=class e{options;renderer;textRenderer;constructor(e){this.options=e||Ho,this.options.renderer=this.options.renderer||new dc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},mc=class{options;block;constructor(e){this.options=e||Ho}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?uc.lex:uc.lexInline}provideParser(e=this.block){return e?pc.parse:pc.parseInline}},hc=class{defaults=Vo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=pc;Renderer=dc;TextRenderer=fc;Lexer=uc;Tokenizer=lc;Hooks=mc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.levelLine truncated
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${ec(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=tc(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+ec(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=tc(e);if(i===null)return ec(n);e=i;let a=`<img src="${e}" alt="${ec(n)}"`;return t&&(a+=` title="${ec(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:ec(e.text)}},fc=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},pc=class e{options;renderer;textRenderer;constructor(e){this.options=e||Ho,this.options.renderer=this.options.renderer||new dc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new fc}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},mc=class{options;block;constructor(e){this.options=e||Ho}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?uc.lex:uc.lexInline}provideParser(e=this.block){return e?pc.parse:pc.parseInline}},hc=class{defaults=Vo();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=pc;Renderer=dc;TextRenderer=fc;Lexer=uc;Tokenizer=lc;Hooks=mc;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.levelLine truncated
|
||||||
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+ec(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},gc=new hc;function $(e,t){return gc.parse(e,t)}$.options=$.setOptions=function(e){return gc.setOptions(e),$.defaults=gc.defaults,Uo($.defaults),$},$.getDefaults=Vo,$.defaults=Ho,$.use=function(...e){return gc.use(...e),$.defaults=gc.defaults,Uo($.defaults),$},$.walkTokens=function(e,t){return gc.walkTokens(e,t)},$.parseInline=gc.parseInline,$.Parser=pc,$.parser=pc.parse,$.Renderer=dc,$.TextRenderer=fc,$.Lexer=uc,$.lexer=uc.lex,$.Tokenizer=lc,$.Hooks=mc,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,pc.parse,uc.lex;function _c(e){return String(e??``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}var vc=/^(https?:|mailto:)/i;function yc(e){let t=String(e??``).trim();return t===``||/^[/\\]{2}/.test(t)?null:t.startsWith(`#`)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||vc.test(t)?t:null}var bc=new hc({renderer:{html({text:e}){return _c(e)},link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=yc(e);if(i===null)return r;let a=t?` title="${_c(t)}"`:``;return`<a href="${_c(i)}"${a}>${r}</a>`},image({href:e,title:t,text:n}){let r=yc(e);if(r===null)return _c(n);let i=t?` title="${_c(t)}"`:``;return`<img src="${_c(r)}" alt="${_c(n)}"${i}>`}}});function xc(e){return e===null||e.trim()===``?``:bc.parse(e)}var Sc={class:`text-sm text-muted-foreground`},Cc=[`title`,`innerHTML`],wc=L({__name:`NoteEditor`,props:{modelValue:{},readonly:{type:Boolean},translate:{type:Function}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=P(!1),a=P(``),o=P(null);async function s(){n.readonly||(a.value=n.modelValue,i.value=!0,await hn(),o.value?.focus())}function c(){i.value=!1,a.value!==n.modelValue&&r(`update:modelValue`,a.value)}function l(){a.value=n.modelValue,i.value=!1}return(t,n)=>(U(),W(`div`,Sc,[i.value?On((U(),W(`textarea`,{key:0,ref_key:`input`,ref:o,"onUpdate:modelValue":n[0]||=e=>a.value=e,rows:`4`,class:`w-full resize-y rounded border border-border bg-background p-2 font-mono text-xs text-foreground outline-none focus:border-ring`,onBlur:n[1]||=e=>c(),onKeydown:n[2]||=lo(e=>l(),[`escape`])},null,544)),[[to,a.value]]):e.modelValue.trim()===``?e.readonly?q(``,!0):(U(),W(`button`,{key:2,type:`button`,class:`rounded border border-dashed border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/40`,onClick:n[4]||=e=>s()},O(e.translate(`docs.addNote`)),1)):(U(),W(`div`,{key:1,class:D([`leading-relaxed`,e.readonly?``:`cursor-text rounded transition-colors hover:bg-muted/30`]),title:e.readonly?void 0:e.translate(`docs.editNote`),onClick:n[3]||=e=>s(),innerHTML:F(xc)(e.modelValue)},null,10,Cc))]))}}),Tc={class:`flex flex-col gap-5`},Ec={class:`flex flex-col gap-2`},Dc={class:`flex flex-wrap items-center gap-2`},Oc={class:`font-mono text-lg font-semibold text-foreground`},kc={key:0,class:`rounded bg-muted/50 px-1.5 py-0.5 text-[10px] uppercase text-muted-foreground`},Ac={class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},jc={class:`flex flex-wrap gap-1`},Mc={class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},Nc={key:0,class:`text-xs text-muted-foreground`},Pc={key:1,class:`flex flex-col gap-1`},Fc=[`onClick`],Ic=L({__name:`EnumPage`,props:{enumType:{},snapshot:{},translate:{type:Function}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=Y(()=>n.enumType.schema?`${n.enumType.schema}.${n.enumType.name}`:n.enumType.name),a=Y(()=>Bo(n.snapshot,n.enumType.name));return(t,n)=>(U(),W(`article`,Tc,[G(`header`,Ec,[G(`div`,Dc,[G(`h2`,Oc,O(i.value),1),e.enumType.synthesized?(U(),W(`span`,kc,`synthesized`)):q(``,!0)]),K(wc,{"model-value":e.enumType.note??``,readonly:``,translate:e.translate},null,8,[`model-value`,`translate`])]),G(`section`,null,[G(`h3`,Ac,O(e.translate(`docs.enumValues`)),1),G(`ul`,jc,[(U(!0),W(V,null,R(e.enumType.values,e=>(U(),W(`li`,{key:e,class:`rounded bg-muted/50 px-1.5 py-0.5 font-mono text-[11px] text-foreground`},O(e),1))),128))])]),G(`section`,null,[G(`h3`,Mc,O(e.translate(`docs.usedBy`)),1),a.value.length===0?(U(),W(`p`,Nc,`No column uses this enum.`)):(U(),W(`ul`,Pc,[(U(!0),W(V,null,R(a.value,e=>(U(),W(`li`,{key:`${e.tableKey}.${e.column}`,class:`text-xs`},[G(`button`,{type:`button`,class:`w-full rounded border border-border bg-background px-2 py-1.5 text-left font-mono transition-colors hover:bg-muted/40`,onClick:t=>r(`select`,e.tableKey)},O(e.tableKey)+`.`+O(e.column),9,Fc)]))),128))]))])]))}}),Lc={class:`flex flex-col gap-3`},Rc={class:`flex flex-col gap-1`},zc={class:`text-[10px] uppercase tracking-wide text-muted-foreground`},Bc=[`value`,`placeholder`],Vc={class:`flex flex-col gap-2`},Hc={class:`text-[10px] uppercase tracking-wide text-muted-foreground`},Uc={class:`flex items-center gap-1.5`},Wc=[`t
Line truncated
|
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+ec(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},gc=new hc;function $(e,t){return gc.parse(e,t)}$.options=$.setOptions=function(e){return gc.setOptions(e),$.defaults=gc.defaults,Uo($.defaults),$},$.getDefaults=Vo,$.defaults=Ho,$.use=function(...e){return gc.use(...e),$.defaults=gc.defaults,Uo($.defaults),$},$.walkTokens=function(e,t){return gc.walkTokens(e,t)},$.parseInline=gc.parseInline,$.Parser=pc,$.parser=pc.parse,$.Renderer=dc,$.TextRenderer=fc,$.Lexer=uc,$.lexer=uc.lex,$.Tokenizer=lc,$.Hooks=mc,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,pc.parse,uc.lex;function _c(e){return String(e??``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}var vc=/^(https?:|mailto:)/i;function yc(e){let t=String(e??``).trim();return t===``||/^[/\\]{2}/.test(t)?null:t.startsWith(`#`)||t.startsWith(`/`)||t.startsWith(`./`)||t.startsWith(`../`)||vc.test(t)?t:null}var bc=new hc({renderer:{html({text:e}){return _c(e)},link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=yc(e);if(i===null)return r;let a=t?` title="${_c(t)}"`:``;return`<a href="${_c(i)}"${a}>${r}</a>`},image({href:e,title:t,text:n}){let r=yc(e);if(r===null)return _c(n);let i=t?` title="${_c(t)}"`:``;return`<img src="${_c(r)}" alt="${_c(n)}"${i}>`}}});function xc(e){return e===null||e.trim()===``?``:bc.parse(e)}var Sc={class:`text-sm text-muted-foreground`},Cc=[`title`,`innerHTML`],wc=L({__name:`NoteEditor`,props:{modelValue:{},readonly:{type:Boolean},translate:{type:Function}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=P(!1),a=P(``),o=P(null);async function s(){n.readonly||(a.value=n.modelValue,i.value=!0,await hn(),o.value?.focus())}function c(){i.value=!1,a.value!==n.modelValue&&r(`update:modelValue`,a.value)}function l(){a.value=n.modelValue,i.value=!1}return(t,n)=>(U(),W(`div`,Sc,[i.value?On((U(),W(`textarea`,{key:0,ref_key:`input`,ref:o,"onUpdate:modelValue":n[0]||=e=>a.value=e,rows:`4`,class:`w-full resize-y rounded border border-border bg-background p-2 font-mono text-xs text-foreground outline-none focus:border-ring`,onBlur:n[1]||=e=>c(),onKeydown:n[2]||=lo(e=>l(),[`escape`])},null,544)),[[to,a.value]]):e.modelValue.trim()===``?e.readonly?q(``,!0):(U(),W(`button`,{key:2,type:`button`,class:`rounded border border-dashed border-border px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/40`,onClick:n[4]||=e=>s()},O(e.translate(`docs.addNote`)),1)):(U(),W(`div`,{key:1,class:D([`leading-relaxed`,e.readonly?``:`cursor-text rounded transition-colors hover:bg-muted/30`]),title:e.readonly?void 0:e.translate(`docs.editNote`),onClick:n[3]||=e=>s(),innerHTML:F(xc)(e.modelValue)},null,10,Cc))]))}}),Tc={class:`flex flex-col gap-5`},Ec={class:`flex flex-col gap-2`},Dc={class:`flex flex-wrap items-center gap-2`},Oc={class:`font-mono text-lg font-semibold text-foreground`},kc={key:0,class:`rounded bg-muted/50 px-1.5 py-0.5 text-[10px] uppercase text-muted-foreground`},Ac={class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},jc={class:`flex flex-wrap gap-1`},Mc={class:`mb-1.5 text-xs font-semibold uppercase tracking-wide text-muted-foreground`},Nc={key:0,class:`text-xs text-muted-foreground`},Pc={key:1,class:`flex flex-col gap-1`},Fc=[`onClick`],Ic=L({__name:`EnumPage`,props:{enumType:{},snapshot:{},translate:{type:Function}},emits:[`select`],setup(e,{emit:t}){let n=e,r=t,i=Y(()=>n.enumType.schema?`${n.enumType.schema}.${n.enumType.name}`:n.enumType.name),a=Y(()=>Bo(n.snapshot,n.enumType.name));return(t,n)=>(U(),W(`article`,Tc,[G(`header`,Ec,[G(`div`,Dc,[G(`h2`,Oc,O(i.value),1),e.enumType.synthesized?(U(),W(`span`,kc,`synthesized`)):q(``,!0)]),K(wc,{"model-value":e.enumType.note??``,readonly:``,translate:e.translate},null,8,[`model-value`,`translate`])]),G(`section`,null,[G(`h3`,Ac,O(e.translate(`docs.enumValues`)),1),G(`ul`,jc,[(U(!0),W(V,null,R(e.enumType.values,e=>(U(),W(`li`,{key:e,class:`rounded bg-muted/50 px-1.5 py-0.5 font-mono text-[11px] text-foreground`},O(e),1))),128))])]),G(`section`,null,[G(`h3`,Mc,O(e.translate(`docs.usedBy`)),1),a.value.length===0?(U(),W(`p`,Nc,`No column uses this enum.`)):(U(),W(`ul`,Pc,[(U(!0),W(V,null,R(a.value,e=>(U(),W(`li`,{key:`${e.tableKey}.${e.column}`,class:`text-xs`},[G(`button`,{type:`button`,class:`w-full rounded border border-border bg-background px-2 py-1.5 text-left font-mono transition-colors hover:bg-muted/40`,onClick:t=>r(`select`,e.tableKey)},O(e.tableKey)+`.`+O(e.column),9,Fc)]))),128))]))])]))}}),Lc={class:`flex flex-col gap-3`},Rc={class:`flex flex-col gap-1`},zc={class:`text-[10px] uppercase tracking-wide text-muted-foreground`},Bc=[`value`,`placeholder`],Vc={class:`flex flex-col gap-2`},Hc={class:`text-[10px] uppercase tracking-wide text-muted-foreground`},Uc={class:`flex items-center gap-1.5`},Wc=[`t
Line truncated
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
"apps/desktop/src/i18n/locales/docs/pt-BR.ts": "f92c0b95b1b807c60a5136677808ed5014d9061dffd970aa5866eb1c82300dc5",
|
"apps/desktop/src/i18n/locales/docs/pt-BR.ts": "f92c0b95b1b807c60a5136677808ed5014d9061dffd970aa5866eb1c82300dc5",
|
||||||
"apps/desktop/src/i18n/locales/docs/zh-CN.ts": "2092c39277f2a6774405124d1f167bbcbc5f633d8f82bbd2b28ff5e12d78f3f7",
|
"apps/desktop/src/i18n/locales/docs/zh-CN.ts": "2092c39277f2a6774405124d1f167bbcbc5f633d8f82bbd2b28ff5e12d78f3f7",
|
||||||
"apps/desktop/src/i18n/locales/docs/zh-TW.ts": "691cf502248dbd09358c6c276990945013b26c52fb682bcd56b26f378daea29c",
|
"apps/desktop/src/i18n/locales/docs/zh-TW.ts": "691cf502248dbd09358c6c276990945013b26c52fb682bcd56b26f378daea29c",
|
||||||
"apps/desktop/src/lib/app/localeOptions.ts": "c269b1ca1d5c71dc27dd2ab5422a902c848722acabf0dbd205275624fc9482e6",
|
"apps/desktop/src/lib/app/localeOptions.ts": "1149b12ccbcf012794bc2384636a54d3629fdb8f897924d58e0bce962d0a80b9",
|
||||||
"apps/desktop/src/lib/diagram/erDiagram.ts": "1b9522b41cd2ee15ef04dc11e0f855459287fca2d5e0f551263dfc6f8de5764e",
|
"apps/desktop/src/lib/diagram/erDiagram.ts": "1b9522b41cd2ee15ef04dc11e0f855459287fca2d5e0f551263dfc6f8de5764e",
|
||||||
"apps/desktop/src/styles/tokens.css": "b8852ce50865ad98ebc992971f7a06670c5d830ca82efcee956f8d3eb7c2e9a3",
|
"apps/desktop/src/styles/tokens.css": "b8852ce50865ad98ebc992971f7a06670c5d830ca82efcee956f8d3eb7c2e9a3",
|
||||||
"apps/desktop/tsconfig.json": "5ad521941835ad8529e9b81ba79c11650e5f020f0e376b7a9f17e22a9306fa76",
|
"apps/desktop/tsconfig.json": "5ad521941835ad8529e9b81ba79c11650e5f020f0e376b7a9f17e22a9306fa76",
|
||||||
|
|||||||
+2
-1
@@ -7,6 +7,7 @@ import es from "../../apps/desktop/src/i18n/locales/es";
|
|||||||
import it from "../../apps/desktop/src/i18n/locales/it";
|
import it from "../../apps/desktop/src/i18n/locales/it";
|
||||||
import ja from "../../apps/desktop/src/i18n/locales/ja";
|
import ja from "../../apps/desktop/src/i18n/locales/ja";
|
||||||
import ko from "../../apps/desktop/src/i18n/locales/ko";
|
import ko from "../../apps/desktop/src/i18n/locales/ko";
|
||||||
|
import tr from "../../apps/desktop/src/i18n/locales/tr";
|
||||||
import ptBR from "../../apps/desktop/src/i18n/locales/pt-BR";
|
import ptBR from "../../apps/desktop/src/i18n/locales/pt-BR";
|
||||||
import zhCN from "../../apps/desktop/src/i18n/locales/zh-CN";
|
import zhCN from "../../apps/desktop/src/i18n/locales/zh-CN";
|
||||||
import zhTW from "../../apps/desktop/src/i18n/locales/zh-TW";
|
import zhTW from "../../apps/desktop/src/i18n/locales/zh-TW";
|
||||||
@@ -77,7 +78,7 @@ test("Claude Code CLI errors are localized while retaining their stable code and
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("every current locale defines all AI CLI diagnostic messages", () => {
|
test("every current locale defines all AI CLI diagnostic messages", () => {
|
||||||
const locales = { en, es, it, ja, ko, ptBR, zhCN, zhTW } as const;
|
const locales = { en, es, it, ja, ko, ptBR, tr, zhCN, zhTW } as const;
|
||||||
|
|
||||||
for (const [localeName, locale] of Object.entries(locales)) {
|
for (const [localeName, locale] of Object.entries(locales)) {
|
||||||
assert.equal(typeof locale.ai.requestFailed, "string", `${localeName}.ai.requestFailed`);
|
assert.equal(typeof locale.ai.requestFailed, "string", `${localeName}.ai.requestFailed`);
|
||||||
|
|||||||
+2
-1
@@ -5,12 +5,13 @@ import es from "../../apps/desktop/src/i18n/locales/es.ts";
|
|||||||
import it from "../../apps/desktop/src/i18n/locales/it.ts";
|
import it from "../../apps/desktop/src/i18n/locales/it.ts";
|
||||||
import ja from "../../apps/desktop/src/i18n/locales/ja.ts";
|
import ja from "../../apps/desktop/src/i18n/locales/ja.ts";
|
||||||
import ko from "../../apps/desktop/src/i18n/locales/ko.ts";
|
import ko from "../../apps/desktop/src/i18n/locales/ko.ts";
|
||||||
|
import tr from "../../apps/desktop/src/i18n/locales/tr.ts";
|
||||||
import ptBR from "../../apps/desktop/src/i18n/locales/pt-BR.ts";
|
import ptBR from "../../apps/desktop/src/i18n/locales/pt-BR.ts";
|
||||||
import zhCN from "../../apps/desktop/src/i18n/locales/zh-CN.ts";
|
import zhCN from "../../apps/desktop/src/i18n/locales/zh-CN.ts";
|
||||||
import zhTW from "../../apps/desktop/src/i18n/locales/zh-TW.ts";
|
import zhTW from "../../apps/desktop/src/i18n/locales/zh-TW.ts";
|
||||||
|
|
||||||
test("every locale defines the PostgreSQL legacy TLS labels", () => {
|
test("every locale defines the PostgreSQL legacy TLS labels", () => {
|
||||||
const locales = { en, es, it, ja, ko, ptBR, zhCN, zhTW } as const;
|
const locales = { en, es, it, ja, ko, ptBR, tr, zhCN, zhTW } as const;
|
||||||
|
|
||||||
for (const [localeName, locale] of Object.entries(locales)) {
|
for (const [localeName, locale] of Object.entries(locales)) {
|
||||||
assert.ok(locale.connection.postgresLegacyTls.length > 0, `${localeName}: connection.postgresLegacyTls`);
|
assert.ok(locale.connection.postgresLegacyTls.length > 0, `${localeName}: connection.postgresLegacyTls`);
|
||||||
|
|||||||
+2
-1
@@ -7,6 +7,7 @@ import es from "../../apps/desktop/src/i18n/locales/es.ts";
|
|||||||
import it from "../../apps/desktop/src/i18n/locales/it.ts";
|
import it from "../../apps/desktop/src/i18n/locales/it.ts";
|
||||||
import ja from "../../apps/desktop/src/i18n/locales/ja.ts";
|
import ja from "../../apps/desktop/src/i18n/locales/ja.ts";
|
||||||
import ko from "../../apps/desktop/src/i18n/locales/ko.ts";
|
import ko from "../../apps/desktop/src/i18n/locales/ko.ts";
|
||||||
|
import tr from "../../apps/desktop/src/i18n/locales/tr.ts";
|
||||||
import ptBR from "../../apps/desktop/src/i18n/locales/pt-BR.ts";
|
import ptBR from "../../apps/desktop/src/i18n/locales/pt-BR.ts";
|
||||||
import zhCN from "../../apps/desktop/src/i18n/locales/zh-CN.ts";
|
import zhCN from "../../apps/desktop/src/i18n/locales/zh-CN.ts";
|
||||||
import zhTW from "../../apps/desktop/src/i18n/locales/zh-TW.ts";
|
import zhTW from "../../apps/desktop/src/i18n/locales/zh-TW.ts";
|
||||||
@@ -80,7 +81,7 @@ test("ContentArea wires server messages into the switcher and the messages view"
|
|||||||
});
|
});
|
||||||
|
|
||||||
test("every locale defines the query message strings", () => {
|
test("every locale defines the query message strings", () => {
|
||||||
const locales = { en, es, it, ja, ko, "pt-BR": ptBR, "zh-CN": zhCN, "zh-TW": zhTW };
|
const locales = { en, es, it, ja, ko, "pt-BR": ptBR, tr, "zh-CN": zhCN, "zh-TW": zhTW };
|
||||||
|
|
||||||
for (const [name, locale] of Object.entries(locales)) {
|
for (const [name, locale] of Object.entries(locales)) {
|
||||||
assert.ok(locale.queryMessages.empty.length > 0, `${name}: queryMessages.empty`);
|
assert.ok(locale.queryMessages.empty.length > 0, `${name}: queryMessages.empty`);
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ const runtimeHost = readFileSync("apps/desktop/src/components/sidebar/SidebarTre
|
|||||||
const connectionMutationRuntime = readFileSync("apps/desktop/src/composables/useSidebarConnectionMutationRuntime.ts", "utf8");
|
const connectionMutationRuntime = readFileSync("apps/desktop/src/composables/useSidebarConnectionMutationRuntime.ts", "utf8");
|
||||||
const databaseSpecificMutationRuntime = readFileSync("apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts", "utf8");
|
const databaseSpecificMutationRuntime = readFileSync("apps/desktop/src/composables/useSidebarDatabaseSpecificMutationRuntime.ts", "utf8");
|
||||||
const tableMutationRuntime = readFileSync("apps/desktop/src/composables/useSidebarTableMutationRuntime.ts", "utf8");
|
const tableMutationRuntime = readFileSync("apps/desktop/src/composables/useSidebarTableMutationRuntime.ts", "utf8");
|
||||||
const localeSources = Object.fromEntries(["en", "es", "it", "ja", "ko", "pt-BR", "zh-CN", "zh-TW"].map((locale) => [locale, readFileSync(`apps/desktop/src/i18n/locales/${locale}.ts`, "utf8")]));
|
const localeSources = Object.fromEntries(["en", "es", "it", "ja", "ko", "pt-BR", "tr", "zh-CN", "zh-TW"].map((locale) => [locale, readFileSync(`apps/desktop/src/i18n/locales/${locale}.ts`, "utf8")]));
|
||||||
|
|
||||||
function functionBody(name: string): string {
|
function functionBody(name: string): string {
|
||||||
const source = [runtimeHost, connectionMutationRuntime, databaseSpecificMutationRuntime, tableMutationRuntime].find((candidate) => candidate.includes(`function ${name}(`));
|
const source = [runtimeHost, connectionMutationRuntime, databaseSpecificMutationRuntime, tableMutationRuntime].find((candidate) => candidate.includes(`function ${name}(`));
|
||||||
|
|||||||
@@ -729,6 +729,7 @@ enum LocaleFamily {
|
|||||||
Spanish,
|
Spanish,
|
||||||
Italian,
|
Italian,
|
||||||
Portuguese,
|
Portuguese,
|
||||||
|
Turkish,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mirrors the frontend language mapping in apps/desktop/src/i18n/index.ts
|
// Mirrors the frontend language mapping in apps/desktop/src/i18n/index.ts
|
||||||
@@ -752,6 +753,8 @@ fn locale_family(locale: &str) -> LocaleFamily {
|
|||||||
LocaleFamily::Korean
|
LocaleFamily::Korean
|
||||||
} else if is_language("es") {
|
} else if is_language("es") {
|
||||||
LocaleFamily::Spanish
|
LocaleFamily::Spanish
|
||||||
|
} else if is_language("tr") {
|
||||||
|
LocaleFamily::Turkish
|
||||||
} else if is_language("it") {
|
} else if is_language("it") {
|
||||||
LocaleFamily::Italian
|
LocaleFamily::Italian
|
||||||
} else if is_language("pt") {
|
} else if is_language("pt") {
|
||||||
@@ -769,6 +772,7 @@ fn tray_menu_labels_for_locale(locale: &str) -> (&'static str, &'static str) {
|
|||||||
LocaleFamily::Korean => ("DBX 표시", "DBX 종료"),
|
LocaleFamily::Korean => ("DBX 표시", "DBX 종료"),
|
||||||
LocaleFamily::Spanish => ("Mostrar DBX", "Salir de DBX"),
|
LocaleFamily::Spanish => ("Mostrar DBX", "Salir de DBX"),
|
||||||
LocaleFamily::Italian => ("Mostra DBX", "Esci da DBX"),
|
LocaleFamily::Italian => ("Mostra DBX", "Esci da DBX"),
|
||||||
|
LocaleFamily::Turkish => ("DBX'i Göster", "DBX'ten Çık"),
|
||||||
LocaleFamily::Portuguese => ("Mostrar DBX", "Sair do DBX"),
|
LocaleFamily::Portuguese => ("Mostrar DBX", "Sair do DBX"),
|
||||||
LocaleFamily::English => ("Show DBX", "Quit DBX"),
|
LocaleFamily::English => ("Show DBX", "Quit DBX"),
|
||||||
}
|
}
|
||||||
@@ -784,6 +788,7 @@ fn app_menu_copy_support_info_label(locale: &str) -> &'static str {
|
|||||||
LocaleFamily::Korean => "지원 정보 복사",
|
LocaleFamily::Korean => "지원 정보 복사",
|
||||||
LocaleFamily::Spanish => "Copiar información",
|
LocaleFamily::Spanish => "Copiar información",
|
||||||
LocaleFamily::Italian => "Copia informazioni",
|
LocaleFamily::Italian => "Copia informazioni",
|
||||||
|
LocaleFamily::Turkish => "Destek bilgilerini kopyala",
|
||||||
LocaleFamily::Portuguese => "Copiar informações",
|
LocaleFamily::Portuguese => "Copiar informações",
|
||||||
LocaleFamily::English => "Copy Support Info",
|
LocaleFamily::English => "Copy Support Info",
|
||||||
}
|
}
|
||||||
@@ -797,6 +802,7 @@ fn app_menu_quit_label(locale: &str, app_name: &str) -> String {
|
|||||||
LocaleFamily::Korean => format!("{app_name} 종료"),
|
LocaleFamily::Korean => format!("{app_name} 종료"),
|
||||||
LocaleFamily::Spanish => format!("Salir de {app_name}"),
|
LocaleFamily::Spanish => format!("Salir de {app_name}"),
|
||||||
LocaleFamily::Italian => format!("Esci da {app_name}"),
|
LocaleFamily::Italian => format!("Esci da {app_name}"),
|
||||||
|
LocaleFamily::Turkish => format!("{app_name} Uygulamasından Çık"),
|
||||||
LocaleFamily::Portuguese => format!("Sair do {app_name}"),
|
LocaleFamily::Portuguese => format!("Sair do {app_name}"),
|
||||||
LocaleFamily::English => format!("Quit {app_name}"),
|
LocaleFamily::English => format!("Quit {app_name}"),
|
||||||
}
|
}
|
||||||
@@ -1008,6 +1014,7 @@ mod tests {
|
|||||||
assert_eq!(tray_menu_labels_for_locale("es-ES"), ("Mostrar DBX", "Salir de DBX"));
|
assert_eq!(tray_menu_labels_for_locale("es-ES"), ("Mostrar DBX", "Salir de DBX"));
|
||||||
assert_eq!(tray_menu_labels_for_locale("it-IT"), ("Mostra DBX", "Esci da DBX"));
|
assert_eq!(tray_menu_labels_for_locale("it-IT"), ("Mostra DBX", "Esci da DBX"));
|
||||||
assert_eq!(tray_menu_labels_for_locale("pt-BR"), ("Mostrar DBX", "Sair do DBX"));
|
assert_eq!(tray_menu_labels_for_locale("pt-BR"), ("Mostrar DBX", "Sair do DBX"));
|
||||||
|
assert_eq!(tray_menu_labels_for_locale("tr-TR"), ("DBX'i Göster", "DBX'ten Çık"));
|
||||||
assert_eq!(tray_menu_labels_for_locale("en-US"), ("Show DBX", "Quit DBX"));
|
assert_eq!(tray_menu_labels_for_locale("en-US"), ("Show DBX", "Quit DBX"));
|
||||||
// Unknown and empty locales fall back to English; "ita" must not match "it".
|
// Unknown and empty locales fall back to English; "ita" must not match "it".
|
||||||
assert_eq!(tray_menu_labels_for_locale("ita"), ("Show DBX", "Quit DBX"));
|
assert_eq!(tray_menu_labels_for_locale("ita"), ("Show DBX", "Quit DBX"));
|
||||||
@@ -1020,11 +1027,13 @@ mod tests {
|
|||||||
assert_eq!(app_menu_quit_label("zh-TW", "DBX"), "退出 DBX");
|
assert_eq!(app_menu_quit_label("zh-TW", "DBX"), "退出 DBX");
|
||||||
assert_eq!(app_menu_quit_label("ja-JP", "DBX"), "DBXを終了");
|
assert_eq!(app_menu_quit_label("ja-JP", "DBX"), "DBXを終了");
|
||||||
assert_eq!(app_menu_quit_label("ko-KR", "DBX"), "DBX 종료");
|
assert_eq!(app_menu_quit_label("ko-KR", "DBX"), "DBX 종료");
|
||||||
|
assert_eq!(app_menu_quit_label("tr-TR", "DBX"), "DBX Uygulamasından Çık");
|
||||||
assert_eq!(app_menu_quit_label("en-US", "DBX"), "Quit DBX");
|
assert_eq!(app_menu_quit_label("en-US", "DBX"), "Quit DBX");
|
||||||
assert_eq!(app_menu_quit_label("", "DBX"), "Quit DBX");
|
assert_eq!(app_menu_quit_label("", "DBX"), "Quit DBX");
|
||||||
assert_eq!(app_menu_copy_support_info_label("zh-CN"), "复制支持信息");
|
assert_eq!(app_menu_copy_support_info_label("zh-CN"), "复制支持信息");
|
||||||
assert_eq!(app_menu_copy_support_info_label("zh-TW"), "複製支援資訊");
|
assert_eq!(app_menu_copy_support_info_label("zh-TW"), "複製支援資訊");
|
||||||
assert_eq!(app_menu_copy_support_info_label("ko-KR"), "지원 정보 복사");
|
assert_eq!(app_menu_copy_support_info_label("ko-KR"), "지원 정보 복사");
|
||||||
|
assert_eq!(app_menu_copy_support_info_label("tr-TR"), "Destek bilgilerini kopyala");
|
||||||
assert_eq!(app_menu_copy_support_info_label("en-US"), "Copy Support Info");
|
assert_eq!(app_menu_copy_support_info_label("en-US"), "Copy Support Info");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user