~ubuntu-branches/ubuntu/saucy/friendly-recovery/saucy

« back to all changes in this revision

Viewing changes to usr/share/recovery-mode/l10n.sh

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-04-19 17:57:06 UTC
  • Revision ID: james.westby@ubuntu.com-20110419175706-006w5a860vn4f0h0
Tags: 0.2.11
* usr/share/recovery-mode/l10n.sh:
  - blacklist certain locales where we don't have good console
    fonts (LP: #573502)
* fix fsck option (LP: #566200)
* refresh pot file

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
 
2
 
 
3
# blacklist some languages that we don't have a good console fonts for
 
4
# see bug #573502
 
5
in_lang_blacklist() {
 
6
    LANG_BLACKLIST="ar_ he_IL ja_JP ko_KR ru_RU sl_SI vi_VN zh_"
 
7
    LANG=$1
 
8
    for b in $LANG_BLACKLIST; do
 
9
        # equal to lang.startswith(b)
 
10
        if expr match "$LANG" ^"$b" >/dev/null ; then
 
11
            return 0
 
12
        fi
 
13
    done
 
14
    return 1
 
15
}
 
16
 
2
17
# There is no environment set, as these steps are skipped, 
3
18
# so we need to source the variables needed for localization ourselves
4
19
if [ -r /etc/default/locale ]; then
5
20
 . /etc/default/locale
6
 
export LANG LANGUAGE
 
21
 if ! in_lang_blacklist "$LANG"; then
 
22
     export LANG LANGUAGE
 
23
 fi
7
24
elif [ -r /etc/environment ]; then
8
25
 . /etc/environment
9
 
export LANG LANGUAGE
 
26
 if ! in_lang_blacklist "$LANG"; then
 
27
     export LANG LANGUAGE
 
28
 fi
10
29
fi
11
30
 
12
31
# default eval_gettext() to ensure that we do not fail