uucore: embed system locale on cargo install#8604
Conversation
|
GNU testsuite comparison: |
54cdd22 to
d5c9fdb
Compare
|
it would be nice to see if this could be checked by github action too :) |
|
GNU testsuite comparison: |
d5c9fdb to
1935fb9
Compare
|
GNU testsuite comparison: |
1935fb9 to
6b6dc05
Compare
|
GNU testsuite comparison: |
|
Hi @sylvestre, I noticed this PR was reviewed and all checks passed back in September. I see that issue #8594 is still open and @oech3 recently asked about the progress in the original issue thread. Just wanted to check - is there anything else needed before merging? I'm happy to:
Thanks for your time and feedback! |
|
i just forgot, sorry |
5e10f32 to
8f1ea78
Compare
8f1ea78 to
41b06e9
Compare
|
GNU testsuite comparison: |
|
about test, i would like a test in github action itself. Unit tests are nice but they don't always cover users needs. .github/workflows/l10n.yml thanks again :) |
|
GNU testsuite comparison: |
41b06e9 to
20642e0
Compare
|
GNU testsuite comparison: |
|
@WaterWhisperer ping |
20642e0 to
ad48a3a
Compare
|
GNU testsuite comparison: |
CodSpeed Performance ReportMerging #8604 will improve performances by 2.25%Comparing Summary
Benchmarks breakdown
Footnotes
|
|
|
This PR fixes issue #8594 .
Previously, binaries installed via
cargo installwould only embed the English (en-US) locale. This change modifies theuucore/build.rsscript to detect the system's locale via theLANGenvironment variable at compile time. It embeds the corresponding locale file if it exists, in addition to the mandatory English (en-US) fallback.Verification
I verified this fix by setting my system locale to French (
export LANG=fr_FR.UTF-8), for which theyesutility has an existing translation.cargo build --package uu_yes../target/debug/yes --help.The command correctly displayed the help text in French, confirming that the build script now successfully embeds the user's system locale.
Testing with a Chinese locale (
zh_CN) correctly resulted in a fallback to English, as no Chinese translation file currently exists for theyesutility. This demonstrates the fallback mechanism is working as expected.