mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-06 03:14:00 +00:00
refactor(i18n): key messages by English text; add Russian
Replace the semantic keys with the English source text, so code reads as the
UI does and English needs no catalog: t('Save keys'), tn(count, one, other)
for plurals, msg() for text stored in data, and bare data-i18n* markup that
translates the element's own English. Other languages are one flat JSON each.
- Simplify src/i18n: drop namespaces, the configurable locale pair
(GEV_DEFAULT_LOCALE / GEV_SECONDARY_LOCALE) and its build defines. Locale
comes from ?lang=, the stored choice, then browser languages.
- Add scripts/i18n.mjs (npm run i18n): extracts every message from t/tn/msg
and markup, and fails on missing, unused, placeholder-mismatched or
wrongly-shaped plural entries. npm test runs it via catalog.test.mjs.
- Add Russian (src/i18n/locales/ru.json, 833 messages), started from the
community catalog in #312 and reviewed against the current English.
- Fix data-i18n placed on parents that would wipe their children (cockpit
LEVEL and local weather cells, first-run EXPLORE MANUALLY tile), and a
doubled degree sign in the TRACK ACQUIRED signal.
- Rewrite docs/TRANSLATORS.md for the new workflow; drop sections the earlier
merge resurrected in docs/CURRENT-STATE.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
dfbaeafbd8
commit
13efd411b6
112 files changed
+4419
-4856
No files matched your search
+10
-23
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
- Interface localization, starting with Russian. UI text is marked with
|
||||
`t()`, `tn()` (plurals) and `msg()` in code and `data-i18n*` in markup, keyed
|
||||
by the English text itself; each language is one flat JSON catalog
|
||||
(`src/i18n/locales/ru.json`). The language comes from `?lang=`, the EN/RU
|
||||
switch in the Visual Presets dock, then the browser language; English stays
|
||||
the default and the fallback. `npm run i18n`, also run by `npm test`, fails on
|
||||
missing, unused or broken translations. Built on the i18n foundation by
|
||||
@meirm (#601), with the Russian catalog started from #312.
|
||||
|
||||
- Treat explicitly current, complete empty vessel coverage as a successful update,
|
||||
clearing obsolete contacts while retaining stale or incomplete snapshots.
|
||||
|
||||
@@ -318,29 +327,6 @@
|
||||
keeps frame time with ALPR on within a few percent of ALPR off, seats nearby
|
||||
badges on the rendered surface and says when no loaded camera is on screen.
|
||||
|
||||
## Internationalization foundation
|
||||
|
||||
- Add the locale core (`src/i18n/`): configurable locale pair
|
||||
(`GEV_DEFAULT_LOCALE` / `GEV_SECONDARY_LOCALE`, validated against the
|
||||
shipped catalogs), guarded preference storage, a one-shot `?lang=`
|
||||
override, and `<html lang>`/`<html dir>` metadata. English is the only
|
||||
shipped locale — the built-in pair degenerates to en-only and the dock
|
||||
language switch renders a single EN button — and English behavior is
|
||||
byte-identical to before.
|
||||
- Extract all application-owned presentation text into four English
|
||||
catalogs (`shell`/`cockpit`/`layers`/`setup`) consumed through `t()` call
|
||||
sites, `data-i18n*` template attributes, and the runtime locale selector;
|
||||
complete the duplicate `data-i18n` split on the first-run EXPLORE
|
||||
MANUALLY tile (the subcopy was wiped in every locale).
|
||||
- Enforce the parity gates every additional locale must pass (key /
|
||||
placeholder / plural-shape parity, markup coverage, repair-pass anchors).
|
||||
Additional locales ship as stacked follow-up PRs, one per locale, via the
|
||||
locale-addition recipe in `docs/TRANSLATORS.md` (Spanish is first).
|
||||
|
||||
- Let CLI tools, development launchers and the setup doctor use an explicit project directory while retaining their existing default paths.
|
||||
|
||||
- Split application scene, controls, catalog, tools and HTML into reusable components; configure application request services and sources without changing global fetch. Preserve standalone markup and voice behavior. Explicit annotation navigation may resolve a distant named target.
|
||||
|
||||
- CCTV cameras whose bearing is a guess now say so. Packs mark bearings derived
|
||||
from a hash of the camera id as `headingConfidence: 'low'`, but nothing read the
|
||||
flag, so roughly 70% of a default catalog rendered like surveyed facings. The HUD
|
||||
@@ -789,6 +775,7 @@ Analyst records for loaded satellites, datacenters and dams, with explicit bound
|
||||
- Separate navigation, share restoration, visual settings and panel state into focused UI owners with explicit dependencies and terminal cleanup.
|
||||
|
||||
- Separate layer lifecycle transactions from panel construction and render/detection reactions; retain existing transition and refresh behavior.
|
||||
|
||||
- Let CLI tools, development launchers and the setup doctor use an explicit project directory while retaining their existing default paths.
|
||||
|
||||
- Split application scene, controls, catalog, tools and HTML into reusable components; configure application request services and sources without changing global fetch. Preserve standalone markup and voice behavior. Explicit annotation navigation may resolve a distant named target.
|
||||
|
||||
Reference in new issue
Block a user