diff options
author | EuAndreh <eu@euandre.org> | 2021-06-21 20:01:08 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-21 20:15:28 -0300 |
commit | f621613128000d0b89abcf9658c80efdc3b6c38b (patch) | |
tree | 406c776e00250ae2a50181ad2b726d6f0e4f3343 /TODOs.md | |
parent | TODOs.md: Mark #task-717fa8b7-1c92-5766-8872-280ae061bf4b as CANCELLED (diff) | |
download | git-permalink-f621613128000d0b89abcf9658c80efdc3b6c38b.tar.gz git-permalink-f621613128000d0b89abcf9658c80efdc3b6c38b.tar.xz |
src/git-permalink.sh: Use LC_MESSAGES to decide on the language
First, instead of looking at "${LANG:-}" for choosing the language, we
now use LC_MESSAGES from the locale(1) command. LC_MESSAGES is the
appropriate place to look at, and it inherits the value of $LANG by
default, but can be overriden so that the text messages from a program
spits out strings from a language, but use everything else from
$LANG (such as LC_NUMERIC), like in:
LANG=abc
LC_MESSAGES=zzz
I took this opportunity to look only at the language and country part
of the locale, and not at the codeset or modifier (as in
ll_CC.CODESET@modifier), so that as long as the language+country is the
same, it uses the according message.
This addresses the
"Maybe it could be less restrictive of country or encoding" comment on
Diffstat (limited to 'TODOs.md')
0 files changed, 0 insertions, 0 deletions