-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
uucore: add functions to manage translations #7955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
572c58e
to
3551c6f
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new functions and structures to manage localization and translations in the uucore package. Key changes include:
- Introduction of the locale module with functionality to initialize localization, load Fluent bundles, and retrieve localized messages.
- Updates to mod files and Cargo.toml to expose the new locale module and add necessary Fluent dependencies.
- Modifications to configuration files (deny.toml and VSCode wordlist) to support the new dependencies.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/uucore/src/lib/mods/locale.rs | New localization functionality with resource loading and message formatting functions. |
src/uucore/src/lib/mods.rs | Locale module exposed. |
src/uucore/src/lib/lib.rs | Locale module publicly re-exported. |
src/uucore/Cargo.toml | Dependency changes for Fluent and related crates. |
deny.toml | Updated dependency skips relevant to Fluent usage. |
Cargo.toml | Added Fluent dependencies. |
.vscode/cspell.dictionaries/workspace.wordlist.txt | Updated wordlist for new terminology. |
Comments suppressed due to low confidence (1)
src/uucore/src/lib/mods/locale.rs:229
- [nitpick] The parameter name 'rustc_args' may be misleading since the function works with Fluent arguments for localization. Consider renaming it to 'args' or 'fluent_args' to better reflect its purpose.
rustc_args: HashMap<String, String>,
GNU testsuite comparison:
|
fc17288
to
ea5b5e5
Compare
GNU testsuite comparison:
|
GNU testsuite comparison:
|
GNU testsuite comparison:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds localization support to uucore by introducing a new module that manages translations.
- Implements localization functions with Fluent for translated messages.
- Introduces configuration and initialization for localization using locale files and fallbacks.
- Updates Cargo.toml and related files to add Fluent dependencies.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/uucore/src/lib/mods/locale.rs | New localization module with functions to load, format, and get messages. |
src/uucore/src/lib/mods.rs | Exposes the new locale module. |
src/uucore/src/lib/lib.rs | Updates public API to include the locale module. |
src/uucore/Cargo.toml | Adjusts dependencies to include Fluent libraries. |
Cargo.toml | Adds Fluent dependencies to the workspace. |
.vscode/cspell.dictionaries/workspace.wordlist.txt | Updates wordlist for new terms related to localization. |
Good work! |
No description provided.