Check-in [6a17e54d18]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview

SHA1 Hash:6a17e54d183660050a62512aa77f7f5e5030b541
Date: 2012-03-14 02:05:47
User: BarryK
Comment:MoManager: langpack pet may now include more po, mo, pot and t12s translation files

Tags And Properties
Changes

Changes to woof-code/rootfs-skeleton/etc/rc.d/rc.sysinit

@@ -68,10 +68,11 @@
 #120124 tracing problem of b43 firmware not loading, peebee posted udev trace, determined ssb uevent replay missing, found test for <2.6.24 kernel broken for 3.x.
 #120216 slight mods to make sss translation easy (see /usr/share/sss/script_strings).
 #120217 improvement for full hd install, non-english.
 #120301 need to load console font earlier.
 #120301 a problem if initrd has kernel default font, switching here changes all o/p from initrd to partial garbage.
+#120313 fix 120301 font garbage.
 
 #unset TZ #100319 busybox hwclock gives priority to this (rather than /etc/localtime) and 'init' has set it wrong.
 #...comment-out for now. note, TZ now set in rc.country.
 ORIGLANG="`grep '^LANG=' /etc/profile | cut -f 2 -d '=' | cut -f 1 -d ' '`" #120217
 ORIGLANG1="${ORIGLANG%_*}" #ex: en
@@ -131,13 +132,14 @@
 [ $pmedia ] && PMEDIA=$pmedia #boot parameter, broad category of boot media. ex: cd.
 [ $pdev1 ] && PDEV1=$pdev1    #boot parameter, partition have booted off. ex: hda3
 
 #120301 a problem if initrd has kernel default font, switching here changes all o/p from initrd to partial garbage.
 #workaround, clear the screen...
-if [ -d /initrd ];then
- PLANG=`grep '^PLANG=' /etc/rc.d/PUPSTATE | cut -f 2 -d '='`
- [ "${PLANG%_*}" != "en" ] && clear
+if [ -d /initrd ];then #120313 fix...
+ PLANG1=`grep '^PLANG=' /etc/rc.d/PUPSTATE | cut -f 2 -d '=' | cut -f 1 -d '_'`
+ [ ! "$PLANG1" ] && PLANG1='en'
+ [ "$ORIGLANG1" != "$PLANG1" ] && clear
 fi
 load_consolefont #120301 if this was done in initrd then it would carry through, and this would not be needed.
 #...this is done in rc.country, but needs to be move above all the o/p to /dev/console.
 
 STATUS=0

Changes to woof-code/rootfs-skeleton/usr/sbin/momanager

@@ -28,10 +28,11 @@
 #120228 sync doc_strings sss file.
 #120307 ROX-Filer now translated via /usr/share/doc/nls/ROX-Filer/ROX-Filer.pot
 #120308 ROX-Filer .mo files are not in standard location. workaround when intltool-update fails.
 #120309 binary executables, option to retain po file for later editing (instead of uncompile mo).
 #120313 langpack pet help msg improved.
+#120313 langpack pet: offer to find more po, mo, pot and t12s translations.
 
 #***MOMANAGER IS ENGLISH ONLY (NOT GETTEXT'ED)***
 #it is for use by developers/translators with knowledge of english.
 
 PARAM1=""
@@ -1425,10 +1426,34 @@
    mkdir -p /root/langpack_${GENLANG}-${ADATE}"${ADIR}"
    cp -a -f "$ALINE" /root/langpack_${GENLANG}-${ADATE}"${ADIR}"/
   done
   mv -f /root/langpack_${GENLANG}-${ADATE}/usr/share/applications /root/langpack_${GENLANG}-${ADATE}/usr/share/applications.in
   mv -f /root/langpack_${GENLANG}-${ADATE}/usr/share/desktop-directories /root/langpack_${GENLANG}-${ADATE}/usr/share/desktop-directories.in
+  pupdialog --background 'orange' --backtitle "Langpack PET almost done" --colors --yes-label "Build PET" --no-label "Find all" --yesno "The langpack has been assembled in folder /root/langpack_${GENLANG}-${ADATE}, ready to be made into a PET. Click \ZbBuild PET\ZB to do this now. However, if you want, you can click \ZbFind all\ZB to tell MoManager to hunt for any other mo, po, pot (and any named ${ORIGLANG12}:*, some t12s translations) files in the system and include those in the PET..." 0 0
+  if [ $? -eq 1 ];then
+   find /usr -type f -name '*.po' -o -name '*.mo' | grep "/${ORIGLANG1}" |
+   while read ALINE
+   do
+    ADIR="`dirname "$ALINE"`"
+    mkdir -p /root/langpack_${GENLANG}-${ADATE}"${ADIR}"
+    cp -a -f "$ALINE" /root/langpack_${GENLANG}-${ADATE}"${ADIR}"/
+   done
+   find /usr -type f -name '*.pot' |
+   while read ALINE
+   do
+    ADIR="`dirname "$ALINE"`"
+    mkdir -p /root/langpack_${GENLANG}-${ADATE}"${ADIR}"
+    cp -a -f "$ALINE" /root/langpack_${GENLANG}-${ADATE}"${ADIR}"/
+   done
+   find /usr -type f -name "${ORIGLANG1}_[A-Z][A-Z]:*" |
+   while read ALINE
+   do
+    ADIR="`dirname "$ALINE"`"
+    mkdir -p /root/langpack_${GENLANG}-${ADATE}"${ADIR}"
+    cp -a -f "$ALINE" /root/langpack_${GENLANG}-${ADATE}"${ADIR}"/
+   done
+  fi
   sync
   cd /root
   dir2tgz /root/langpack_${GENLANG}-${ADATE}
   tgz2pet /root/langpack_${GENLANG}-${ADATE}.tar.gz
   sync