You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #44 moved active language state and localText() into tools/drive_comparison_client/shared/i18n.js, which gives the browser client a cleaner localization boundary. That makes future localization work safer for developers, but it does not yet make translation work friendly for non-code contributors or crowdsourced translation.
Most dynamic UI copy is still embedded directly in JavaScript as localText(ko, en) pairs, and static template localization still uses STATIC_TRANSLATIONS, NOTE_HTML, translateText(), and applyStaticLanguage() from tools/drive_comparison_client/state/core.js. A translator currently has to edit source code and understand where each string is rendered.
There is also a related but separate game-data localization concern: some Terra Invicta template names and descriptions should come from the game's localization strings rather than raw template fields. For example, drive display names and descriptions can be resolved from keys such as TIDriveTemplate.displayName.<dataName> and TIDriveTemplate.description.<dataName>. That data-pipeline concern should be handled by #53 before this issue consumes those fields in the UI.
Proposed Change
Create a translator-friendly localization workflow based on external locale catalogs and validation tooling.
Suggested direction:
Add source locale files for Korean and English, likely under a path such as tools/drive_comparison_client/locales/ or data/locales/.
Replace inline dynamic localText(ko, en) pairs with stable message IDs or another catalog-backed lookup API.
Decide whether static template strings and dynamic JS strings should share one catalog, or document why they remain separate.
Add a verifier that detects missing translations, unused keys, duplicate keys, and malformed placeholders.
Add contributor documentation explaining how to add or update translations without editing JavaScript logic.
Keep generated docs/** output rebuilt through the normal npm run build workflow.
Game-data localization boundary
This issue should focus on app/UI copy owned by this repository, not on vendoring Terra Invicta's raw localization files.
Game-data strings derived from Terra Invicta templates, such as drive names and drive descriptions, should be resolved into repo-local generated game-data catalogs first. See #53 for the proposed generated drive catalog.
After #53 lands, this issue may consume generated drive fields such as displayName and description, but it should not be responsible for parsing the local Terra Invicta install or deciding raw-template fallback behavior.
Acceptance Criteria
Dynamic UI copy can be translated by editing structured locale data rather than JavaScript source call sites.
Missing or unused localization entries are caught by an automated verifier.
Placeholder/interpolation usage is validated so translated strings cannot silently break runtime UI text.
The language switch still updates chart controls, presets, dry-mass modal text, chart diagnostics, chart guide labels, and source/static text.
Game-data localization responsibilities are documented as separate from app UI copy localization.
npm run verify completes successfully, or any verifier limitation is documented.
A short translator/contributor guide is added.
Constraints and Non-Goals
Do not change chart behavior or persisted chart state shape.
Do not edit generated files directly; rebuild published output through npm run build.
Do not require a third-party translation platform in the first implementation. The catalog format should be compatible with later Crowdin/Weblate-style tooling, but this issue can stay repository-local.
Follow-up to #44. That issue established shared/i18n.js as the dynamic localization boundary; this issue should build on that boundary to make localization maintainable for contributors and possible future crowdsourcing.
Related prerequisite: #53 introduces a repo-local generated drive catalog for localized drive metadata. This issue should treat that catalog as an input once it exists, while keeping app-owned UI copy localization separate.
Create translator-friendly localization catalog workflow
Problem or Limitation
Issue #44 moved active language state and
localText()intotools/drive_comparison_client/shared/i18n.js, which gives the browser client a cleaner localization boundary. That makes future localization work safer for developers, but it does not yet make translation work friendly for non-code contributors or crowdsourced translation.Most dynamic UI copy is still embedded directly in JavaScript as
localText(ko, en)pairs, and static template localization still usesSTATIC_TRANSLATIONS,NOTE_HTML,translateText(), andapplyStaticLanguage()fromtools/drive_comparison_client/state/core.js. A translator currently has to edit source code and understand where each string is rendered.There is also a related but separate game-data localization concern: some Terra Invicta template names and descriptions should come from the game's localization strings rather than raw template fields. For example, drive display names and descriptions can be resolved from keys such as
TIDriveTemplate.displayName.<dataName>andTIDriveTemplate.description.<dataName>. That data-pipeline concern should be handled by #53 before this issue consumes those fields in the UI.Proposed Change
Create a translator-friendly localization workflow based on external locale catalogs and validation tooling.
Suggested direction:
tools/drive_comparison_client/locales/ordata/locales/.localText(ko, en)pairs with stable message IDs or another catalog-backed lookup API.docs/**output rebuilt through the normalnpm run buildworkflow.Game-data localization boundary
This issue should focus on app/UI copy owned by this repository, not on vendoring Terra Invicta's raw localization files.
Game-data strings derived from Terra Invicta templates, such as drive names and drive descriptions, should be resolved into repo-local generated game-data catalogs first. See #53 for the proposed generated drive catalog.
Expected boundary:
After #53 lands, this issue may consume generated drive fields such as
displayNameanddescription, but it should not be responsible for parsing the local Terra Invicta install or deciding raw-template fallback behavior.Acceptance Criteria
npm run buildcompletes successfully.npm run verifycompletes successfully, or any verifier limitation is documented.Constraints and Non-Goals
npm run build.Relationship
Follow-up to #44. That issue established
shared/i18n.jsas the dynamic localization boundary; this issue should build on that boundary to make localization maintainable for contributors and possible future crowdsourcing.Related prerequisite: #53 introduces a repo-local generated drive catalog for localized drive metadata. This issue should treat that catalog as an input once it exists, while keeping app-owned UI copy localization separate.