Project

General

Profile

Feature #6142

Feature #6145: Factor out stuff into a shell library

Factor out $LANG parsing

Added by Tails over 6 years ago. Updated almost 2 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
No
Affected tool:

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 (#6001)

Related issues

Related to Tails - Feature #6001: Fix locales format based on wrong assumption Confirmed

History

#1 Updated by Tails over 6 years ago

  • Parent task set to #6145

#2 Updated by BitingBird over 5 years ago

  • Subject changed from factor out LANG parsing to Factor out LANG parsing
  • Description updated (diff)
  • Starter set to No

#3 Updated by intrigeri over 5 years ago

  • Related to Feature #6001: Fix locales format based on wrong assumption added

#4 Updated by intrigeri over 5 years ago

  • Subject changed from Factor out LANG parsing to Factor out $LANG parsing

#5 Updated by u almost 2 years ago

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 almost 2 years ago

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 → #6001#note-4.

Also available in: Atom PDF