Skip to content

Commit

Permalink
Remove bogus dependency on Ubuntu "localechooser-data" package
Browse files Browse the repository at this point in the history
In Debian, this package doesn't exist as a .deb, so we must maintain our
own local copy of the languagelist file.

(This patch also adds code to synchronise this file to the Makefile's
"update:" target so this isn't too annoying.)

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
  • Loading branch information
lamby committed Apr 17, 2008
1 parent f67cbbd commit b2388b5
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 3 deletions.
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -30,7 +30,7 @@ install: test build
cp bin/live-getty bin/live-login bin/live-new-uuid bin/live-snapshot $(DESTDIR)/sbin

mkdir -p $(DESTDIR)/usr/share/live-initramfs
cp bin/live-preseed bin/live-reconfigure $(DESTDIR)/usr/share/live-initramfs
cp bin/live-preseed bin/live-reconfigure contrib/languagelist $(DESTDIR)/usr/share/live-initramfs

mkdir -p $(DESTDIR)/usr/share/initramfs-tools
cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
Expand Down Expand Up @@ -120,6 +120,10 @@ update:
$$FILE; \
done

# Update language list
wget -O "contrib/languagelist" \
"http://svn.debian.org/viewsvn/\*checkout\*/d-i/trunk/packages/localechooser/languagelist"

clean:

distclean:
Expand Down
93 changes: 93 additions & 0 deletions contrib/languagelist
@@ -0,0 +1,93 @@
#
# This is the complete list of languages (locales) to choose from.
# langcode;language (en);language (orig);supported_environments;countrycode;fallbacklocale;langlist;console-data
sq;Albanian;Shqip;2;AL;sq_AL.UTF-8;;kbd=lat0-sun16(utf8)
am;Amharic;አማርኛ;4;ET;am_ET;;
ar;Arabic;عربي;3;EG;ar_EG.UTF-8;;console-setup
eu;Basque;Euskaraz;1;ES;eu_ES.UTF-8;;kbd=lat0-sun16(utf8)
be;Belarusian;Беларуская;2;BY;be_BY.UTF-8;;console-setup
bn;Bengali;বাংলা;4;BD;bn_BD;;
bs;Bosnian;Bosanski;2;BA;bs_BA.UTF-8;;kbd=Lat2-Terminus16(utf8)
bg;Bulgarian;Български;2;BG;bg_BG.UTF-8;;console-setup
# For C locale, set language to 'en' to make sure questions are "translated"
# to English instead of showing codes.
C;C;No localization;0;;C;en;
ca;Catalan;Català;1;ES;ca_ES.UTF-8;;kbd=lat0-sun16(utf8)
# Special case for Chinese as the two flavours share the same ISO 639 code
# Both will trigger countrychooser. Each will be the backup for the other
# one
zh_CN;Chinese (Simplified);中文(简体);3;CN;zh_CN.UTF-8;zh_CN:zh;
zh_TW;Chinese (Traditional);中文(繁體);3;TW;zh_TW.UTF-8;zh_TW:zh;
hr;Croatian;Hrvatski;2;HR;hr_HR.UTF-8;;kbd=lat2-sun16(utf8)
cs;Czech;Čeština;2;CZ;cs_CZ.UTF-8;;kbd=lat2-sun16(utf8)
da;Danish;Dansk;1;DK;da_DK.UTF-8;;kbd=lat0-sun16(utf8)
nl;Dutch;Nederlands;1;NL;nl_NL.UTF-8;;kbd=lat0-sun16(utf8)
dz;Dzongkha;རྫོང་ཁ།;4;BT;dz_BT;;
en;English;English;0;US;en_US.UTF-8;;kbd=lat0-sun16(utf8)
# The Esperanto locale *is* (or will be as of 1/11/2006) eo.UTF-8
# so no country on purpose. The default country is Antarctica because...
# ...why not..:-)
eo;Esperanto;Esperanto;2;AQ;eo.UTF-8;;console-setup
et;Estonian;Eesti;2;EE;et_EE.UTF-8;;kbd=lat0-sun16(utf8)
fi;Finnish;Suomi;1;FI;fi_FI.UTF-8;;kbd=lat0-sun16(utf8)
fr;French;Français;1;FR;fr_FR.UTF-8;;console-setup
gl;Galician;Galego;1;ES;gl_ES.UTF-8;;kbd=lat0-sun16(utf8)
ka;Georgian;ქართული;4;GE;ka_GE.UTF-8;;console-setup
de;German;Deutsch;1;DE;de_DE.UTF-8;;kbd=lat0-sun16(utf8)
el;Greek;Ελληνικά;2;GR;el_GR.UTF-8;;console-setup
gu;Gujarati;ગુજરાતી;4;IN;gu_IN;;
he;Hebrew;עברית;3;IL;he_IL.UTF-8;;console-setup
hi;Hindi;हिन्दी ;4;IN;hi_IN;;
hu;Hungarian;Magyar;2;HU;hu_HU.UTF-8;;kbd=lat2-sun16(utf8)
#X is;Icelandic;Íslenska;1;IS;is_IS.UTF-8;;kbd=lat9u-16(utf8)
id;Indonesian;Bahasa Indonesia;1;ID;id_ID.UTF-8;;kbd=lat0-sun16(utf8)
#X ga;Irish;Gaeilge;1;IE;ga_IE.UTF-8;;kbd=lat0-sun16(utf8)
it;Italian;Italiano;1;IT;it_IT.UTF-8;;kbd=lat0-sun16(utf8)
ja;Japanese;日本語;3;JP;ja_JP.UTF-8;;
#X kn;Kannada;ಕನ್ನಡ;4;IN;kn_IN;;
#X ks;Kashmiri;कोशुर;4;IN;ks_IN;;
#X kk;Kazakh;Қазақ;2;KZ;kk_KZ.UTF-8;;console-setup
km;Khmer;ខ្មែរ;4;KH;km_KH;;
ko;Korean;한국어;3;KR;ko_KR.UTF-8;;
ku;Kurdish;Kurdî;2;TR;ku_TR.UTF-8;;kbd=Lat15-Terminus16(utf8)
#X lo;Lao;ລາວ;4;LA;lo_LA;;console-setup
lv;Latvian;Latviski;2;LV;lv_LV.UTF-8;;kbd=lat7-14(utf8)
lt;Lithuanian;Lietuviškai;2;LT;lt_LT.UTF-8;;kbd=LatArCyrHeb-16(utf8)
#X mg;Malagasy;Malagasy;1;MG;mg_MG.UTF-8;mg_MG:fr_FR:fr:en;kbd=lat0-sun16(utf8)
#X ms;Malay;Bahasa Malaysia;1;MY;ms_MY.UTF-8;;kbd=lat0-sun16(utf8)
ml;Malayalam;മലയാളഠ;4;IN;ml_IN;;
mr;Marathi;मराठी;4;IN;mr_IN;;
mk;Macedonian;Македонски;2;MK;mk_MK.UTF-8;;console-setup
ne;Nepali;नेपाली ;4;NP;ne_NP;;
# The Sami translation is really incomplete. We however keep Sami on request
# of Skolelinux as a kind of reward to them..:-). They need to be able to
# choose Sami as an option so that the Sami locale is set as default
se_NO;Northern Sami;Sámegillii;1;NO;se_NO.UTF-8;se_NO:nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun(utf8)
nb_NO;Norwegian Bokmaal;Norsk bokmål;1;NO;nb_NO.UTF-8;nb_NO:nb:no_NO:no:nn_NO:nn:da:sv:en;kbd=lat0-sun16(utf8)
nn_NO;Norwegian Nynorsk;Norsk nynorsk;1;NO;nn_NO.UTF-8;nn_NO:nn:no_NO:no:nb_NO:nb:da:sv:en;kbd=lat0-sun16(utf8)
#X fa;Persian;فارسی;3;IR;fa_IR;;console-setup
pl;Polish;Polski;2;PL;pl_PL.UTF-8;;kbd=lat2-sun16(utf8)
pt;Portuguese;Português;1;PT;pt_PT.UTF-8;pt:pt_BR:en;kbd=lat0-sun16(utf8)
pt_BR;Portuguese (Brazil);Português do Brasil;1;BR;pt_BR.UTF-8;pt_BR:pt:en;kbd=lat1-16(utf8)
pa;Punjabi (Gurmukhi);ਪੰਜਾਬੀ;4;IN;pa_IN;;
ro;Romanian;Română;2;RO;ro_RO.UTF-8;;kbd=Lat2-Terminus16(utf8)
ru;Russian;Русский;2;RU;ru_RU.UTF-8;;console-setup
#X sa;Sanskrit;संस्कृत;4;IN;sa_IN;;
# Serbian commented for consistency: too incomplete
#X sr;Serbian;Српски;2;CS;sr_YU.UTF-8@cyrillic;;console-setup
sk;Slovak;Slovenčina;2;SK;sk_SK.UTF-8;;kbd=lat2-sun16(utf8)
sl;Slovenian;Slovenščina;2;SI;sl_SI.UTF-8;;kbd=lat2-sun16(utf8)
es;Spanish;Español;1;ES;es_ES.UTF-8;;kbd=lat0-sun16(utf8)
sv;Swedish;Svenska;1;SE;sv_SE.UTF-8;;kbd=lat0-sun16(utf8)
tl;Tagalog;Tagalog;1;PH;tl_PH.UTF-8;;kbd=lat0-sun16(utf8)
ta;Tamil;தமிழ்;4;IN;ta_IN;;
#X te;Telugu;తెలుగు;4;IN;te_IN;;
th;Thai;ภาษาไทย;4;TH;th_TH.UTF-8;;console-setup
tr;Turkish;Türkçe;2;TR;tr_TR.UTF-8;;kbd=Lat15-Terminus16(utf8)
uk;Ukrainian;Українська;2;UA;uk_UA.UTF-8;;console-setup
#X ur;Urdu;اردو;3;PK;ur_PK.UTF-8;;console-setup
#X ca@valencia;Valencian-Catalan;Valencià-Català;1;ES;ca_ES.UTF-8@valencia;;kbd=lat0-sun16(utf8)
vi;Vietnamese;Tiếng Việt;3;VN;vi_VN.UTF-8;;console-setup
#X cy;Welsh;Cymraeg;2;GB;cy_GB.UTF-8;;kbd=iso14.f16(utf8)
wo;Wolof;Wolof;2;SN;wo_SN;wo:fr:en;
#X xh;Xhosa;Xhosa;2;ZA;xh_ZA.UTF-8;;kbd=lat0-sun16(utf8)
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -12,7 +12,7 @@ XS-Upstream-Depends: git-core

Package: live-initramfs
Architecture: all
Depends: ${misc:Depends}, busybox, file, initramfs-tools, localechooser-data, sudo, udev, user-setup
Depends: ${misc:Depends}, busybox, file, initramfs-tools, sudo, udev, user-setup
Recommends: eject, uuid-runtime, wget
Suggests: genext2fs (>= 1.4.1), squashfs-tools, mtd-tools
Description: Debian Live initramfs hook
Expand Down
2 changes: 1 addition & 1 deletion scripts/live-functions
Expand Up @@ -34,7 +34,7 @@ lang2locale() {
langpart="${1%%_*}"
if [ "$1" != "C" ]; then
# Match the language code with 3rd field in languagelist
line=$(grep -v "^#" /root/usr/share/localechooser/languagelist | cut -f3,4,5 -d\; | grep -v ';C$' | grep "^$langpart;")
line=$(grep -v "^#" /root/usr/share/live-initramfs/languagelist | cut -f3,4,5 -d\; | grep -v ';C$' | grep "^$langpart;")
if [ -n "$line" ]; then
if [ "$(echo "$line" | grep -c '')" -gt 1 ]; then
# More than one match; try matching the
Expand Down

0 comments on commit b2388b5

Please sign in to comment.