Feature #6142
Factor out $LANG parsing
0%
Description
Factor out extracting long and short language codes from $LANG into a shell library:
- /usr/local/sbin/unsafe-browser
- /usr/local/bin/tails-documentation
- also see fix locales form wrong assumption (Feature #6001)
Subtasks
Related issues
Related to Tails - Feature #6001: Fix locales format based on wrong assumption | Confirmed |
History
#1 Updated by Tails 2013-07-18 11:48:11
- Parent task set to Feature #6145
#2 Updated by BitingBird 2014-06-09 11:30:33
- Subject changed from factor out LANG parsing to Factor out LANG parsing
- Description updated
- Starter set to No
#3 Updated by intrigeri 2014-06-21 14:24:21
- related to Feature #6001: Fix locales format based on wrong assumption added
#4 Updated by intrigeri 2014-06-21 14:24:37
- Subject changed from Factor out LANG parsing to Factor out $LANG parsing
#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.