Locale lookup doesn't seem to be working with full region code
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Description
Locale lookup appears to be too strict, it doesn't accept just hu.ftl, it needs the hyphen also (hu-HU.ftl). Uutils should just fall back to hu.ftl
Steps to reproduce
git clone https://github.com/uutils/coreutils-l10nsudo cp uu/users/locales/hu.ftl /usr/share/locales/users/hu.ftlLANG=hu_HU.UTF-8 uu-users --help(not localized)sudo cp uu/users/locales/hu.ftl /usr/share/locales/users/hu-HU.ftlLANG=hu_HU.UTF-8 uu-users --help(localized)
Locale output:
LC_CTYPE="hu_HU.UTF-8"
LC_NUMERIC="hu_HU.UTF-8"
LC_TIME="hu_HU.UTF-8"
LC_COLLATE="hu_HU.UTF-8"
LC_MONETARY="hu_HU.UTF-8"
LC_MESSAGES="hu_HU.UTF-8"
LC_PAPER="hu_HU.UTF-8"
LC_NAME="hu_HU.UTF-8"
LC_ADDRESS="hu_HU.UTF-8"
LC_TELEPHONE="hu_HU.UTF-8"
LC_MEASUREMENT="hu_HU.UTF-8"
LC_IDENTIFICATION="hu_HU.UTF-8"
LC_ALL=
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the uu-users command and trace how LANG=hu_HU.UTF-8 is mapped to files under uu/users/locales and /usr/share/locales/users. Reproduce with uu/users/locales/hu.ftl, then verify that the command falls back to hu.ftl when hu-HU.ftl is absent and localizes --help.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, localization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100