Factor out $LANG parsing
Factor out extracting long and short language codes from $LANG into a shell library:
- also see fix locales form wrong assumption (Feature #6001)
|Related to Tails - Feature #6001: Fix locales format based on wrong assumption||Confirmed|
#5 Updated by Anonymous 2018-01-19 16:15:20
I quickly scanned through /usr/local/sbin/unsafe-browser and can’t find anything related to $LANG in there anymore.
In /usr/local/bin/tails-documentation there is only one line which doesn’t look problematic to me.
Maybe this ticket can actually be closed.
#6 Updated by intrigeri 2018-01-19 16:22:50
We now have a
language_code_from_locale shell function that can be used to do this correctly. It’s used in a few places, which is good. But in some other places we do something similar by hand e.g.
config/chroot_local-includes/usr/local/lib/tails-configure-keyboard which should instead use the factored out function so we can close this ticket.
Similar bugs live in non-shell programs, but that’s off-topic here → Feature #6001#note-4.