diff options
-rw-r--r-- | move/Makefile | 5 | ||||
-rwxr-xr-x | move/make_live | 2 | ||||
-rw-r--r-- | move/move.pm | 4 | ||||
-rw-r--r-- | perl-install/lang.pm | 2 |
4 files changed, 11 insertions, 2 deletions
diff --git a/move/Makefile b/move/Makefile index 77712c765..d558d6b42 100644 --- a/move/Makefile +++ b/move/Makefile @@ -3,6 +3,7 @@ DEST_LIVETREE = /tmp/live_tree DEST_STAGE2 = $(DEST_LIVETREE)/usr/bin/stage2 DATA_FILES = devices symlinks +LANG_FILES = $(shell perl -ne 'print $$1 if /ALLOWED_LANGS = qw\((.*)\)/' move.pm) STAGE1 = ../mdk-stage1 INSTALL = ../perl-install @@ -26,6 +27,10 @@ install: build sudo cp -f *.pm $(DEST_STAGE2) sudo cp -f $(addprefix $(INSTALL)/, $(INSTALL_FILES)) $(DEST_STAGE2) + sudo rm -rf $(DEST_LIVETREE)/usr/share/langs + sudo mkdir -p $(DEST_LIVETREE)/usr/share/langs + sudo cp -f $(patsubst %, $(INSTALL)/pixmaps/langs/lang-%.png, $(LANG_FILES)) $(DEST_LIVETREE)/usr/share/langs + #- overwrite /usr/lib/libDrakX files of the live tree with those in CVS sudo cp -f $(addprefix $(INSTALL)/, $(shell cd $(DEST_LIVETREE)/usr/lib/libDrakX ; ls *.pm)) $(DEST_LIVETREE)/usr/lib/libDrakX || : diff --git a/move/make_live b/move/make_live index 2f0ba3679..06ba0280d 100755 --- a/move/make_live +++ b/move/make_live @@ -4,7 +4,7 @@ use lib "../perl-install"; use common; use pkgs; -my @langs = qw(fr en es it de); +my @langs = map { /^../; $& } split /\s/, (cat_('move.pm') =~ /ALLOWED_LANGS = qw\((.*)\)/)[0]; @ARGV == 0 or die "usage: make_live\n"; diff --git a/move/move.pm b/move/move.pm index b29a63ec3..d10e46822 100644 --- a/move/move.pm +++ b/move/move.pm @@ -8,7 +8,9 @@ use common; use fs; use run_program; use log; +use lang; +my @ALLOWED_LANGS = qw(en_US fr es it de); #- run very soon at stage2 start, setup things on tmpfs rw / that #- were not necessary to start stage2 itself (there were setup @@ -41,6 +43,8 @@ sub init { run_program::run('/sbin/devfsd', '/dev'); modules::load_category('multimedia/sound'); + + member($_, @ALLOWED_LANGS) or delete $lang::langs{$_} foreach keys %lang::langs; } diff --git a/perl-install/lang.pm b/perl-install/lang.pm index 8ad8ca12a..2a13fdfac 100644 --- a/perl-install/lang.pm +++ b/perl-install/lang.pm @@ -19,7 +19,7 @@ use log; #- of 'll_CC:ll_DD:ll' (ll_CC: locale (if exist) resulting of the #- combination of chosen lang (ll) and country (CC), ll_DD: the #- default locale shown here (field [2]) and ll: the language (the key)) -my %langs = ( +our %langs = ( 'af' => [ 'Afrikaans', 'Afrikaans', 'af_ZA', ' 3 ', 'iso-8859-1' ], 'am' => [ 'Amharic', 'ZZ emarNa', 'am_ET', ' 3 ', 'utf_am' ], 'ar' => [ 'Arabic', 'AA Arabic', 'ar_EG', ' 23 ', 'utf_ar' ], |