Check-in [3736ce15d6]
Not logged in

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

Overview

SHA1 Hash:3736ce15d63eb1604c2f52b736ae5ce5345b0d63
Date: 2012-09-27 00:43:17
User: BarryK
Comment:strings CATEGORY: and PACKAGE: were not translated in ppm

Tags And Properties
Changes

Changes to woof-code/rootfs-skeleton/usr/local/petget/downloadpkgs.sh

@@ -18,10 +18,11 @@
 #120203 BK: internationalized.
 #120313 'noarch' repo is on quirky ibiblio site.
 #120515 support download from arm gentoo compat-distro binary pkgs on ibiblio quirky site.
 #120904 vertical scrollbar for successful-install window. 120907 another.
 #120908 fixes for composing repo-list.
+#120927 want to translate "CATEGORY:" and "PACKAGE:" that are in /tmp/petget-installed-pkgs-log (see installpkg.sh).
 
 export TEXTDOMAIN=petget___downloadpkgs.sh
 export OUTPUT_CHARSET=UTF-8
 
 #export LANG=C
@@ -282,19 +283,25 @@
   BUTTONS9="<hbox>
     <button ok></button>
    </hbox>"
  fi
  INSTALLEDMSG="`cat /tmp/petget-installed-pkgs-log`"
+ #120927 want to translate "CATEGORY:" and "PACKAGE:" that are in /tmp/petget-installed-pkgs-log (see installpkg.sh)...
+ ZCATEGORY="$(gettext 'CATEGORY:')"
+ ZPACKAGE="$(gettext 'PACKAGE:')"
+ ZPTN1="s%CATEGORY:%${ZCATEGORY}%"
+ ZPTN2="s%PACKAGE:%${ZPACKAGE}%"
+ ZINSTALLEDMSG="$(sed -e "$ZPTN1" -e "$ZPTN2" /tmp/petget-installed-pkgs-log)"
  CAT_MSG="$(gettext 'Note: the package(s) do not have a menu entry.')"
  [ "`echo "$INSTALLEDMSG" | grep -o 'CATEGORY.*' | grep -v 'none'`" != "" ] && CAT_MSG="$(gettext '...look in the appropriate category in the menu (bottom-left of screen) to run the application. Note, some packages do not have a menu entry.')" #424 fix. 101016 fix.
  #120904 vertical scrollbar...
  export INSTALL_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">
   <vbox>
    <pixmap><input file>/usr/local/lib/X11/pixmaps/ok.xpm</input></pixmap>
    <text><label>$(gettext 'The following packages have been successfully installed:')</label></text>
    <vbox scrollable=\"true\" height=\"100\">
-    <text wrap=\"false\" use-markup=\"true\"><label>\"<b>${INSTALLEDMSG}</b>\"</label></text>
+    <text wrap=\"false\" use-markup=\"true\"><label>\"<b>${ZINSTALLEDMSG}</b>\"</label></text>
    </vbox>
    <text><label>${CAT_MSG}</label></text>
    ${BUTTONS9}
   </vbox>
  </window>

Changes to woof-code/rootfs-skeleton/usr/local/petget/petget

@@ -23,10 +23,11 @@
 #120203 BK: internationalized.
 #120323 replace 'xmessage' with 'pupmessage'.
 #120504 now have /tmp/petget folder.
 #120719 support raspbian.
 #120819 having a category does not mean there will also be a menu entry.
+#120927 want to translate "CATEGORY:" and "PACKAGE:" that are in /tmp/petget-installed-pkgs-log (see installpkg.sh).
 
 export TEXTDOMAIN=petget___petget
 export OUTPUT_CHARSET=UTF-8
 
 [ "`whoami`" != "root" ] && exec sudo -A ${0} ${@} #110505
@@ -242,10 +243,16 @@
  gtkdialog3 --program=FAIL_DIALOG
  exit
 fi
 
 INSTALLEDMSG="`cat /tmp/petget-installed-pkgs-log`"
+#120927 want to translate "CATEGORY:" and "PACKAGE:" that are in /tmp/petget-installed-pkgs-log (see installpkg.sh)...
+ZCATEGORY="$(gettext 'CATEGORY:')"
+ZPACKAGE="$(gettext 'PACKAGE:')"
+ZPTN1="s%CATEGORY:%${ZCATEGORY}%"
+ZPTN2="s%PACKAGE:%${ZPACKAGE}%"
+ZINSTALLEDMSG="$(sed -e "$ZPTN1" -e "$ZPTN2" /tmp/petget-installed-pkgs-log)"
 MENUMSG=""
 INSTALLEDCAT="`echo -n "$INSTALLEDMSG" | rev | cut -f 1 -d ' ' | rev`"
 if [ "$INSTALLEDCAT" = "none" ];then
  MENUMSG="<text><label>$(gettext '...note, this package does not have a menu entry.')</label></text>"
 else
@@ -260,11 +267,11 @@
 #installpkg.sh will have logged to /tmp/petget-installed-pkgs-log
 export INSTALL_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">
  <vbox>
  <pixmap><input file>/usr/local/lib/X11/pixmaps/ok.xpm</input></pixmap>
   <text><label>$(gettext 'The following package has been successfully installed:')</label></text>
-  <text use-markup=\"true\"><label>\"<b>${INSTALLEDMSG}</b>\"</label></text>
+  <text use-markup=\"true\"><label>\"<b>${ZINSTALLEDMSG}</b>\"</label></text>
   ${MENUMSG}
   <hbox>
    <button ok></button>
   </hbox>
  </vbox>