translate: fix source locale not matching transifex (#18503)

Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
This commit is contained in:
Teffen Ellis
2025-12-01 20:08:58 +01:00
committed by GitHub
parent b7205ff167
commit 952a0f796d
22 changed files with 26 additions and 26 deletions

View File

@@ -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 <lang> placeholder
translation_files_expression: "web/xliff/<lang>.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 <lang> placeholder
translation_files_expression: "locale/<lang>/LC_MESSAGES/django.po"

View File

@@ -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`

View File

@@ -12,7 +12,7 @@ msgstr ""
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"

View File

@@ -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",

View File

@@ -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")],

View File

@@ -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`,

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="cs_CZ" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="cs_CZ" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="de_DE" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="de_DE" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
<file target-language="en_US" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="en" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="es_ES" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="es_ES" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" ?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="fi_FI" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="fi_FI" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="fr_FR" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="fr_FR" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="it_IT" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="it_IT" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="ja_JP" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="ja_JP" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="ko_KR" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="ko_KR" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="nl_NL" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="nl_NL" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="pl_PL" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="pl_PL" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" ?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="pt_BR" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="pt_BR" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="ru_RU" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="ru_RU" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="tr_TR" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="tr_TR" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="zh_Hans" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="zh_Hans" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>

View File

@@ -1,5 +1,5 @@
<?xml version="1.0"?><xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file target-language="zh_Hant" source-language="en_US" original="lit-localize-inputs" datatype="plaintext">
<file target-language="zh_Hant" source-language="en" original="lit-localize-inputs" datatype="plaintext">
<body>
<trans-unit id="s12d6dde9b30c3093">
<source>Dismiss</source>