Skip to content

i18n: translate the startup project and ArcGIS sublayer strings - #1811

Merged
giswqs merged 4 commits into
mainfrom
i18n-startup-arcgis-sublayers
Aug 10, 2026
Merged

i18n: translate the startup project and ArcGIS sublayer strings#1811
giswqs merged 4 commits into
mainfrom
i18n-startup-arcgis-sublayers

Conversation

@giswqs

@giswqs giswqs commented Aug 9, 2026

Copy link
Copy Markdown
Member

Brings every locale back to full coverage after two features shipped English-only strings, then fixes the two problems that surfaced while doing it. Three commits, reviewable in order.

1. Translate the startup project and ArcGIS sublayer strings

Two features landed 18 new en.json keys, leaving all 17 non-English catalogs behind.

Keys Shipped by
addData.arcgis.retrieveSublayers, retrievingSublayers, availableSublayers, noSublayersFound, retrieveError, errorMapServiceUrl ArcGIS MapServer sublayer browsing (#1789)
settings.section.startup, settings.startup.title, description, mode.{default,last,specific}, modeHint.{default,last}, chooseProject, noProjectSelected, selectError, loadWarning Native startup project preferences (#1810)

Every locale was missing exactly the same 18 keys, so none of this is a per-language gap.

2. Re-sort every catalog into en.json key order

Inserting keys at their en.json sibling position is supposed to produce a purely additive diff. It no longer did: the catalogs had drifted out of en.json order as features landed keys in different places, so an ordered insert wanted to move ~5,600 lines of unrelated content.

This commit does that realignment on its own, with no content change. Only key order moves. Locale-only keys (the extra plural forms ru and ar need) anchor on the first en key sharing their plural base, so each plural group stays contiguous. Verified mechanically: the flattened key/value maps are byte-identical before and after, and every catalog now matches en.json order.

Separating it keeps commits 1 and 3 additive and reviewable.

3. Translate the review comments feature

100% catalog coverage is not the same as a translated UI. The comments panel, thread cards, and Add Comment dialog rendered ~39 strings outside t(), so that feature stayed English in every locale no matter how complete the catalogs were. This wraps them and translates them across all 17.

Existing keys are reused rather than duplicated: comments.title, comments.defaultAuthorName, collaborate.sessionCode, collaborate.copied, collaborate.connecting, and common.cancel.

Two notes for reviewers:

  • Counts take {{count}} but no plural suffix. In filterOpen / filterResolved / filterAll / liveSync the number sits in parentheses and no noun agrees with it, so one form is correct in every language. i18next falls back to the unsuffixed key when no _one / _other exists.
  • postingAs uses <Trans> to keep the author name inside <strong>, so word order stays translatable rather than being concatenated around the tag.

Apparent gaps that are correct as-is

Please do not "fix" these; they are deliberate and the parity test normalizes for them:

  • zh / ja / ko / id / th carry no _one forms. Those languages have a single CLDR plural category (other). Adding _one would give i18next a form it can never select.
  • ar carries _zero / _two / _few / _many, and ru carries _few / _many. English ships only _one / _other; those languages need more.
  • map.directionsMode.waypointCount_zero exists in every locale. English itself defines an explicit _zero override (a wording that drops {{count}}), and i18next honors an explicit _zero in any language.

Two more things that look like gaps but are not, both found while scanning for un-migrated strings:

  • SectionErrorBoundary's label prop is deliberately English. It is a stable identifier that lands in diagnostics records and bug reports. The user-facing name is the separate displayName prop, and all 23 call sites in DesktopShell.tsx already pass a translated one.
  • Format names stay untranslated (GeoJSON, GeoParquet, GeoPackage, JPEG), as do the Promise<…> type parameters that a naive >text< scan reports as JSX text.

Translation notes

Terminology follows what each catalog already uses rather than a fresh machine pass:

  • The ArcGIS strings reuse each catalog's existing addData.arcgis.sublayers ("Unterebenen", "Subcapas", "Подслои", "子图层", …) and mapServiceLayer wording, and mirror the parallel phrasing already at addData.wms.retrieving and addData.wms.retrieveError.
  • "Workspace" reuses each catalog's rendering from shell.workspaceTitle / settings.layout.description (Arbeitsbereich, espacio de trabajo, espace de travail, area di lavoro, рабочее пространство, 工作区, ワークスペース, 작업 공간, مساحة العمل, …).
  • "No project selected" follows the shape of addData.common.noFileSelected and addData.gdb.noFolderSelected.
  • Quotation marks match each catalog's existing convention: „…“ (de, ka), «…» (es, fr, it, ru, ar, fa), “…” (pt, zh, ko, tr, hi, id, th), ‘…’ (nl), 「…」 (ja).

Verification

  • scripts/audit.py: 100% (4805/4805) for all 17 locales, no extra keys, no plural-set mismatches
  • npm run test:frontend: 5600 tests, 0 failures
  • npm run typecheck: clean
  • pre-commit run --files <changed>: passed, including the npm build hook
  • Driven in a real browser against the built app in German and Arabic: panel, thread card, resolved state, and Add Comment dialog all render translated, RTL mirrors correctly, <strong> survives the postingAs interpolation, 0 console errors

Still out of scope

Some on-map MapLibre control strings ("Enter fullscreen", "Layer Control", "Toggle attribution") come from the upstream maplibre-gl-* packages and are not reachable from GeoLibre's catalogs. Translating those means changing those packages.

Review welcome

These translations are authored against the existing catalogs' terminology, not by native speakers. Corrections are very welcome, particularly on the settings.startup wording, where "workspace" versus "project" is a distinction each language draws differently.

Summary by CodeRabbit

  • New Features
    • Added translated startup settings across supported languages, including default workspace, last project, and specific project options.
    • Added localized project selection, unavailable-project, fallback, and Updates settings messages.
    • Added localized ArcGIS MapServer sublayer retrieval, validation, loading, empty-state, and error messages.
    • Expanded translations for OGC Features, plugins, imports, exports, dashboards, raster tools, and catalogs.
    • Localized collaborative comments, live sessions, replies, filters, anchors, and thread actions.

Bring all 17 non-English catalogs back to 100% key coverage after the
native startup project preferences (#1810) and the ArcGIS MapServer
sublayer browser (#1789) shipped 18 new en.json keys.

Keys are inserted in en.json sibling order, so every catalog diff is
additive.
Copilot AI lite review requested due to automatic review settings August 9, 2026 23:42

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 9, 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: cadb2155-a8e0-423c-ad48-5849c54804e5

📥 Commits

Reviewing files that changed from the base of the PR and between 1045e53 and da351f1.

📒 Files selected for processing (1)
  • apps/geolibre-desktop/src/i18n/locales/id.json

📝 Walkthrough

Walkthrough

The PR expands localization catalogs across desktop workflows and replaces hardcoded comment UI text with translation keys. It adds strings for data sources, startup projects, plugins, raster tools, exports, dashboards, sharing, and collaboration.

Changes

Localization and comment UI

Layer / File(s) Summary
Comment component localization
apps/geolibre-desktop/src/components/comments/*, apps/geolibre-desktop/src/i18n/locales/en.json
Comment dialogs, threads, and panels use localized labels, anchor descriptions, author messages, session states, filters, and thread actions.
Feature and startup settings strings
apps/geolibre-desktop/src/i18n/locales/*.json
Locales add OGC API Features, ArcGIS sublayer, startup-project, sharing, and ArcGIS import diagnostic strings.
Plugin, raster, dashboard, and export strings
apps/geolibre-desktop/src/i18n/locales/*.json
Locales add translations for grid and catalog plugins, raster and NetCDF tools, dashboard aggregations, KML errors, and related UI sections. Existing blocks are reordered or relocated.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested reviewers: thangqd

Poem

A rabbit checks each translated line,
Comments and controls now align.
Sublayers load, projects start,
Catalogs and tools gain every part.
“Hop,” says the rabbit, “the strings are fine!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies two significant translation changes, but it does not mention the broader locale coverage and comments localization.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch i18n-startup-arcgis-sublayers

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

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🔍 Cloudflare PR preview

Item Value
Site https://e01f841c.geolibre-preview.pages.dev
Demo app https://e01f841c.geolibre-preview.pages.dev/demo/
Commit da351f1

Comment thread apps/geolibre-desktop/src/i18n/locales/id.json Outdated
@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Code review

Bugs: None found. All 17 locale catalogs add the same 18 keys at the same sibling position as en.json, with matching structure (mode/modeHint sub-objects, no stray/missing keys), correct comma placement, and no interpolation placeholders introduced. No JSON structural issues spotted in the diff hunks.

Security: None applicable — this is static, non-executable translation data with no user input or code paths affected.

Performance: None — purely additive JSON key/value pairs; negligible bundle size impact.

Quality:

  • id.json: the new settings.section.startup nav label "Awal Mula" reads as a narrative "origin/beginning" phrase rather than a short settings-nav label, and diverges from this catalog's existing convention of using "Mulai" for start/startup concepts elsewhere in the file. Low confidence, style-only nit; posted inline with a suggestion.
  • Spot-checked translations across Arabic, German, Spanish, French, Hindi, Japanese, Chinese, Russian, Italian, Turkish, and others for the ArcGIS sublayer strings and the startup-project settings strings — terminology and phrasing consistently match each catalog's pre-existing conventions (e.g. retrieving/retrieveError ellipsis style, "workspace" wording reused from shell.workspaceTitle), as the PR description claims.

CLAUDE.md: Adherent — uses en.json as source of truth, keeps the diff purely additive (matches the "insert at en.json sibling position" convention), and doesn't touch any non-i18n code. No _one/plural-form or placeholder drift observed.

Overall this is a clean, mechanical translation-parity PR; the single nit raised is a low-confidence style suggestion, not a defect.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

🔍 GitHub Pages PR preview

Item Value
Site https://opengeos.org/pages-preview/GeoLibre/pr-1811/
Demo app https://opengeos.org/pages-preview/GeoLibre/pr-1811/demo/
Commit da351f1

Note

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

The catalogs had drifted out of en.json order as features landed keys in
different places, so an ordered insert could no longer produce a purely
additive diff. This re-sorts all 17 into en.json order.

Content is unchanged: only key order moves. Locale-only keys (the extra
plural forms ru and ar need) anchor on the first en key sharing their
plural base, keeping each plural group contiguous.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/geolibre-desktop/src/i18n/locales/id.json`:
- Around line 1699-1700: Update the Indonesian `startup` translation in the
locale settings section to use an application-startup label, preferably `Saat
Memulai` or the approved equivalent `Pengaktifan`, replacing `Awal Mula` while
leaving `updates` unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cf5fb7c4-cb50-4377-9d73-00682f874854

📥 Commits

Reviewing files that changed from the base of the PR and between 337e06c and d7f8b60.

📒 Files selected for processing (17)
  • 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/zh.json

Comment thread apps/geolibre-desktop/src/i18n/locales/id.json Outdated
giswqs added 2 commits August 9, 2026 19:56
The comments panel, thread cards, and Add Comment dialog rendered ~39
strings outside t(), so they stayed English in every locale even at 100%
catalog coverage. This wraps them and translates them across all 17.

Existing keys are reused rather than duplicated: comments.title,
comments.defaultAuthorName, collaborate.sessionCode, collaborate.copied,
collaborate.connecting, and common.cancel.

Counts interpolate with {{count}} but take no plural suffix: the number
sits in parentheses and no noun agrees with it, so a single form is
correct in every language.

Verified in a browser against the built app in German and Arabic,
including RTL mirroring and the <strong> interpolation in postingAs.
- id: use "Saat Memulai" for settings.section.startup instead of "Awal
  Mula". "Awal Mula" is a set phrase meaning "origin"/"the very
  beginning" rather than application startup. "Saat Memulai" matches the
  siblings already in this section (Title Case, e.g. "Tata Letak",
  "Penyedia AI") and the startup strings added in this PR,
  settings.startup.title "Proyek saat memulai" and the description
  "...saat aplikasi native dimulai".

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/geolibre-desktop/src/i18n/locales/it.json (1)

486-490: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use sottolivelli consistently for ArcGIS MapServer sublayers.

The surrounding keys use sottolivelli, but these strings use generic livelli. This can make the action and error messages refer to top-level map layers instead of MapServer sublayers.

Proposed wording
-      "retrieveSublayers": "Sfoglia livelli",
+      "retrieveSublayers": "Sfoglia sottolivelli",
...
-      "noSublayersFound": "Questo servizio mappa non ha dichiarato alcun livello.",
-      "retrieveError": "Impossibile recuperare i livelli del servizio mappa.",
+      "noSublayersFound": "Questo servizio mappa non ha dichiarato alcun sottolivello.",
+      "retrieveError": "Impossibile recuperare i sottolivelli dal servizio mappa.",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/geolibre-desktop/src/i18n/locales/it.json` around lines 486 - 490,
Update the Italian values for retrieveSublayers, retrievingSublayers, and
retrieveError to consistently use “sottolivelli” instead of the generic
“livelli,” while preserving the existing meaning and formatting of each message.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/geolibre-desktop/src/i18n/locales/es.json`:
- Around line 3277-3298: Update the Spanish STAC locale strings in the shown
block and the referenced ranges to use formal imperative forms consistently,
replacing informal instructions such as introduce, elige, selecciona, mantén,
arrastra, and haz clic with the established formal equivalents. Preserve the
existing meanings and punctuation of all affected labels.
- Line 1199: Update the credentialsRemoved translation to replace the unnatural
“campo(s)” wording with a count-neutral Spanish label such as “Campos de
credenciales omitidos: {{count}}.” Preserve the existing key and interpolation,
and do not introduce plural variants unless the corresponding en.json entry
defines them.

In `@apps/geolibre-desktop/src/i18n/locales/ru.json`:
- Line 1269: Update the Russian locale entries share.credentialsRemoved
(apps/geolibre-desktop/src/i18n/locales/ru.json lines 1269-1269),
tilecodePlugin.cellCount (lines 3233-3233), openAerialMap.showing (lines
3294-3294), and netcdfCube.planeEstimate (lines 5274-5274) to use count-neutral,
label-style wording without the hard-coded plural phrases, while preserving
every existing interpolation placeholder.

---

Outside diff comments:
In `@apps/geolibre-desktop/src/i18n/locales/it.json`:
- Around line 486-490: Update the Italian values for retrieveSublayers,
retrievingSublayers, and retrieveError to consistently use “sottolivelli”
instead of the generic “livelli,” while preserving the existing meaning and
formatting of each message.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4b02752b-60ef-4828-9247-45ee5879538e

📥 Commits

Reviewing files that changed from the base of the PR and between d7f8b60 and 1045e53.

📒 Files selected for processing (21)
  • apps/geolibre-desktop/src/components/comments/AddCommentDialog.tsx
  • apps/geolibre-desktop/src/components/comments/CommentThread.tsx
  • apps/geolibre-desktop/src/components/comments/CommentsPanel.tsx
  • apps/geolibre-desktop/src/i18n/locales/ar.json
  • apps/geolibre-desktop/src/i18n/locales/de.json
  • apps/geolibre-desktop/src/i18n/locales/en.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/zh.json

Comment thread apps/geolibre-desktop/src/i18n/locales/es.json
Comment thread apps/geolibre-desktop/src/i18n/locales/es.json
Comment thread apps/geolibre-desktop/src/i18n/locales/ru.json
@giswqs
giswqs merged commit c1ffe0c into main Aug 10, 2026
49 of 50 checks passed
@giswqs
giswqs deleted the i18n-startup-arcgis-sublayers branch August 10, 2026 00:27
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