diff --git a/.github/transifex.yml b/.github/transifex.yml index 636bfbf3d0..65d1553cbc 100644 --- a/.github/transifex.yml +++ b/.github/transifex.yml @@ -5,13 +5,13 @@ git: # all supported i18n types: https://docs.transifex.com/formats file_format: XLIFF source_language: en - source_file: web/xliff/en_US.xlf + source_file: web/xliff/en.xlf # path expression to translation files, must contain placeholder translation_files_expression: "web/xliff/.xlf" - filter_type: file # all supported i18n types: https://docs.transifex.com/formats file_format: PO source_language: en - source_file: locale/en_US/LC_MESSAGES/django.po + source_file: locale/en/LC_MESSAGES/django.po # path expression to translation files, must contain placeholder translation_files_expression: "locale//LC_MESSAGES/django.po" diff --git a/Makefile b/Makefile index ff89d61092..9eb82eef26 100644 --- a/Makefile +++ b/Makefile @@ -97,7 +97,7 @@ core-i18n-extract: --ignore ${GEN_API_TS} \ --ignore ${GEN_API_GO} \ --ignore website \ - -l en_US + -l en install: node-install docs-install core-install ## Install all requires dependencies for `node`, `docs` and `core` diff --git a/locale/en_US/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po similarity index 99% rename from locale/en_US/LC_MESSAGES/django.po rename to locale/en/LC_MESSAGES/django.po index 509e059b82..8527513510 100644 --- a/locale/en_US/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -12,7 +12,7 @@ msgstr "" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: en_US\n" +"Language: en\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" diff --git a/web/lit-localize.json b/web/lit-localize.json index c51e160cd5..0a5b28ea91 100644 --- a/web/lit-localize.json +++ b/web/lit-localize.json @@ -1,10 +1,10 @@ { "$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json", - "sourceLocale": "en_US", + "sourceLocale": "en", "targetLocales": [ "cs_CZ", "de_DE", - "en_US", + "en", "es_ES", "fr_FR", "it_IT", diff --git a/web/src/elements/ak-locale-context/definitions.ts b/web/src/elements/ak-locale-context/definitions.ts index 2569013640..d785b8a715 100644 --- a/web/src/elements/ak-locale-context/definitions.ts +++ b/web/src/elements/ak-locale-context/definitions.ts @@ -3,7 +3,7 @@ import { AkLocale, LocaleRow } from "./types.js"; import type { LocaleModule } from "@lit/localize"; import { msg } from "@lit/localize"; -export const DEFAULT_FALLBACK = "en_US"; +export const DEFAULT_FALLBACK = "en"; export const enLocale: LocaleModule = { templates: {}, @@ -41,7 +41,7 @@ const debug: LocaleRow = [ // prettier-ignore const LOCALE_TABLE: LocaleRow[] = [ ["de_DE", /^de([_-]|$)/i, () => msg("German"), () => import("#locales/de_DE")], - ["en_US", /^en([_-]|$)/i, () => msg("English"), () => Promise.resolve(enLocale)], + ["en", /^en([_-]|$)/i, () => msg("English"), () => Promise.resolve(enLocale)], ["es_ES", /^es([_-]|$)/i, () => msg("Spanish"), () => import("#locales/es_ES")], ["fr_FR", /^fr([_-]|$)/i, () => msg("French"), () => import("#locales/fr_FR")], ["it_IT", /^it([_-]|$)/i, () => msg("Italian"), () => import("#locales/it_IT")], diff --git a/web/src/locale-codes.ts b/web/src/locale-codes.ts index 35f38738fe..eff102943c 100644 --- a/web/src/locale-codes.ts +++ b/web/src/locale-codes.ts @@ -4,7 +4,7 @@ /** * The locale code that templates in this source code are written in. */ -export const sourceLocale = `en_US`; +export const sourceLocale = `en`; /** * The other locale codes that this application is localized into. Sorted @@ -33,7 +33,7 @@ export const targetLocales = [ export const allLocales = [ `cs_CZ`, `de_DE`, - `en_US`, + `en`, `es_ES`, `fr_FR`, `it_IT`, diff --git a/web/xliff/cs_CZ.xlf b/web/xliff/cs_CZ.xlf index 40dcf2f6b4..37638d6279 100644 --- a/web/xliff/cs_CZ.xlf +++ b/web/xliff/cs_CZ.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/de_DE.xlf b/web/xliff/de_DE.xlf index 366a514e18..4b23772f21 100644 --- a/web/xliff/de_DE.xlf +++ b/web/xliff/de_DE.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/en_US.xlf b/web/xliff/en.xlf similarity index 99% rename from web/xliff/en_US.xlf rename to web/xliff/en.xlf index a1855eb4a8..ddb9696cc9 100644 --- a/web/xliff/en_US.xlf +++ b/web/xliff/en.xlf @@ -1,6 +1,6 @@ - + Dismiss diff --git a/web/xliff/es_ES.xlf b/web/xliff/es_ES.xlf index d6dc6177dd..15f889bacd 100644 --- a/web/xliff/es_ES.xlf +++ b/web/xliff/es_ES.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/fi_FI.xlf b/web/xliff/fi_FI.xlf index 4a83bdd7a2..c250a31cd3 100644 --- a/web/xliff/fi_FI.xlf +++ b/web/xliff/fi_FI.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/fr_FR.xlf b/web/xliff/fr_FR.xlf index fd56eb9058..dc4ba67366 100644 --- a/web/xliff/fr_FR.xlf +++ b/web/xliff/fr_FR.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/it_IT.xlf b/web/xliff/it_IT.xlf index 13bbc336a4..3a7ee0e69c 100644 --- a/web/xliff/it_IT.xlf +++ b/web/xliff/it_IT.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/ja_JP.xlf b/web/xliff/ja_JP.xlf index 8dcc42ca8c..4fd656483a 100644 --- a/web/xliff/ja_JP.xlf +++ b/web/xliff/ja_JP.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/ko_KR.xlf b/web/xliff/ko_KR.xlf index 1935728960..c20527072b 100644 --- a/web/xliff/ko_KR.xlf +++ b/web/xliff/ko_KR.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/nl_NL.xlf b/web/xliff/nl_NL.xlf index da45365bfe..c0d2ad4937 100644 --- a/web/xliff/nl_NL.xlf +++ b/web/xliff/nl_NL.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/pl_PL.xlf b/web/xliff/pl_PL.xlf index 25c4c419fa..13107e6ccd 100644 --- a/web/xliff/pl_PL.xlf +++ b/web/xliff/pl_PL.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/pt_BR.xlf b/web/xliff/pt_BR.xlf index 4ed62a7d50..d9a707a915 100644 --- a/web/xliff/pt_BR.xlf +++ b/web/xliff/pt_BR.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/ru_RU.xlf b/web/xliff/ru_RU.xlf index bc0f9dff74..b516434fc4 100644 --- a/web/xliff/ru_RU.xlf +++ b/web/xliff/ru_RU.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/tr_TR.xlf b/web/xliff/tr_TR.xlf index 3330e7b47e..b264ece799 100644 --- a/web/xliff/tr_TR.xlf +++ b/web/xliff/tr_TR.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/zh_Hans.xlf b/web/xliff/zh_Hans.xlf index 471c3501d5..7b1cc72466 100644 --- a/web/xliff/zh_Hans.xlf +++ b/web/xliff/zh_Hans.xlf @@ -1,5 +1,5 @@ - + Dismiss diff --git a/web/xliff/zh_Hant.xlf b/web/xliff/zh_Hant.xlf index 482f71c28c..56b5703626 100644 --- a/web/xliff/zh_Hant.xlf +++ b/web/xliff/zh_Hant.xlf @@ -1,5 +1,5 @@ - + Dismiss