Skip to content

Build your personal knowledge base with Trilium Notes

chore(i18n): fix more issues related to Irish

Elian Doran72e0d77be5a8
diff --git a/apps/client/src/widgets/type_widgets/canvas/i18n.spec.ts b/apps/client/src/widgets/type_widgets/canvas/i18n.spec.ts
index c77e4979da..7a51032134 100644
--- a/apps/client/src/widgets/type_widgets/canvas/i18n.spec.ts
+++ b/apps/client/src/widgets/type_widgets/canvas/i18n.spec.ts
@@ -2,6 +2,7 @@ import { LOCALES } from "@triliumnext/commons";
import { readdirSync } from "fs";
import { join } from "path";
import { describe, expect, it } from "vitest";
+
import { LANGUAGE_MAPPINGS } from "./i18n.js";
const localeDir = join(__dirname, "../../../../../../node_modules/@excalidraw/excalidraw/dist/prod/locales");
@@ -21,9 +22,9 @@ describe("Canvas i18n", () => {
for (const locale of LOCALES) {
if (locale.contentOnly || locale.devOnly) continue;
const languageCode = LANGUAGE_MAPPINGS[locale.id];
- if (!supportedLanguageCodes.has(languageCode)) {
+ if (languageCode && !supportedLanguageCodes.has(languageCode)) {
console.log("Supported locales:", Array.from(supportedLanguageCodes.values()).join(", "));
- expect.fail(`Unable to find locale for ${locale.id} -> ${languageCode}.`)
+ expect.fail(`Unable to find locale for ${locale.id} -> ${languageCode}.`);
}
}
});
diff --git a/apps/client/src/widgets/type_widgets/canvas/i18n.ts b/apps/client/src/widgets/type_widgets/canvas/i18n.ts
index 0b188bad83..924ec48dbe 100644
--- a/apps/client/src/widgets/type_widgets/canvas/i18n.ts
+++ b/apps/client/src/widgets/type_widgets/canvas/i18n.ts
@@ -10,7 +10,7 @@ export const LANGUAGE_MAPPINGS: Record<DISPLAYABLE_LOCALE_IDS, Language["code"]
en_rtl: "en",
es: "es-ES",
fr: "fr-FR",
- ga: "ga",
+ ga: null,
it: "it-IT",
ja: "ja-JP",
pt: "pt-PT",
diff --git a/apps/client/src/widgets/type_widgets/text/config.spec.ts b/apps/client/src/widgets/type_widgets/text/config.spec.ts
index af01cf8633..956bdfc308 100644
--- a/apps/client/src/widgets/type_widgets/text/config.spec.ts
+++ b/apps/client/src/widgets/type_widgets/text/config.spec.ts
@@ -29,7 +29,7 @@ describe("CK config", () => {
if (expectedLocale === "cn") expectedLocale = "zh";
if (expectedLocale === "tw") expectedLocale = "zh-tw";
- if (locale.id !== "en") {
+ if (locale.id !== "en" && locale.id !== "ga") {
expect((config.language as any).ui).toMatch(new RegExp(`^${expectedLocale}`));
expect(config.translations, locale.id).toBeDefined();
expect(config.translations, locale.id).toHaveLength(2);