Implement i18n tooling and localize UI strings across projects - #97
Merged
Conversation
Introduce localization infrastructure and apply it across the UI. Adds build/i18n scripts (resources.py, translate.py, check.py, pseudo.py) and documentation (README.md, glossary.md) to discover, generate, check, and machine-translate resource files (including a pseudo-locale). Add resource files and helpers (Plural.cs, UI.resx, UI.de.resx, UI.qps-Ploc.resx, VersoCultures, VersoLocalization, LanguageOption) and editor localization bundles (vscode l10n files and package.nls.json variants). Replace many hard-coded English strings in Blazor components with UI resource lookups and wire up localization in the host/CLI/VSCode pieces. Also add tests for localization and related changes to project files and VSCode extension code. Signed-off-by: Torrey Betts <torrey.betts@gmail.com>
Introduce translation tooling and many localization assets: add build/i18n scripts (export.py, merge.py) and update i18n README and CONTRIBUTING with translation workflow and guidelines; ignore working translation files in .gitignore. Add plural/theming/localized text helpers and CellText resources across projects, plus numerous .resx and VS Code l10n JSON files for de/es/ja/zh and pseudo locales. Wire resources into projects, add tests for theming and localization, and remove the old ThemeCssGenerator. This enables exporting, merging and managing translations in passes and centralizes localization handling across assemblies. Signed-off-by: Torrey Betts <torrey.betts@gmail.com>
Introduce interface-language support and localization plumbing: add docs (docs/guides/interface-language.md), CLI help for --language, and glossary guidance. Replace hard-coded English extension names with resource lookups (Strings.*) across ADO SQL components and add corresponding resource entries (and translations) for names like renderer, formatter, import hook, kernel, magic commands, and toolbar actions (Export CSV/JSON). Update README and glossary to mention interface language. CI workflow now includes build/i18n in paths and runs build/i18n/check.py to validate translations early in the build. Signed-off-by: Torrey Betts <torrey.betts@gmail.com>
SummarySummary
CoverageVerso - 79.2%
Verso.Abstractions - 83.4%
Verso.Ado - 81.3%
Verso.Blazor - 26%
Verso.Blazor.Shared - 61.1%
Verso.Cli - 41.3%
Verso.FSharp - 82.4%
Verso.Host - 55%
Verso.Http - 74.7%
Verso.JavaScript - 52.7%
Verso.PowerShell - 64.7%
Verso.Python - 76.4%
Verso.Sample.Diagram - 80.1%
Verso.Sample.Dice - 82.2%
Verso.Sample.Slides - 58.8%
Verso.Sample.Sparkline - 67.3%
Verso.Testing - 80.2%
|
Add localized resource strings (Table_ObjectCount_One/Other) to en, de, es, ja, qps-Ploc and zh-Hans .resx files and refactor RunspaceManager to use a new AppendObjectCountFooter method. The new helper uses Plural.Of and HtmlEncode to render the localized singular/plural footer text and improves reuse by replacing inlined footer construction. Signed-off-by: Torrey Betts <torrey.betts@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces comprehensive support for interface translations in Verso, including new documentation, CI checks, and guidance for contributing and maintaining translations. The most important changes are:
Translation Infrastructure and CI Integration
build/i18n/check.pythat validates all translations against the English source, ensuring keys, placeholders, and coverage are correct; this script is now run in CI before the build to catch translation drift early [1] [2]..github/workflows/verso-ci.yml) to trigger on changes to translation files and to run the translation check step [1] [2] [3].Documentation and Contributor Guidance
build/i18n/README.md, covering where strings belong, how to add or translate them, and how to check the work.CONTRIBUTING.mdto explain best practices for writing user-facing messages, which strings should be translated, and how to handle plurals and sentence construction.README.mdto document interface language support, configuration options, and a link to the new guide.