coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

Locale lookup doesn't seem to be working with full region code

Open therealmate opened this issue 7 months ago • 1 comments

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

  1. git clone https://github.com/uutils/coreutils-l10n
  2. sudo cp uu/users/locales/hu.ftl /usr/share/locales/users/hu.ftl
  3. LANG=hu_HU.UTF-8 uu-users --help (not localized)
  4. sudo cp uu/users/locales/hu.ftl /usr/share/locales/users/hu-HU.ftl
  5. LANG=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=

therealmate avatar Apr 22 '26 18:04 therealmate

I think this is what packager or make should care about instead of embedding logic to binariy.

oech3 avatar Apr 23 '26 07:04 oech3