From ec18b55950ef52efd4bd62eb8e0e66f673a34022 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 30 Oct 2007 17:46:07 +0100 Subject: [PATCH] move the issue.LANG files to gettext --- Makefile | 16 ++++++++-------- config | 2 +- issue.en | 23 ----------------------- issue.hu | 26 -------------------------- parse_cmdline.in | 35 +++++++++++++++++++++++++++++++---- po/Makefile | 2 ++ po/POTFILES.in | 1 + 7 files changed, 43 insertions(+), 62 deletions(-) delete mode 100644 issue.en delete mode 100644 issue.hu diff --git a/Makefile b/Makefile index c162cf4..9274751 100644 --- a/Makefile +++ b/Makefile @@ -19,12 +19,12 @@ SETUPINITRDSIZE = echo "$$(($$(gzip --list $(SETUPINITRD) |grep initrd-$(ARCH).i endif # needed files (files that we can't live without) NEED_FILES = fstab-update parse_cmdline.in xorg.conf.in rc.fsupd \ - crypt.c rc.fwlive rc.config configsave issue.{en,hu} fileswap reboot.diff services.diff udev.diff rc.S.diff \ + crypt.c rc.fwlive rc.config configsave fileswap reboot.diff services.diff udev.diff rc.S.diff \ rc.parse_cmdline parse_cmdline xstart xorg.conf menu.lst INST_FILES_755 = /etc/rc.d/rc.fwlive /etc/rc.d/rc.config /etc/rc.d/rc.fsupd /usr/local/bin/configsave \ /usr/local/bin/fileswap /usr/local/bin/fstab-update /usr/local/bin/xstart \ /usr/local/bin/parse_cmdline /etc/rc.d/rc.parse_cmdline /tmp/live-base/tools/fpm2lzm -INST_FILES_644 = /etc/issue.{en,hu} /etc/X11/xorg.conf /boot/grub/menu.lst +INST_FILES_644 = /etc/X11/xorg.conf /boot/grub/menu.lst PWD = $(shell pwd) PATCH_FILES = reboot.diff services.diff udev.diff rc.S.diff REMOVE_FILES = /etc/rc.d/rcS.d/S{19rc.bootclean,07rc.frugalware} \ @@ -53,7 +53,7 @@ check-tree: fi parse_cmdline: parse_cmdline.in - sed 's/@FWLLLANG@/$(FWLLLANG)/' $@.in > $@ + sed 's/FWLLLANG/$(FWLLLANG)/' $@.in > $@ xorg.conf: xorg.conf.in sed 's/@FWLSLANG@/$(FWLSLANG)/' $@.in > $@ @@ -199,11 +199,11 @@ create-users: checkroot sed "s|root::$$rof|root:$$rootpass:$$rof|" -i ${CHROOTDIR}/${TREE}/etc/shadow; \ echo "${FWLUSER} ALL=(ALL) NOPASSWD:ALL" >${CHROOTDIR}/${TREE}/etc/sudoers; \ rm -f ${CHROOTDIR}/${TREE}/etc/issue; \ - sed "s|@VENDOR@|${VENDOR}|" -i ${CHROOTDIR}/${TREE}/etc/issue.{en,hu}; \ - sed "s|@FWLREL@|$(shell ${FWLREL}) (${FWLCODENAME})|" -i ${CHROOTDIR}/${TREE}/etc/issue.{en,hu}; \ - sed "s|username|${FWLUSER}|" -i ${CHROOTDIR}/${TREE}/etc/issue.{en,hu}; \ - sed "s|userpass|${FWUSERPASS}|" -i ${CHROOTDIR}/${TREE}/etc/issue.{en,hu}; \ - sed "s|rootpass|${FWROOTPASS}|" -i ${CHROOTDIR}/${TREE}/etc/issue.{en,hu}; \ + sed "s|VENDOR|${VENDOR}|" -i ${CHROOTDIR}/${TREE}/usr/local/bin/parse_cmdline; \ + sed "s|FWLREL|$(shell ${FWLREL}) (${FWLCODENAME})|" -i ${CHROOTDIR}/${TREE}/usr/local/bin/parse_cmdline; \ + sed "s|USERNAME|${FWLUSER}|" -i ${CHROOTDIR}/${TREE}/usr/local/bin/parse_cmdline; \ + sed "s|USERPASS|${FWUSERPASS}|" -i ${CHROOTDIR}/${TREE}/usr/local/bin/parse_cmdline; \ + sed "s|ROOTPASS|${FWROOTPASS}|" -i ${CHROOTDIR}/${TREE}/usr/local/bin/parse_cmdline; \ sed "s|SAVE_DIRS|${SAVEDIRS}|" -i ${CHROOTDIR}/${TREE}/usr/local/bin/configsave; \ fi diff --git a/config b/config index 40c420c..3f8f9a2 100644 --- a/config +++ b/config @@ -22,7 +22,7 @@ FWLFONT = lat2-16.psfu.gz # * SERVER # * MIN - comfortable console workstation # * MUSTHAVE - minimalistic one, base of all profiles -APPSGROUP = FULL +APPSGROUP = MUSTHAVE # grub title part 1 FWLSREL = FWLive-${APPSGROUP} diff --git a/issue.en b/issue.en deleted file mode 100644 index cfad427..0000000 --- a/issue.en +++ /dev/null @@ -1,23 +0,0 @@ - - ================================================================================================= - Welcome to FWLive @FWLREL@ by @VENDOR@ \l  - ================================================================================================= - -  The system is up and running now. - - Login as "username", with password "userpass" or - login as "root", with password "rootpass", both without quotes, lowercase. - -  After login, try the following commands: - - mc .... to start Midnight Commander (edit/copy/move/create/delete files) - configsave/configrestore - or use - service config save/restore ... - to save and restore all filesystem changes - fileswap .... to create special file for swapping RAM to your harddisk - make_disk .... to install FWLive, use make_disk script on FWLive CD - xstart .... to start KDE with autodetected settings (upon failure vesa driver will be used) - setup .... a script for your own settings - - When finished, use "poweroff" or "reboot" command and wait until it completes  - ================================================================================================= - diff --git a/issue.hu b/issue.hu deleted file mode 100644 index 20bd728..0000000 --- a/issue.hu +++ /dev/null @@ -1,26 +0,0 @@ - - ================================================================================================= - Üdvözöl az FWLive @FWLREL@ @VENDOR@ \l  - ================================================================================================= - -  A rendszer felált. - - Bejelentkezéshez használja a "username", ezzel a jelszóval "userpass" - vagy bejelentkezhet mint "root", ezzel a jelszóval "rootpass". - (Mindkettőt a leírtaknak megfelelően és kisbetüvel.) - -  Bejelentkezés után próbálja ki a következő parancsokat: - - mc .... ez indítja a Midnight Commandert - (fájlok szerkesztése/másolása/mozgatása/létrehozása/törlése) - configsave/configrestore .... - vagy használható a - service config save/restore - parancs a rendszerben történt változások mentésére és helyreállítására - fileswap .... készíthet egy speciális fájlt a merevlemezre, swapnak - make_disk .... az FWLive instalálásához, használja a make_disk scriptet - xstart .... elindítja a KDE ablakkezelőt az automatikusan észlelt beállításokkal - hiba esetén a VESA meghajtót használunk - setup .... beállító script a saját beállításainak - - Ha végzett, használja a "poweroff" vagy a "reboot" parancsot és várja meg amíg a rendszer leáll  - ================================================================================================= - diff --git a/parse_cmdline.in b/parse_cmdline.in index ea830c4..87af4b1 100644 --- a/parse_cmdline.in +++ b/parse_cmdline.in @@ -5,7 +5,9 @@ # parse_cmdline for Frugalware # distributed under GPL License -deflang="@FWLLLANG@" +TEXTDOMAIN=fwlive +TEXTDOMAINDIR=/usr/share/locale +deflang="FWLLLANG" lang=`grep lang /proc/cmdline|sed 's/.*lang=\([^ ]*\)\( .*\|$\)/\1/'` if [ -z "$lang" ]; then @@ -16,15 +18,12 @@ fwlcp=$(grep $lang /usr/share/locale/locale.alias|sed 's/.*\.//;q'|tr [A-Z] [a-z case $lang in en_*) keymap=us - ln -sf issue.en /etc/issue ;; hu_*) keymap=`echo $lang |sed 's/_.*//'` - ln -sf issue.hu /etc/issue ;; *) keymap=`echo $lang |sed 's/_.*//'` - ln -sf issue.en /etc/issue ;; esac cat << EOF > /etc/sysconfig/keymap @@ -39,3 +38,31 @@ export CHARSET=$fwlcp EOF chmod +x /etc/profile.d/lang.sh export LC_ALL=$lang + +# generate /etc/issue +gen_issue() +{ +printf '\n' +printf ' =================================================================================================\n' +printf ' ' +printf $"Welcome to FWLive %s by %s" "FWLREL" "VENDOR" +printf ' \l \n' +printf ' =================================================================================================' +printf '\n\n' +printf '  %s\n\n ' $"The system is up and running now." +printf $"Login as '%s', with password '%s' or" "USERNAME" "USERPASS" +printf '\n ' +printf $"login as 'root', with password '%s', both without quotes, lowercase." "ROOTPASS" +printf '\n\n  %s\n\n' $"After login, try the following commands:" +printf ' %s\n' $"mc .... to start Midnight Commander (edit/copy/move/create/delete files)" +printf ' %s \n' $"configsave/configrestore - or use - service config save/restore ..." +printf ' %s \n' $"to save and restore all filesystem changes" +printf ' %s\n' $"fileswap .... to create special file for swapping RAM to your harddisk" +printf ' %s\n' $"make_disk .... to install FWLive, use make_disk script on FWLive CD" +printf ' %s\n' $"xstart .... to start KDE with autodetected settings (upon failure vesa driver will be used)" +printf ' %s\n\n' $"setup .... a script for your own settings" +printf ' %s \n' $"When finished, use 'poweroff' or 'reboot' command and wait until it completes" +printf ' =================================================================================================\n\n' +} + +gen_issue > /etc/issue diff --git a/po/Makefile b/po/Makefile index 66343bc..c48a39d 100644 --- a/po/Makefile +++ b/po/Makefile @@ -19,6 +19,7 @@ mos: done pot: intltool-extract + ln -s parse_cmdline.in ../parse_cmdline for i in `cat POTFILES.in`; do \ ln -s `basename $$i .sh` ../$$i; \ done @@ -26,6 +27,7 @@ pot: intltool-extract for i in `cat POTFILES.in`; do \ rm ../$$i; \ done + rm ../parse_cmdline intltool-extract: cp /usr/bin/intltool-extract ./ diff --git a/po/POTFILES.in b/po/POTFILES.in index 9ac0e06..87636b2 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -5,3 +5,4 @@ rc.config.sh rc.fsupd.sh rc.fwlive.sh rc.parse_cmdline.sh +parse_cmdline.sh -- 1.5.3.4