Skip to content

i18n: translate the auth gate strings and fill the Vietnamese gaps - #1865

Merged
giswqs merged 1 commit into
mainfrom
i18n-auth-terrain-catalogs
Aug 12, 2026
Merged

i18n: translate the auth gate strings and fill the Vietnamese gaps#1865
giswqs merged 1 commit into
mainfrom
i18n-auth-terrain-catalogs

Conversation

@giswqs

@giswqs giswqs commented Aug 12, 2026

Copy link
Copy Markdown
Member

Audits the message catalogs against en.json and fills every genuine gap. All
eighteen locales are now at 100% key coverage.

What was missing, and which feature shipped it

Keys Shipped by Missing from
auth.unavailableTitle, auth.unavailableDescription, auth.retry, auth.signInTitle, auth.signInDescription, auth.signIn, auth.signOut, auth.account #1853, the optional Auth0/Clerk sign-in gate all 17 non-English catalogs
terrainSettings.sourceLabel, sourceDescription, sourcePlaceholder, localSourceLabel, localSourceDescription, useCog, sourceLoading, restoreDefaultSource, sourceError, sourceErrorEmpty, sourceErrorBand, sourceErrorProjection, sourceErrorDetail #1862, the COG DEM terrain source vi only, which landed in #1863 one commit earlier
map.directionsMode.waypointCount_zero the directions panel vi only

Nothing in CI catches this. The parity test (tests/i18n-catalogs.test.ts)
forbids extra keys and placeholder drift; a key absent from a catalog just
falls back silently to English at runtime.

Six vi values were also still English prose rather than translations, so they
are translated here too: browser.libraryLayerNeedsDesktop, huggingFace.hint,
huggingFace.signedInAs, huggingFace.layerUnavailable,
sourceCoop.searchPlaceholder, gps.altitudeValue. Every other locale already
translates all six.

Apparent gaps that are correct as-is

Please do not file these as bugs; a naive key diff surfaces them, and "fixing"
either one would be wrong:

  • zh / ja / ko / id / th / vi have no _one forms. Those
    languages have a single CLDR plural category (other). Adding _one gives
    i18next a form it will never select. In particular every one of vi's ~79
    plural groups looks like a mismatch against English's _one/_other pair and
    none of them is.
  • ar and ru carry _zero / _two / _few / _many that English does
    not.
    Those are the categories their languages require. The parity test
    normalizes plural suffixes before comparing precisely so these do not read as
    extra keys.
  • map.directionsMode.waypointCount_zero exists outside any single-plural
    language's CLDR set.
    en defines it as an explicit wording override that
    drops {{count}} entirely ("No waypoints placed yet"), and i18next honors an
    explicit _zero in every language, so every locale carries it. vi was the
    one that did not, which is why it is added here.

Terminology

Translated against each catalog's established vocabulary rather than cold, so
the new strings match what is already on screen:

  • the noun for "deployment" comes from each catalog's gallery.errorNotConfigured
    (de Bereitstellung, es implementación, fr déploiement, ru развёртывание,
    ja デプロイ, ar النشر, ka განთავსება, th การติดตั้งใช้งาน, and so on)
  • sign-in and account vocabulary from share.step1Description,
    huggingFace.signedInAs and share.openAccountSettings, which keeps each
    locale's existing choice between "sign in" and "log in" wording
  • "Try again" from about.tryAgain / errorBoundary.tryAgain
  • the "could not reach the service" construction from addData.common.networkFailure

terrainSettings.sourcePlaceholder stays https://example.com/dem.tif in vi,
matching how every locale leaves example URLs untranslated.

Verification

  • python3 audit.py reports 100% for all eighteen locales, no missing keys, no
    extra keys, no plural-set mismatches
  • npm run test:frontend passes (5861 passed, 1 skipped), including
    i18n-catalogs, i18n-languages and add-data-i18n
  • pre-commit run --files apps/geolibre-desktop/src/i18n/locales/*.json passes,
    including the npm build hook
  • the diff is purely additive apart from the six replaced English vi values:
    190 insertions, 6 deletions

Notes for review

These translations were authored against the existing catalogs' terminology,
not by native speakers, so corrections from native speakers are very welcome, in
line with how docs/i18n.md already frames the non-English catalogs.

Two things found along the way and deliberately not folded into this PR:

  1. vi.json's top-level key order does not follow en.json the way the other
    seventeen catalogs do, so a naive merge reshuffles about 4,800 lines. New
    keys here were inserted in place to keep the diff readable. Happy to
    normalize the ordering in a separate, content-preserving commit if you want
    it.
  2. vi.json carries a handful of machine-translation artifacts from its initial
    import, for example planetSwitcher.io and fileNamePrompt.label both
    holding the Esri File Geodatabase description, planetSwitcher.titan holding
    the Martin/PostGIS text, planetSwitcher.mercury rendered as the metal rather
    than the planet, and toolbar.conversion.bandOutOfRange using ban nhạc
    (a musical band) for a raster band. Those are value bugs rather than coverage
    gaps and want a native speaker pass.

Separately, catalog coverage at 100% does not mean the UI is fully translated:
roughly 73 strings across 17 components are never wrapped in t() and so render
English in every locale, concentrated in RasterSymbologySection.tsx,
ModelBuilderDialog.tsx and ManagePluginsDialog.tsx. docs/i18n.md frames
i18n as deliberately incremental, so that migration is left for its own PR.

Summary by CodeRabbit

  • New Features
    • Added localized authentication messages covering sign-in, sign-out, account access, unavailable services, retry actions, and authentication requirements across Arabic, German, Spanish, Persian, French, Hindi, Indonesian, Italian, Japanese, Georgian, Korean, Dutch, Portuguese, Russian, Thai, Turkish, Vietnamese, and Chinese.
    • Expanded Vietnamese localization for saved layers, GPS altitude, data sources, uploads, directions, and terrain source configuration, including loading states and validation messages.

The Auth0/Clerk sign-in gate (#1853) added eight auth.* keys and the COG
DEM terrain source (#1862) added thirteen terrainSettings.* keys, but only
en.json carried them, so every other locale fell back to English at
runtime. Nothing in CI catches that: the parity test forbids extra keys
and placeholder drift, not missing ones.

Fill auth.* in all seventeen non-English catalogs, and fill the
terrainSettings.* source keys plus the map.directionsMode.waypointCount
zero override in vi.json, which shipped one commit before that feature.
Also translate six vi strings that were left as English prose.

Terminology follows each catalog's existing wording: the noun for
'deployment' is taken from gallery.errorNotConfigured, the sign-in and
account vocabulary from share.step1Description, huggingFace.signedInAs
and share.openAccountSettings, and 'Try again' from about.tryAgain.
Copilot AI lite review requested due to automatic review settings August 12, 2026 17:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 39bfdf8d-215c-4aef-9a1c-516a65cc61c4

📥 Commits

Reviewing files that changed from the base of the PR and between 3d3e373 and 8c3f153.

📒 Files selected for processing (18)
  • apps/geolibre-desktop/src/i18n/locales/ar.json
  • apps/geolibre-desktop/src/i18n/locales/de.json
  • apps/geolibre-desktop/src/i18n/locales/es.json
  • apps/geolibre-desktop/src/i18n/locales/fa.json
  • apps/geolibre-desktop/src/i18n/locales/fr.json
  • apps/geolibre-desktop/src/i18n/locales/hi.json
  • apps/geolibre-desktop/src/i18n/locales/id.json
  • apps/geolibre-desktop/src/i18n/locales/it.json
  • apps/geolibre-desktop/src/i18n/locales/ja.json
  • apps/geolibre-desktop/src/i18n/locales/ka.json
  • apps/geolibre-desktop/src/i18n/locales/ko.json
  • apps/geolibre-desktop/src/i18n/locales/nl.json
  • apps/geolibre-desktop/src/i18n/locales/pt.json
  • apps/geolibre-desktop/src/i18n/locales/ru.json
  • apps/geolibre-desktop/src/i18n/locales/th.json
  • apps/geolibre-desktop/src/i18n/locales/tr.json
  • apps/geolibre-desktop/src/i18n/locales/vi.json
  • apps/geolibre-desktop/src/i18n/locales/zh.json

📝 Walkthrough

Walkthrough

The desktop localization files now include authentication strings in 17 locales. The Vietnamese locale also adds or updates translations for desktop requirements, directions, terrain COG sources, Source Coop, Hugging Face, and upload status.

Changes

Authentication locale coverage

Layer / File(s) Summary
Authentication translation strings
apps/geolibre-desktop/src/i18n/locales/{ar,de,es,fa,fr,hi,id,it,ja,ka,ko,nl,pt,ru,th,tr,zh}.json
Added localized messages for authentication availability, sign-in, sign-out, retry, account access, and sign-in requirements.

Vietnamese locale coverage

Layer / File(s) Summary
Vietnamese desktop strings
apps/geolibre-desktop/src/i18n/locales/vi.json
Added or updated translations for saved-layer requirements, GPS altitude, zero-waypoint directions, terrain COG sources and validation errors, Source Coop, Hugging Face, and upload status.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: thangqd

Poem

A rabbit hops through translated skies,
Auth words bloom in many eyes.
Vietnamese paths gain signs anew,
Terrain and uploads speak more true.
“Hop, hop!” says Bun, “the locales grew!”

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the two main changes: translating authentication gate strings and completing missing Vietnamese translations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch i18n-auth-terrain-catalogs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Cloudflare PR preview

Item Value
Site https://38477e88.geolibre-preview.pages.dev
Demo app https://38477e88.geolibre-preview.pages.dev/demo/
Commit 8c3f153

@github-actions

Copy link
Copy Markdown
Contributor

Code review

Bugs: None found. All 8 auth.* keys and (in vi.json) the 13 terrainSettings.* keys plus waypointCount_zero match en.json's key set exactly across all 17 non-English catalogs, with no duplicate top-level keys and no dropped or added {{placeholder}} tokens in any of the new strings.

Security: None found. This is a static JSON translation catalog change with no code execution paths, user input handling, or secrets involved.

Performance: Not applicable — translation-only JSON additions have no runtime performance impact.

Quality:

  • Low confidence: the new auth block is appended at the very end of all 16 non-vi catalogs (after the comments section), but in en.json auth sits well before comments (line ~1615 vs. ~5484). Key order is functionally irrelevant to i18next and isn't checked by tests/i18n-catalogs.test.ts, but it's a minor inconsistency given the PR's own stated care about mirroring en.json's structure (as discussed for vi.json's pre-existing disorder in the PR body).
  • Low confidence, doc-only: the PR body's table claims auth.* was "missing from all 17 non-English catalogs," but vi.json already had a complete auth block before this PR (visible at lines 1579–1588, untouched by this diff) — the diff correctly does not touch vi.json's auth section, so the code is right, just the PR description overstates by one locale.

CLAUDE.md: No violations. This PR only touches apps/geolibre-desktop/src/i18n/locales/*.json, matching the documented i18n convention (en.json as source of truth, t()-driven catalogs); no other guarded files (whitebox catalogs, CSP allowlists, mirrored constants, etc.) were touched.

I verified the auth.* keys are actually consumed by real components (ClerkGate.tsx, Auth0Gate.tsx), so these aren't orphaned strings, and spot-checked the Vietnamese translations (altitudeValue, waypointCount_zero, huggingFace.*, sourceCoop.searchPlaceholder) against their English source for meaning and placeholder fidelity — all consistent. No inline comments posted; nothing here rises above a very minor, non-actionable nit.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 GitHub Pages PR preview

Item Value
Site https://opengeos.org/pages-preview/GeoLibre/pr-1865/
Demo app https://opengeos.org/pages-preview/GeoLibre/pr-1865/demo/
Commit 8c3f153

Note

GitHub Pages built this preview successfully, but its serving edge returned HTTP 403 when checked. The links may still be propagating.

@giswqs
giswqs merged commit eeea2d5 into main Aug 12, 2026
18 checks passed
@giswqs
giswqs deleted the i18n-auth-terrain-catalogs branch August 12, 2026 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants