diff --git a/shared/CLAUDE.md b/shared/CLAUDE.md index 3a33444d4..7fbb6baa1 100644 --- a/shared/CLAUDE.md +++ b/shared/CLAUDE.md @@ -49,7 +49,7 @@ The parity rule governs **existing** routes; it is not a license to mint new deb - **`languages.ts`** — `SUPPORTED_LANGUAGES` is the canonical registry and the source of `SupportedLanguageCode`. Adding a language starts here. - **`/`** — one folder per language, one file per UI domain plus an `index.ts` barrel; each file exports a flat map of dot-namespaced keys typed as `TranslationStrings`. The runtime `t(key)` only resolves these top-level keys. - **`en/` is canonical.** Every other locale must have the identical file set and top-level keys — `i18n:parity:strict` enforces it in CI. When you add or rename a key, update every locale. -- **Every locale gets a real translation; an English placeholder is not acceptable.** Write native phrasing with the locale's own punctuation and the same `{placeholders}` as `en`; if you genuinely cannot translate one, say so instead of filling it with English. Parity only checks that the key exists, so `i18n:parity:strict` also runs a ratchet (`scripts/i18n-untranslated.mjs`): per locale and file, the `// en-fallback` markers and the unmarked values identical to `en` may not grow past `scripts/i18n-untranslated-baseline.json`. An identical value is excused only when, after dropping placeholders, markup, URLs/e-mail/paths and the multi-word names in `BRAND_NAMES`, at most one plain word is left (a word with a capital after its first letter, an acronym or a single letter does not count), so "{count} km", "GPX", "OAuth" and "Budget" pass and "Source code" does not. Deleting a marker without translating moves the string from one count to the other and still fails. After translating, run `npm run i18n:untranslated:update` to lower the baseline; nothing raises it. +- **Every locale gets a real translation; an English placeholder is not acceptable.** Write native phrasing with the locale's own punctuation and the same `{placeholders}` as `en`; if you genuinely cannot translate one, say so instead of filling it with English. Parity only checks that the key exists, so `i18n:parity:strict` also runs a ratchet (`scripts/i18n-untranslated.mjs`): per locale and file, the `// en-fallback` markers and the unmarked values identical to `en` may not grow past `scripts/i18n-untranslated-baseline.json`. An identical value is excused only when, after dropping placeholders, markup, URLs/e-mail/paths, the product names in `BRAND_NAMES` (Google Maps, Atlas, Immich) and the unit symbols in `UNITS`, no plain word is left (a word with a capital after its first letter, an acronym or a single letter does not count), so "{count} km", "GPX", "OAuth" and "Atlas" pass while "Settings" and "Source code" count. A single ordinary word that really is the locale's own (German "Status", French "Transport") carries `// same-as-en` on its declaration; the marker is honoured only in Latin-script locales (`LATIN_LOCALES`), because a Latin word in Japanese or Arabic is English whatever it says. Every locale folder must be on `LATIN_LOCALES` or `NON_LATIN_LOCALES`, so a new language is classified there first. Deleting a marker without translating moves the string from one count to the other and still fails. After translating, run `npm run i18n:untranslated:update` to lower the baseline; nothing raises it. - **Count-bearing strings use plural forms, never `count === 1` in the caller.** The key holds the general form (the CLDR "other" category) and `key.zero|one|two|few|many` hold the forms the language's `Intl.PluralRules` selects for whole numbers (`plural.ts`); `t(key, { count })` (or `{ n }`) picks one. Pass the count as a number. Russian needs `.one`, `.few` and `.many`, Arabic all five, Japanese none. `i18n:parity` checks that every locale has exactly the forms its language reaches with whole numbers and none it never selects. A form may spell the number out (Arabic "ملف واحد") only where its category is that one number; French `one` also covers 0 and Russian `one` covers 21, so they keep `{count}`. A string whose wording changes with the number (the old "Copy to trip" for one place, "Copy {count} to trip" for more) is a plural group whose `one` drops the number where the language allows it, not two keys switched in the caller. - **An `en` string carrying `{count}` or `{n}` must be a plural group**, even when the forms read the same (a label such as "Notes: {count}"), so every language can inflect. `i18n:parity` refuses one that is not, unless `NOT_PLURAL` in `scripts/i18n-parity.mjs` lists it with a reason: only for a number that is never a quantity (a day number, a step, a multiplier). An entry that stops matching fails too. - **Further i18n specs run in `npm test`** and fail changes that parity lets through: placeholder parity (every `{placeholder}` in an `en` string must appear in each translation), no `en` string may call TREK "self-hosted" (the same build runs on managed installs; exemptions live in the spec), and a wording regression test for plugin permission descriptions (currently one string; add a case there when a permission's real behavior changes). None of these are part of `i18n:parity`, which checks key sets, plural forms, count strings and the untranslated ratchet. diff --git a/shared/scripts/fixtures/i18n-unlisted/en/a.ts b/shared/scripts/fixtures/i18n-unlisted/en/a.ts new file mode 100644 index 000000000..034f3cd4a --- /dev/null +++ b/shared/scripts/fixtures/i18n-unlisted/en/a.ts @@ -0,0 +1,5 @@ +// Fixture: a canonical table beside a locale on neither script list. +const a = { + 'a.title': 'Trip settings', +}; +export default a; diff --git a/shared/scripts/fixtures/i18n-unlisted/xx/a.ts b/shared/scripts/fixtures/i18n-unlisted/xx/a.ts new file mode 100644 index 000000000..0f882ee9b --- /dev/null +++ b/shared/scripts/fixtures/i18n-unlisted/xx/a.ts @@ -0,0 +1,5 @@ +// Fixture: a locale folder the ratchet has not been told the script of. +const a = { + 'a.title': 'Trip settings', +}; +export default a; diff --git a/shared/scripts/fixtures/i18n-words/de/a.ts b/shared/scripts/fixtures/i18n-words/de/a.ts new file mode 100644 index 000000000..c72fd5550 --- /dev/null +++ b/shared/scripts/fixtures/i18n-words/de/a.ts @@ -0,0 +1,9 @@ +// Fixture: "Status" is the German word too and says so; the name and the unit need no marker. +const a = { + 'a.settings': 'Einstellungen', + 'a.appearance': 'Erscheinungsbild', + 'a.status': 'Status', // same-as-en + 'a.addon': 'Atlas', + 'a.distance': '{count} km', +}; +export default a; diff --git a/shared/scripts/fixtures/i18n-words/en/a.ts b/shared/scripts/fixtures/i18n-words/en/a.ts new file mode 100644 index 000000000..c5953ce60 --- /dev/null +++ b/shared/scripts/fixtures/i18n-words/en/a.ts @@ -0,0 +1,9 @@ +// Fixture for the untranslated ratchet's word rule: single words, names and units. +const a = { + 'a.settings': 'Settings', + 'a.appearance': 'Appearance', + 'a.status': 'Status', + 'a.addon': 'Atlas', + 'a.distance': '{count} km', +}; +export default a; diff --git a/shared/scripts/fixtures/i18n-words/fr/a.ts b/shared/scripts/fixtures/i18n-words/fr/a.ts new file mode 100644 index 000000000..942d761f7 --- /dev/null +++ b/shared/scripts/fixtures/i18n-words/fr/a.ts @@ -0,0 +1,9 @@ +// Fixture: "Settings" is an English copy; "Status" is one too, with no marker. +const a = { + 'a.settings': 'Settings', + 'a.appearance': 'Apparence', + 'a.status': 'Status', + 'a.addon': 'Atlas', + 'a.distance': '{count} km', +}; +export default a; diff --git a/shared/scripts/fixtures/i18n-words/ja/a.ts b/shared/scripts/fixtures/i18n-words/ja/a.ts new file mode 100644 index 000000000..aed8e5af1 --- /dev/null +++ b/shared/scripts/fixtures/i18n-words/ja/a.ts @@ -0,0 +1,9 @@ +// Fixture: a Latin word in Japanese is English, marker or not. +const a = { + 'a.settings': '設定', + 'a.appearance': 'Appearance', + 'a.status': 'Status', // same-as-en + 'a.addon': 'Atlas', + 'a.distance': '{count} km', +}; +export default a; diff --git a/shared/scripts/i18n-catalog.mjs b/shared/scripts/i18n-catalog.mjs index bcb2a035c..9407ad2d7 100644 --- a/shared/scripts/i18n-catalog.mjs +++ b/shared/scripts/i18n-catalog.mjs @@ -21,6 +21,13 @@ export const I18N_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..', 'sr export const FALLBACK_MARKER = '// en-fallback'; +/** + * The marker a translator leaves on a value that is the locale's own word and + * happens to be spelled as in en (German "Status", French "Transport"). The + * untranslated ratchet honours it only in Latin-script locales. + */ +export const SAME_MARKER = '// same-as-en'; + /** A root given as a file URL (what a spec can build without node types) or a path. */ export const asPath = (root) => (root instanceof URL ? fileURLToPath(root) : root); @@ -70,7 +77,8 @@ function readLiteral(text) { /** * Every top-level entry of one table's source: key, value, whether the - * declaration carries the fallback marker, and the line it starts on. + * declaration carries the fallback marker (`marked`) or the same-as-en + * marker (`same`), and the line it starts on. * Throws with file and line on anything it cannot read. */ export function parseCatalog(source, label = 'catalogue') { @@ -91,7 +99,13 @@ export function parseCatalog(source, label = 'catalogue') { if (!literal || !/^(,|\})?\s*(\/\/.*)?$/.test(tail)) { throw new Error(`${label}:${i + 1}: '${key}' is not a single string literal`); } - entries.push({ key, value: literal.value, marked: tail.includes(FALLBACK_MARKER), line: i + 1 }); + entries.push({ + key, + value: literal.value, + marked: tail.includes(FALLBACK_MARKER), + same: tail.includes(SAME_MARKER), + line: i + 1, + }); i = end; } return entries; diff --git a/shared/scripts/i18n-untranslated-baseline.json b/shared/scripts/i18n-untranslated-baseline.json index feee369a2..67b4e0211 100644 --- a/shared/scripts/i18n-untranslated-baseline.json +++ b/shared/scripts/i18n-untranslated-baseline.json @@ -1,275 +1,585 @@ { "ar": { - "admin.ts": { "marked": 22, "identical": 3 }, + "admin.ts": { "marked": 22, "identical": 9 }, "backup.ts": { "marked": 1, "identical": 0 }, "collab.ts": { "marked": 1, "identical": 0 }, "common.ts": { "marked": 13, "identical": 0 }, "dayplan.ts": { "marked": 8, "identical": 0 }, - "journey.ts": { "marked": 284, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 284, "identical": 2 }, "login.ts": { "marked": 1, "identical": 3 }, + "nav.ts": { "marked": 0, "identical": 1 }, "oauth.ts": { "marked": 19, "identical": 0 }, - "settings.ts": { "marked": 14, "identical": 39 }, - "system_notice.ts": { "marked": 3, "identical": 2 }, + "settings.ts": { "marked": 14, "identical": 68 }, + "storage.ts": { "marked": 0, "identical": 1 }, + "system_notice.ts": { "marked": 3, "identical": 3 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "az": { - "admin.ts": { "marked": 0, "identical": 2 }, - "journey.ts": { "marked": 0, "identical": 1 }, - "settings.ts": { "marked": 0, "identical": 1 } + "admin.ts": { "marked": 0, "identical": 5 }, + "atlas.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 1 }, + "dayplan.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 0, "identical": 8 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "places.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 4 }, + "settings.ts": { "marked": 0, "identical": 6 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 2 }, + "system_notice.ts": { "marked": 0, "identical": 1 }, + "trip.ts": { "marked": 0, "identical": 2 } }, "br": { - "admin.ts": { "marked": 0, "identical": 13 }, + "admin.ts": { "marked": 0, "identical": 29 }, + "atlas.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 3 }, + "collab.ts": { "marked": 0, "identical": 2 }, + "collection.ts": { "marked": 0, "identical": 2 }, "common.ts": { "marked": 12, "identical": 0 }, - "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 0 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 2 }, + "dayplan.ts": { "marked": 2, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 4 }, + "journey.ts": { "marked": 115, "identical": 7 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 45 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "map.ts": { "marked": 0, "identical": 1 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "mobileJourney.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "oauth.ts": { "marked": 17, "identical": 2 }, + "places.ts": { "marked": 0, "identical": 3 }, + "reservations.ts": { "marked": 0, "identical": 7 }, + "roadtrip.ts": { "marked": 0, "identical": 4 }, + "settings.ts": { "marked": 0, "identical": 85 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 4 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "trip.ts": { "marked": 0, "identical": 1 }, "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } + "vacay.ts": { "marked": 0, "identical": 6 } }, "ca": { - "admin.ts": { "marked": 0, "identical": 4 }, - "journey.ts": { "marked": 110, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 9 }, - "system_notice.ts": { "marked": 0, "identical": 2 }, - "vacay.ts": { "marked": 0, "identical": 5 } + "admin.ts": { "marked": 0, "identical": 16 }, + "atlas.ts": { "marked": 0, "identical": 2 }, + "backup.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 4 }, + "categories.ts": { "marked": 0, "identical": 2 }, + "collab.ts": { "marked": 0, "identical": 3 }, + "collection.ts": { "marked": 0, "identical": 2 }, + "common.ts": { "marked": 0, "identical": 2 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "dawarich.ts": { "marked": 0, "identical": 1 }, + "dayplan.ts": { "marked": 0, "identical": 3 }, + "docsync.ts": { "marked": 0, "identical": 2 }, + "files.ts": { "marked": 0, "identical": 3 }, + "help.ts": { "marked": 0, "identical": 2 }, + "inspector.ts": { "marked": 0, "identical": 1 }, + "journey.ts": { "marked": 110, "identical": 12 }, + "map.ts": { "marked": 0, "identical": 1 }, + "mobileTrip.ts": { "marked": 0, "identical": 2 }, + "nav.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 0, "identical": 1 }, + "packing.ts": { "marked": 0, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 2 }, + "planner.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 6 }, + "roadtrip.ts": { "marked": 0, "identical": 3 }, + "settings.ts": { "marked": 0, "identical": 20 }, + "storage.ts": { "marked": 0, "identical": 4 }, + "system_notice.ts": { "marked": 0, "identical": 3 }, + "transport.ts": { "marked": 0, "identical": 1 }, + "trip.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 7 } }, "cs": { - "admin.ts": { "marked": 0, "identical": 14 }, - "atlas.ts": { "marked": 0, "identical": 1 }, + "admin.ts": { "marked": 0, "identical": 26 }, + "atlas.ts": { "marked": 0, "identical": 2 }, + "backup.ts": { "marked": 0, "identical": 1 }, + "collab.ts": { "marked": 0, "identical": 1 }, + "collection.ts": { "marked": 0, "identical": 2 }, "common.ts": { "marked": 12, "identical": 0 }, + "day.ts": { "marked": 0, "identical": 2 }, "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 1 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 115, "identical": 6 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 44 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "nav.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 2 }, + "reservations.ts": { "marked": 0, "identical": 3 }, + "roadtrip.ts": { "marked": 0, "identical": 3 }, + "settings.ts": { "marked": 0, "identical": 83 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 3 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "tours.ts": { "marked": 0, "identical": 1 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "de": { - "admin.ts": { "marked": 0, "identical": 12 }, - "journey.ts": { "marked": 9, "identical": 1 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 11 }, - "system_notice.ts": { "marked": 0, "identical": 4 } + "admin.ts": { "marked": 0, "identical": 42 }, + "atlas.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 7 }, + "collab.ts": { "marked": 0, "identical": 5 }, + "collection.ts": { "marked": 0, "identical": 4 }, + "common.ts": { "marked": 0, "identical": 1 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "dawarich.ts": { "marked": 0, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 3 }, + "dayplan.ts": { "marked": 0, "identical": 4 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "files.ts": { "marked": 0, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 10 }, + "inspector.ts": { "marked": 0, "identical": 1 }, + "journey.ts": { "marked": 9, "identical": 25 }, + "map.ts": { "marked": 0, "identical": 2 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "mobileJourney.ts": { "marked": 0, "identical": 1 }, + "mobileTrip.ts": { "marked": 0, "identical": 3 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "notifications.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 17, "identical": 4 }, + "packing.ts": { "marked": 0, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 5 }, + "planner.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 13 }, + "roadtrip.ts": { "marked": 0, "identical": 5 }, + "settings.ts": { "marked": 0, "identical": 28 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 2 }, + "storage.ts": { "marked": 0, "identical": 5 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "tours.ts": { "marked": 0, "identical": 1 }, + "transport.ts": { "marked": 0, "identical": 1 }, + "trip.ts": { "marked": 0, "identical": 2 }, + "vacay.ts": { "marked": 0, "identical": 1 } }, "es": { - "admin.ts": { "marked": 0, "identical": 12 }, - "common.ts": { "marked": 12, "identical": 0 }, + "admin.ts": { "marked": 0, "identical": 28 }, + "atlas.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 2 }, + "categories.ts": { "marked": 0, "identical": 1 }, + "collab.ts": { "marked": 0, "identical": 1 }, + "collection.ts": { "marked": 0, "identical": 2 }, + "common.ts": { "marked": 12, "identical": 2 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 0 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 115, "identical": 7 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 45 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "map.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 2 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "packing.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 3 }, + "roadtrip.ts": { "marked": 0, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 84 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 2 }, + "storage.ts": { "marked": 0, "identical": 3 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "trip.ts": { "marked": 0, "identical": 4 }, "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } + "vacay.ts": { "marked": 0, "identical": 6 } }, "et": { - "admin.ts": { "marked": 0, "identical": 1 }, - "settings.ts": { "marked": 0, "identical": 1 } + "admin.ts": { "marked": 0, "identical": 3 }, + "budget.ts": { "marked": 0, "identical": 1 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "dayplan.ts": { "marked": 0, "identical": 1 }, + "files.ts": { "marked": 0, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 1 }, + "journey.ts": { "marked": 0, "identical": 2 }, + "mobileTrip.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 2 }, + "system_notice.ts": { "marked": 0, "identical": 1 }, + "transport.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 1 } }, "fr": { - "admin.ts": { "marked": 0, "identical": 14 }, - "atlas.ts": { "marked": 0, "identical": 1 }, - "common.ts": { "marked": 12, "identical": 0 }, - "dayplan.ts": { "marked": 2, "identical": 0 }, - "help.ts": { "marked": 0, "identical": 1 }, - "journey.ts": { "marked": 115, "identical": 1 }, + "admin.ts": { "marked": 0, "identical": 48 }, + "atlas.ts": { "marked": 0, "identical": 2 }, + "budget.ts": { "marked": 0, "identical": 9 }, + "collab.ts": { "marked": 0, "identical": 8 }, + "collection.ts": { "marked": 0, "identical": 4 }, + "common.ts": { "marked": 12, "identical": 1 }, + "dashboard.ts": { "marked": 0, "identical": 3 }, + "dawarich.ts": { "marked": 0, "identical": 3 }, + "day.ts": { "marked": 0, "identical": 1 }, + "dayplan.ts": { "marked": 2, "identical": 5 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "files.ts": { "marked": 0, "identical": 5 }, + "help.ts": { "marked": 0, "identical": 13 }, + "inspector.ts": { "marked": 0, "identical": 2 }, + "journey.ts": { "marked": 115, "identical": 32 }, "login.ts": { "marked": 0, "identical": 3 }, - "notif.ts": { "marked": 0, "identical": 1 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "places.ts": { "marked": 0, "identical": 1 }, - "planner.ts": { "marked": 0, "identical": 1 }, - "roadtrip.ts": { "marked": 0, "identical": 2 }, - "settings.ts": { "marked": 0, "identical": 45 }, + "map.ts": { "marked": 0, "identical": 3 }, + "memories.ts": { "marked": 0, "identical": 3 }, + "mobileJourney.ts": { "marked": 0, "identical": 3 }, + "mobileTrip.ts": { "marked": 0, "identical": 3 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "notif.ts": { "marked": 0, "identical": 2 }, + "notifications.ts": { "marked": 0, "identical": 3 }, + "oauth.ts": { "marked": 17, "identical": 4 }, + "packing.ts": { "marked": 0, "identical": 1 }, + "pdf.ts": { "marked": 0, "identical": 1 }, + "photos.ts": { "marked": 0, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 8 }, + "planner.ts": { "marked": 0, "identical": 3 }, + "reservations.ts": { "marked": 0, "identical": 16 }, + "roadtrip.ts": { "marked": 0, "identical": 6 }, + "settings.ts": { "marked": 0, "identical": 89 }, + "share.ts": { "marked": 0, "identical": 2 }, + "shared.ts": { "marked": 0, "identical": 3 }, + "storage.ts": { "marked": 0, "identical": 4 }, "system_notice.ts": { "marked": 0, "identical": 4 }, + "todo.ts": { "marked": 0, "identical": 1 }, + "tours.ts": { "marked": 0, "identical": 3 }, + "transport.ts": { "marked": 0, "identical": 2 }, + "trip.ts": { "marked": 0, "identical": 7 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "gr": { - "admin.ts": { "marked": 0, "identical": 4 }, - "common.ts": { "marked": 12, "identical": 0 }, + "admin.ts": { "marked": 0, "identical": 21 }, + "common.ts": { "marked": 12, "identical": 1 }, "dashboard.ts": { "marked": 36, "identical": 0 }, - "journey.ts": { "marked": 110, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 110, "identical": 2 }, "login.ts": { "marked": 0, "identical": 3 }, + "memories.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 1 }, "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 42 }, - "system_notice.ts": { "marked": 0, "identical": 2 }, + "places.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 2 }, + "roadtrip.ts": { "marked": 0, "identical": 3 }, + "settings.ts": { "marked": 0, "identical": 86 }, + "storage.ts": { "marked": 0, "identical": 2 }, + "system_notice.ts": { "marked": 0, "identical": 3 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "hu": { - "admin.ts": { "marked": 0, "identical": 15 }, - "common.ts": { "marked": 12, "identical": 0 }, - "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 0 }, - "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 44 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, - "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } - }, - "id": { - "admin.ts": { "marked": 0, "identical": 7 }, + "admin.ts": { "marked": 0, "identical": 26 }, "common.ts": { "marked": 12, "identical": 0 }, "dayplan.ts": { "marked": 2, "identical": 0 }, + "help.ts": { "marked": 0, "identical": 3 }, "journey.ts": { "marked": 115, "identical": 2 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "packing.ts": { "marked": 0, "identical": 1 }, - "settings.ts": { "marked": 0, "identical": 44 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, - "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } - }, - "it": { - "admin.ts": { "marked": 0, "identical": 12 }, - "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 1 }, - "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 45 }, - "storage.ts": { "marked": 0, "identical": 1 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, - "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } - }, - "ja": { - "admin.ts": { "marked": 0, "identical": 2 }, - "common.ts": { "marked": 12, "identical": 0 }, - "journey.ts": { "marked": 110, "identical": 1 }, - "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 41 }, - "system_notice.ts": { "marked": 0, "identical": 2 }, - "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } - }, - "ko": { - "admin.ts": { "marked": 0, "identical": 2 }, - "common.ts": { "marked": 12, "identical": 0 }, - "journey.ts": { "marked": 110, "identical": 0 }, - "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 39 }, - "system_notice.ts": { "marked": 0, "identical": 2 }, - "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } - }, - "nl": { - "admin.ts": { "marked": 0, "identical": 3 }, - "common.ts": { "marked": 12, "identical": 0 }, - "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 1 }, - "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "oauth.ts": { "marked": 17, "identical": 1 }, "places.ts": { "marked": 0, "identical": 1 }, - "settings.ts": { "marked": 0, "identical": 48 }, + "reservations.ts": { "marked": 0, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 79 }, + "storage.ts": { "marked": 0, "identical": 1 }, "system_notice.ts": { "marked": 0, "identical": 5 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, - "pl": { - "admin.ts": { "marked": 0, "identical": 14 }, - "common.ts": { "marked": 12, "identical": 0 }, - "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 1 }, + "id": { + "admin.ts": { "marked": 0, "identical": 29 }, + "atlas.ts": { "marked": 0, "identical": 1 }, + "backup.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 3 }, + "collab.ts": { "marked": 0, "identical": 3 }, + "collection.ts": { "marked": 0, "identical": 3 }, + "common.ts": { "marked": 12, "identical": 1 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 2 }, + "dayplan.ts": { "marked": 2, "identical": 1 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 7 }, + "journey.ts": { "marked": 115, "identical": 13 }, "login.ts": { "marked": 0, "identical": 3 }, + "memories.ts": { "marked": 0, "identical": 1 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 4 }, + "oauth.ts": { "marked": 17, "identical": 2 }, + "packing.ts": { "marked": 0, "identical": 2 }, + "places.ts": { "marked": 0, "identical": 3 }, + "reservations.ts": { "marked": 0, "identical": 7 }, + "roadtrip.ts": { "marked": 0, "identical": 5 }, + "settings.ts": { "marked": 0, "identical": 90 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 2 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "trip.ts": { "marked": 0, "identical": 2 }, + "undo.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 5 } + }, + "it": { + "admin.ts": { "marked": 0, "identical": 30 }, + "atlas.ts": { "marked": 0, "identical": 3 }, + "budget.ts": { "marked": 0, "identical": 3 }, + "collab.ts": { "marked": 0, "identical": 1 }, + "collection.ts": { "marked": 0, "identical": 2 }, + "common.ts": { "marked": 0, "identical": 3 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 2 }, + "dayplan.ts": { "marked": 2, "identical": 1 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "files.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 6 }, + "inspector.ts": { "marked": 0, "identical": 1 }, + "journey.ts": { "marked": 115, "identical": 4 }, + "login.ts": { "marked": 0, "identical": 3 }, + "map.ts": { "marked": 0, "identical": 1 }, + "memories.ts": { "marked": 0, "identical": 1 }, + "mobileTrip.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 2 }, + "oauth.ts": { "marked": 17, "identical": 2 }, + "places.ts": { "marked": 0, "identical": 2 }, + "reservations.ts": { "marked": 0, "identical": 6 }, + "roadtrip.ts": { "marked": 0, "identical": 5 }, + "settings.ts": { "marked": 0, "identical": 90 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 3 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "trip.ts": { "marked": 0, "identical": 1 }, + "undo.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 6 } + }, + "ja": { + "admin.ts": { "marked": 0, "identical": 9 }, + "budget.ts": { "marked": 0, "identical": 1 }, + "common.ts": { "marked": 12, "identical": 0 }, + "help.ts": { "marked": 0, "identical": 2 }, + "journey.ts": { "marked": 110, "identical": 2 }, + "login.ts": { "marked": 0, "identical": 3 }, + "nav.ts": { "marked": 0, "identical": 1 }, "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 44 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "settings.ts": { "marked": 0, "identical": 71 }, + "system_notice.ts": { "marked": 0, "identical": 3 }, + "undo.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 5 } + }, + "ko": { + "admin.ts": { "marked": 0, "identical": 10 }, + "common.ts": { "marked": 12, "identical": 0 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 110, "identical": 3 }, + "login.ts": { "marked": 0, "identical": 3 }, + "nav.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 69 }, + "system_notice.ts": { "marked": 0, "identical": 3 }, + "undo.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 5 } + }, + "nl": { + "admin.ts": { "marked": 0, "identical": 28 }, + "atlas.ts": { "marked": 0, "identical": 1 }, + "backup.ts": { "marked": 0, "identical": 1 }, + "budget.ts": { "marked": 0, "identical": 4 }, + "collab.ts": { "marked": 0, "identical": 6 }, + "collection.ts": { "marked": 0, "identical": 5 }, + "common.ts": { "marked": 12, "identical": 0 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 1 }, + "dayplan.ts": { "marked": 2, "identical": 5 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "files.ts": { "marked": 0, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 6 }, + "journey.ts": { "marked": 115, "identical": 17 }, + "login.ts": { "marked": 0, "identical": 3 }, + "map.ts": { "marked": 0, "identical": 2 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "mobileJourney.ts": { "marked": 0, "identical": 1 }, + "mobileTrip.ts": { "marked": 0, "identical": 4 }, + "nav.ts": { "marked": 0, "identical": 2 }, + "oauth.ts": { "marked": 17, "identical": 2 }, + "packing.ts": { "marked": 0, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 7 }, + "planner.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 15 }, + "roadtrip.ts": { "marked": 0, "identical": 5 }, + "settings.ts": { "marked": 0, "identical": 92 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 2 }, + "storage.ts": { "marked": 0, "identical": 5 }, + "system_notice.ts": { "marked": 0, "identical": 6 }, + "tours.ts": { "marked": 0, "identical": 1 }, + "trip.ts": { "marked": 0, "identical": 5 }, + "undo.ts": { "marked": 0, "identical": 1 }, + "vacay.ts": { "marked": 0, "identical": 6 } + }, + "pl": { + "admin.ts": { "marked": 0, "identical": 25 }, + "atlas.ts": { "marked": 0, "identical": 2 }, + "budget.ts": { "marked": 0, "identical": 3 }, + "common.ts": { "marked": 12, "identical": 0 }, + "dayplan.ts": { "marked": 2, "identical": 1 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "files.ts": { "marked": 0, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 115, "identical": 5 }, + "login.ts": { "marked": 0, "identical": 3 }, + "memories.ts": { "marked": 0, "identical": 1 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "mobileTrip.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "notifications.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 2 }, + "reservations.ts": { "marked": 0, "identical": 6 }, + "settings.ts": { "marked": 0, "identical": 81 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 3 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, + "transport.ts": { "marked": 0, "identical": 1 }, + "trip.ts": { "marked": 0, "identical": 2 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "ru": { - "admin.ts": { "marked": 0, "identical": 13 }, + "admin.ts": { "marked": 0, "identical": 21 }, "common.ts": { "marked": 12, "identical": 0 }, "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 0 }, + "help.ts": { "marked": 0, "identical": 2 }, + "journey.ts": { "marked": 115, "identical": 1 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 10 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 15 }, + "storage.ts": { "marked": 0, "identical": 1 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "sk": { - "admin.ts": { "marked": 0, "identical": 4 }, + "admin.ts": { "marked": 0, "identical": 8 }, "atlas.ts": { "marked": 0, "identical": 1 }, - "journey.ts": { "marked": 0, "identical": 1 }, - "settings.ts": { "marked": 0, "identical": 5 }, - "system_notice.ts": { "marked": 0, "identical": 2 } + "backup.ts": { "marked": 0, "identical": 1 }, + "collab.ts": { "marked": 0, "identical": 1 }, + "collection.ts": { "marked": 0, "identical": 1 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "day.ts": { "marked": 0, "identical": 2 }, + "docsync.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 0, "identical": 9 }, + "oauth.ts": { "marked": 0, "identical": 1 }, + "places.ts": { "marked": 0, "identical": 2 }, + "reservations.ts": { "marked": 0, "identical": 3 }, + "roadtrip.ts": { "marked": 0, "identical": 3 }, + "settings.ts": { "marked": 0, "identical": 12 }, + "share.ts": { "marked": 0, "identical": 1 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 2 }, + "system_notice.ts": { "marked": 0, "identical": 3 } }, "sv": { - "admin.ts": { "marked": 0, "identical": 8 }, - "budget.ts": { "marked": 0, "identical": 4 }, - "journey.ts": { "marked": 110, "identical": 0 }, + "admin.ts": { "marked": 0, "identical": 24 }, + "atlas.ts": { "marked": 0, "identical": 2 }, + "budget.ts": { "marked": 0, "identical": 9 }, + "collection.ts": { "marked": 0, "identical": 1 }, + "dashboard.ts": { "marked": 0, "identical": 1 }, + "dayplan.ts": { "marked": 0, "identical": 2 }, + "files.ts": { "marked": 0, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 6 }, + "inspector.ts": { "marked": 0, "identical": 1 }, + "journey.ts": { "marked": 110, "identical": 18 }, "login.ts": { "marked": 0, "identical": 3 }, + "members.ts": { "marked": 0, "identical": 1 }, + "memories.ts": { "marked": 0, "identical": 1 }, + "mobileCollections.ts": { "marked": 0, "identical": 1 }, + "mobileTrip.ts": { "marked": 0, "identical": 3 }, + "nav.ts": { "marked": 0, "identical": 3 }, + "notifications.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 0, "identical": 3 }, "packing.ts": { "marked": 0, "identical": 1 }, + "reservations.ts": { "marked": 0, "identical": 7 }, "roadtrip.ts": { "marked": 0, "identical": 1 }, - "settings.ts": { "marked": 0, "identical": 38 }, - "system_notice.ts": { "marked": 0, "identical": 2 }, + "settings.ts": { "marked": 0, "identical": 76 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 2 }, + "system_notice.ts": { "marked": 0, "identical": 3 }, + "tours.ts": { "marked": 0, "identical": 1 }, + "transport.ts": { "marked": 0, "identical": 1 }, + "trip.ts": { "marked": 0, "identical": 2 }, "undo.ts": { "marked": 0, "identical": 1 }, - "vacay.ts": { "marked": 0, "identical": 5 } + "vacay.ts": { "marked": 0, "identical": 6 } }, "th": { - "admin.ts": { "marked": 0, "identical": 1 } + "admin.ts": { "marked": 0, "identical": 1 }, + "system_notice.ts": { "marked": 0, "identical": 1 } }, "tr": { - "admin.ts": { "marked": 0, "identical": 4 }, + "admin.ts": { "marked": 0, "identical": 11 }, "collab.ts": { "marked": 0, "identical": 1 }, "common.ts": { "marked": 12, "identical": 0 }, - "journey.ts": { "marked": 110, "identical": 2 }, + "help.ts": { "marked": 0, "identical": 2 }, + "journey.ts": { "marked": 110, "identical": 5 }, "login.ts": { "marked": 0, "identical": 6 }, "memories.ts": { "marked": 0, "identical": 1 }, + "nav.ts": { "marked": 0, "identical": 1 }, "notifications.ts": { "marked": 0, "identical": 1 }, "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 40 }, - "system_notice.ts": { "marked": 0, "identical": 3 }, + "places.ts": { "marked": 0, "identical": 1 }, + "roadtrip.ts": { "marked": 0, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 71 }, + "shared.ts": { "marked": 0, "identical": 1 }, + "storage.ts": { "marked": 0, "identical": 1 }, + "system_notice.ts": { "marked": 0, "identical": 4 }, + "trip.ts": { "marked": 0, "identical": 2 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 3 } }, "uk": { - "admin.ts": { "marked": 0, "identical": 4 }, + "admin.ts": { "marked": 0, "identical": 12 }, "common.ts": { "marked": 12, "identical": 0 }, - "journey.ts": { "marked": 110, "identical": 0 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 110, "identical": 3 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 44 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "nav.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 78 }, + "storage.ts": { "marked": 0, "identical": 1 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "vi": { - "admin.ts": { "marked": 0, "identical": 4 }, - "journey.ts": { "marked": 110, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 3 }, - "system_notice.ts": { "marked": 0, "identical": 1 }, + "admin.ts": { "marked": 0, "identical": 13 }, + "common.ts": { "marked": 0, "identical": 1 }, + "help.ts": { "marked": 0, "identical": 2 }, + "journey.ts": { "marked": 110, "identical": 3 }, + "reservations.ts": { "marked": 0, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 8 }, + "storage.ts": { "marked": 0, "identical": 1 }, + "system_notice.ts": { "marked": 0, "identical": 2 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "zh": { - "admin.ts": { "marked": 0, "identical": 2 }, - "journey.ts": { "marked": 110, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 8 }, - "system_notice.ts": { "marked": 0, "identical": 2 }, + "admin.ts": { "marked": 0, "identical": 3 }, + "help.ts": { "marked": 0, "identical": 1 }, + "journey.ts": { "marked": 110, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 9 }, + "system_notice.ts": { "marked": 0, "identical": 3 }, "vacay.ts": { "marked": 0, "identical": 5 } }, "zh-TW": { - "admin.ts": { "marked": 0, "identical": 11 }, + "admin.ts": { "marked": 0, "identical": 18 }, "common.ts": { "marked": 12, "identical": 0 }, "dayplan.ts": { "marked": 2, "identical": 0 }, - "journey.ts": { "marked": 115, "identical": 0 }, + "help.ts": { "marked": 0, "identical": 3 }, + "journey.ts": { "marked": 115, "identical": 1 }, "login.ts": { "marked": 0, "identical": 3 }, - "oauth.ts": { "marked": 17, "identical": 0 }, - "settings.ts": { "marked": 0, "identical": 44 }, - "system_notice.ts": { "marked": 0, "identical": 4 }, + "nav.ts": { "marked": 0, "identical": 1 }, + "oauth.ts": { "marked": 17, "identical": 1 }, + "settings.ts": { "marked": 0, "identical": 76 }, + "system_notice.ts": { "marked": 0, "identical": 5 }, "undo.ts": { "marked": 0, "identical": 1 }, "vacay.ts": { "marked": 0, "identical": 5 } } diff --git a/shared/scripts/i18n-untranslated.mjs b/shared/scripts/i18n-untranslated.mjs index 020426ca2..32669713e 100644 --- a/shared/scripts/i18n-untranslated.mjs +++ b/shared/scripts/i18n-untranslated.mjs @@ -9,7 +9,9 @@ * marked a declaration carrying `// en-fallback`, the marker a * translator leaves on a string they could not translate yet * identical an unmarked value equal to en's, unless the rule in - * `isInvariant` says the text reads the same in every language + * `isInvariant` says the text reads the same in every language, + * or a translator confirmed it with `// same-as-en` in a + * Latin-script locale (`isExcused`) * * Both counts are held at scripts/i18n-untranslated-baseline.json. The check * fails when either grows past its entry (a file without one may hold none), @@ -28,19 +30,76 @@ * files, or a value the catalogue reader cannot parse is an error, never a * pass. */ +import { asPath, I18N_ROOT, listDomainFiles, listLocales, readCatalog } from './i18n-catalog.mjs'; + import { existsSync, readFileSync, realpathSync, writeFileSync } from 'node:fs'; import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; -import { asPath, I18N_ROOT, listDomainFiles, listLocales, readCatalog } from './i18n-catalog.mjs'; export const BASELINE = join(dirname(fileURLToPath(import.meta.url)), 'i18n-untranslated-baseline.json'); /** - * Names of two or more plain words that read the same in every language. - * One-word names (Mapbox, Immich) and names with an inner capital (MapLibre, - * OpenStreetMap) are already covered by the word rule below. + * Product and service names, which read the same in every language. A value + * is excused for them, never for an ordinary word: German "Status" or French + * "Transport" are the locale's own words only by coincidence, and a one-word + * label copied from en ("Appearance", "Settings") is the commonest untranslated + * string there is. Names with an inner capital (MapLibre, OpenStreetMap) and + * acronyms need no entry, the word rule below already skips them. */ -export const BRAND_NAMES = ['Apple Maps', 'Google Maps', 'Google Places', 'Home Assistant', 'Organic Maps', 'Synology Photos']; +export const BRAND_NAMES = [ + 'Amap', + 'Anthropic', + 'Apple Maps', + 'Atlas', + 'Dawarich', + 'Discord', + 'Docker', + 'Google', + 'Google Maps', + 'Google Places', + 'Home Assistant', + 'Immich', + 'Mapbox', + 'Ntfy', + 'Organic Maps', + 'Polaroid', + 'Synology', + 'Synology Photos', + 'Vacay', + 'Webhook', + 'wanderer', +]; + +/** Unit symbols, short codes rather than words: "{count} km", "{minutes} min". */ +export const UNITS = ['km', 'mi', 'ft', 'min']; + +/** + * Locales written in a script other than Latin. A Latin word left in one of + * them is English whatever the word, so `// same-as-en` is not honoured + * there. Every locale folder must be listed in exactly one of the two lists, + * so a new locale cannot slip past this rule unclassified. + */ +export const NON_LATIN_LOCALES = ['ar', 'gr', 'ja', 'ko', 'ru', 'th', 'uk', 'zh', 'zh-TW']; +export const LATIN_LOCALES = [ + 'az', + 'br', + 'ca', + 'cs', + 'de', + 'en', + 'es', + 'et', + 'fr', + 'hu', + 'id', + 'it', + 'nl', + 'pl', + 'sk', + 'sv', + 'tr', + 'vi', +]; const PLACEHOLDER_RE = /\{[a-zA-Z0-9_]+\}/g; const TAG_RE = /<\/?[a-zA-Z][^>]*>/g; @@ -48,6 +107,15 @@ const TAG_RE = /<\/?[a-zA-Z][^>]*>/g; const ADDRESS_RE = /\S*[/@]\S*/g; // Hyphens join a word: "Check-in", "Wi-Fi" and "Auto-Backup" are one each. const WORD_RE = /\p{L}[\p{L}\p{M}'’-]*/gu; +const escapeRe = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); +// Longest first, so "Google Maps" goes as one name before "Google" could split it. +const NAME_RE = new RegExp( + `(? b.length - a.length) + .map(escapeRe) + .join('|')})(?![\\p{L}\\p{N}])`, + 'gu', +); /** * A word in the sense of the rule: two letters or more and no capital after @@ -58,22 +126,37 @@ const WORD_RE = /\p{L}[\p{L}\p{M}'’-]*/gu; export const isPlainWord = (word) => word.length >= 2 && !/\p{Lu}/u.test(word.slice(1)); /** - * Whether a value equal to en's is legitimately the same text. True when, - * after dropping placeholders, markup, addresses and the brand names above, - * at most one plain word is left: "{count} km", "OAuth", "GPX", "Google Maps", - * "PDF · {size}", "Budget", the sort label "Name (A to Z)". Two plain words or - * more are a phrase, and phrases differ between languages. + * Whether a value equal to en's is legitimately the same text in every + * language. True when, after dropping placeholders, markup, addresses, the + * names in BRAND_NAMES and the UNITS, no plain word is left: "{count} km", + * "OAuth", "GPX", "Google Maps", "Atlas", "PDF · {size}". A single plain word + * is counted like a phrase: "Budget" and "Status" may be the locale's word too, + * and that is for a translator to confirm, not for the rule to assume. */ export function isInvariant(value) { - let text = value.replace(PLACEHOLDER_RE, ' ').replace(TAG_RE, ' ').replace(ADDRESS_RE, ' '); - for (const name of BRAND_NAMES) text = text.split(name).join(' '); - return (text.match(WORD_RE) ?? []).filter(isPlainWord).length <= 1; + const text = value.replace(PLACEHOLDER_RE, ' ').replace(TAG_RE, ' ').replace(ADDRESS_RE, ' ').replace(NAME_RE, ' '); + return !(text.match(WORD_RE) ?? []).some(isPlainWord); +} + +/** Whether `locale` is written in Latin script. Throws for a locale on neither list. */ +export function isLatinLocale(locale) { + if (LATIN_LOCALES.includes(locale)) return true; + if (NON_LATIN_LOCALES.includes(locale)) return false; + throw new Error( + `locale ${locale} is on neither LATIN_LOCALES nor NON_LATIN_LOCALES in scripts/i18n-untranslated.mjs`, + ); } +/** + * Whether an unmarked value equal to en's is excused: it is invariant, or a + * translator marked it `// same-as-en` in a Latin-script locale. + */ +export const isExcused = (value, same, locale) => isInvariant(value) || (same && isLatinLocale(locale)); + /** * Today's counts: `{ [locale]: { [file]: { marked, identical } } }`, only - * non-zero entries. Throws on a locale missing one of en's files or a value - * the reader cannot parse. + * non-zero entries. Throws on a locale missing one of en's files, a locale + * on neither script list or a value the reader cannot parse. */ export function countUntranslated(root = I18N_ROOT) { const locales = listLocales(root); @@ -82,6 +165,8 @@ export function countUntranslated(root = I18N_ROOT) { const enValues = new Map(enFiles.map((f) => [f, new Map(readCatalog('en', f, root).map((e) => [e.key, e.value]))])); const counts = {}; for (const locale of locales) { + // Classify every folder first: an unlisted locale is an error, not a pass. + isLatinLocale(locale); if (locale === 'en') continue; const files = new Set(listDomainFiles(locale, root)); for (const file of enFiles) { @@ -89,9 +174,9 @@ export function countUntranslated(root = I18N_ROOT) { const en = enValues.get(file); let marked = 0; let identical = 0; - for (const { key, value, marked: isMarked } of readCatalog(locale, file, root)) { + for (const { key, value, marked: isMarked, same } of readCatalog(locale, file, root)) { if (isMarked) marked++; - else if (en.get(key) === value && !isInvariant(value)) identical++; + else if (en.get(key) === value && !isExcused(value, same, locale)) identical++; } if (marked || identical) (counts[locale] ??= {})[file] = { marked, identical }; } @@ -191,7 +276,9 @@ const total = (map, kind) => // Compared by real path, so the check still runs when the script is started through a symlink. const isCli = - Boolean(process.argv[1]) && existsSync(process.argv[1]) && realpathSync(process.argv[1]) === fileURLToPath(import.meta.url); + Boolean(process.argv[1]) && + existsSync(process.argv[1]) && + realpathSync(process.argv[1]) === fileURLToPath(import.meta.url); if (isCli) { try { const counts = countUntranslated(); @@ -207,7 +294,9 @@ if (isCli) { console.error('Translate the new strings (shared/CLAUDE.md: an English placeholder is not acceptable).'); } if (lowerable && !process.argv.includes('--update')) { - console.log(`${lowerable} baseline entr${lowerable === 1 ? 'y is' : 'ies are'} above today's count: run with --update to lower.`); + console.log( + `${lowerable} baseline entr${lowerable === 1 ? 'y is' : 'ies are'} above today's count: run with --update to lower.`, + ); } console.log( `untranslated: ${total(counts, 'marked')} marked en-fallback, ${total(counts, 'identical')} unmarked English copies`, diff --git a/shared/src/i18n/i18n-catalog.spec.ts b/shared/src/i18n/i18n-catalog.spec.ts index 83d9d9782..d84634197 100644 --- a/shared/src/i18n/i18n-catalog.spec.ts +++ b/shared/src/i18n/i18n-catalog.spec.ts @@ -11,7 +11,7 @@ import { describe, it, expect } from 'vitest'; */ const ROOT = new URL('../../scripts/fixtures/i18n/', import.meta.url); -type Entry = { key: string; value: string; marked: boolean; line: number }; +type Entry = { key: string; value: string; marked: boolean; same: boolean; line: number }; describe('i18n catalogue reader', () => { it('reads single-line, wrapped, double-quoted and escaped values with their markers', () => { @@ -22,13 +22,15 @@ describe('i18n catalogue reader', () => { " 'Two, wrapped', // en-fallback", ` 'a.three': "It's",`, " 'a.four': 'Don\\'t \\u00e9',", + " 'a.five': 'Status', // same-as-en", ].join('\r\n'), ); - expect(entries.map((e: Entry) => [e.key, e.value, e.marked])).toEqual([ - ['a.one', 'One', false], - ['a.two', 'Two, wrapped', true], - ['a.three', "It's", false], - ['a.four', "Don't é", false], + expect(entries.map((e: Entry) => [e.key, e.value, e.marked, e.same])).toEqual([ + ['a.one', 'One', false, false], + ['a.two', 'Two, wrapped', true, false], + ['a.three', "It's", false, false], + ['a.four', "Don't é", false, false], + ['a.five', 'Status', false, true], ]); }); diff --git a/shared/src/i18n/i18n-untranslated.spec.ts b/shared/src/i18n/i18n-untranslated.spec.ts index bb295a48d..e9889b062 100644 --- a/shared/src/i18n/i18n-untranslated.spec.ts +++ b/shared/src/i18n/i18n-untranslated.spec.ts @@ -1,6 +1,7 @@ import { compare, countUntranslated, + isExcused, isInvariant, lowered, readBaseline, @@ -14,7 +15,7 @@ import { describe, it, expect } from 'vitest'; * The untranslated-strings ratchet (scripts/i18n-untranslated.mjs). The * fixtures under scripts/fixtures/ hold a two-locale table with one marked * fallback, two unmarked English copies and the invariant strings the rule - * excuses. + * excuses; i18n-words/ holds the one-word cases per script. */ const FIXTURES = new URL('../../scripts/fixtures/', import.meta.url); const ROOT = new URL('i18n/', FIXTURES); @@ -22,24 +23,32 @@ const ROOT = new URL('i18n/', FIXTURES); type Counts = Record>; describe('i18n untranslated ratchet', () => { - it('excuses placeholders, codes, names and single words, never a phrase', () => { + it('excuses placeholders, codes, units and names, never an ordinary word or a phrase', () => { for (const same of [ '{count} km', + '{minutes} min', 'GPX', 'OAuth', 'Google Maps', + 'Atlas', + 'Mapbox (3D)', + 'Dawarich {version}', 'PDF · {size}', - 'Budget', - 'Name (A\u2013Z)', - 'Check-in', 'https://ntfy.sh', 'your@email.com', - 'Update → v{version}', '{name}', ]) { expect([same, isInvariant(same)]).toEqual([same, true]); } for (const copy of [ + 'Settings', + 'Appearance', + 'Readability', + 'Budget', + 'Check-in', + 'Atlases', + 'Name (A\u2013Z)', + 'Update → v{version}', 'Trip settings', 'Remove {count} items', 'Open in Google Maps', @@ -50,6 +59,25 @@ describe('i18n untranslated ratchet', () => { } }); + it('honours // same-as-en in a Latin-script locale only, and refuses an unlisted locale', () => { + expect(isExcused('Status', true, 'de')).toBe(true); + expect(isExcused('Status', false, 'de')).toBe(false); + expect(isExcused('Status', true, 'ja')).toBe(false); + expect(isExcused('GPX', false, 'ja')).toBe(true); + expect(() => isExcused('Status', true, 'xx')).toThrow(/neither LATIN_LOCALES nor NON_LATIN_LOCALES/); + }); + + it('counts a one-word English copy: Settings in fr, Appearance in ja', () => { + expect(countUntranslated(new URL('i18n-words/', FIXTURES))).toEqual({ + fr: { 'a.ts': { marked: 0, identical: 2 } }, + ja: { 'a.ts': { marked: 0, identical: 2 } }, + }); + }); + + it('fails closed on a locale folder on neither script list', () => { + expect(() => countUntranslated(new URL('i18n-unlisted/', FIXTURES))).toThrow(/locale xx is on neither/); + }); + it('counts marked fallbacks and unmarked English copies per locale and file', () => { expect(countUntranslated(ROOT)).toEqual({ de: { 'a.ts': { marked: 1, identical: 2 } } }); });