Skip to content

Conversation

sylvestre
Copy link
Contributor

No description provided.

@sylvestre sylvestre force-pushed the locale branch 8 times, most recently from 572c58e to 3551c6f Compare May 18, 2025 19:44
Copy link

GNU testsuite comparison:

GNU test failed: tests/mkdir/selinux. tests/mkdir/selinux is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre marked this pull request as ready for review May 21, 2025 17:47
@sylvestre sylvestre requested review from cakebaker and Copilot May 21, 2025 17:47
Copy link

@Copilot Copilot AI left a 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>,

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre force-pushed the locale branch 3 times, most recently from fc17288 to ea5b5e5 Compare May 22, 2025 08:04
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)

Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/misc/stdbuf (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre requested review from cakebaker and Copilot May 24, 2025 09:43
Copy link

@Copilot Copilot AI left a 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.

@cakebaker cakebaker merged commit aeadba7 into uutils:main May 24, 2025
72 of 73 checks passed
@cakebaker
Copy link
Contributor

Good work!

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