uucore: add functions to manage translations#7955
Merged
cakebaker merged 2 commits intouutils:mainfrom May 24, 2025
Merged
Conversation
572c58e to
3551c6f
Compare
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
There was a problem hiding this comment.
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: |
cakebaker
reviewed
May 22, 2025
cakebaker
reviewed
May 22, 2025
fc17288 to
ea5b5e5
Compare
cakebaker
reviewed
May 22, 2025
cakebaker
reviewed
May 22, 2025
|
GNU testsuite comparison: |
cakebaker
reviewed
May 22, 2025
cakebaker
reviewed
May 22, 2025
cakebaker
reviewed
May 22, 2025
cakebaker
reviewed
May 22, 2025
cakebaker
reviewed
May 22, 2025
|
GNU testsuite comparison: |
|
GNU testsuite comparison: |
There was a problem hiding this comment.
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. |
Contributor
|
Good work! |
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.
No description provided.