Check-in [49d5144356]
Not logged in

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

Overview

SHA1 Hash:49d51443566398d6550c3dc7120b5832c2f1bcf5
Date: 2012-02-24 15:36:33
User: BarryK
Comment:MoManager now manages translation of entire documentation files, see /usr/share/sss/doc_strings

Tags And Properties
Changes

Changes to woof-code/rootfs-skeleton/usr/local/petget/help-fr.htm

@@ -1,1 +1,197 @@
-
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+  <head>
+    <meta http-equiv="content-type" content="text/html;
+      charset=ISO-8859-1">
+    <title>PPM Help</title>
+  </head>
+  <body>
+    <br>
+    <table style="text-align: left; width: 700px; margin-left: auto;
+      margin-right: auto;" border="0" cellpadding="2" cellspacing="2">
+      <tbody>
+        <tr>
+          <td style="vertical-align: top;">
+            <h1>Gestionnaire des paquets (PPM) </h1>
+            "Paquet" est le terme Linux pour d&eacute;signer une
+            application. Ces paquets sont gard&eacute;s en ligne, dans
+            des d&eacute;p&ocirc;ts, et vous pouvez
+            t&eacute;l&eacute;charger et installer n'importe quel
+            paquet.<br>
+            <h2>Comment les installer</h2>
+            Cliquez sur un bouton radio tout en haut pour choisir le
+            d&eacute;p&ocirc;t d&eacute;sir&eacute;.
+            G&eacute;n&eacute;ralement le plus &agrave; gauche est le
+            plus appropri&eacute; &agrave; votre version de
+            Puppy/Toutou.<br>
+            <br>
+            Les boutons radio align&eacute;s verticalement sur la gauche
+            vous permettent de restreindre l'affichage &agrave; une
+            cat&eacute;gorie sp&eacute;cifique.<br>
+            <br>
+            Remarque sur les case &agrave; cocher EXE, DEV, DOC et NLS.
+            Beaucoup de paquets PET sont divis&eacute;s en petits
+            paquets :<br>
+            <br>
+            EXE: C'est l'application en elle-m&ecirc;me, vous en avez
+            absolument besoin (ne pas confondre avec les fichiers .exe
+            de Windows).<br>
+            DEV: Contient des fichiers de d&eacute;veloppement. N'a
+            d'int&eacute;r&ecirc;t que pour la compilation du code
+            source .<br>
+            DOC: Contient les fichiers de documentation de l'ensemble.<br>
+            NLS: Contient les fichiers de langue du paquet.<br>
+            <br>
+            Notez que tous les paquets (si vous installez uniquement le
+            paquet "EXE")
+            sont en anglais. Le paquet NLS ajoutera la prise en charge
+            d'autres langues,
+            mais cela varie consid&eacute;rablement d'un paquet &agrave;
+            l'autre. Certains paquets ne
+            prennent pas en charge d'autre langue que l'anglais.<br>
+            <br>
+            Les paquets PET suivent la convention d'appellation suivante
+            :<br>
+            <br>
+            <div style="margin-left: 40px;">
+              abiword-1.2.3.pet ("EXE" package)<br>
+              abiword_DEV-1.2.3.pet<br>
+              abiword_DOC-1.2.3.pet<br>
+              abiword_NLS-1.2.3.pet<br>
+            </div>
+            <br>
+            Malheureusement tous les auteurs de paquets PET ne suivent
+            pas la pratique de fractionnement des paquets PET. Dans
+            certains cas ce peut &ecirc;tre, par exemple,
+            "abiword-1.2.3.pet" avec tous les &eacute;l&eacute;ments
+            ("EXE", DEV, DOC, NLS). La raison de
+            la division est de r&eacute;duire la taille des paquets EXE.<br>
+            <br>
+            Lorsque vous cliquez sur un des paquets affich&eacute;s dans
+            la grande fen&ecirc;tre,
+            une autre fen&ecirc;tre s'ouvre pour vous demander de
+            confirmer que vous voulez vraiment installer le paquet, et
+            propose &eacute;galement de plus amples informations sur ce
+            paquet. Ainsi vous pouvez en apprendre davantage avant de
+            d&eacute;cider de l'installer.<br>
+            <h2>Comment d&eacute;sinstaller</h2>
+            Quand un paquet est install&eacute;, il appara&icirc;t dans
+            la fen&ecirc;tre du bas.<br>
+            Pour d&eacute;sinstaller un paquet, il vous suffit de
+            cliquer dessus. Une fen&ecirc;tre apparaitra pour vous
+            demander de confirmer la suppression.<br>
+            <h2>D&eacute;pots PET</h2>
+            Il existe diff&eacute;rents d&eacute;pots de paquets PET.
+            Ceux propos&eacute;s d&eacute;pendront de la version
+            de Puppy/Toutou que vous utilisez, mais en
+            g&eacute;n&eacute;ral il y aura au moins un de
+            ceux-l&agrave;:<br>
+            <br>
+            <div style="margin-left: 40px;">
+              puppy-2: La tr&egrave;s vielle s&eacute;rie de Puppy 2.x<br>
+              puppy-3: La s&eacute;rie de Puppy 3.x<br>
+              puppy-4: La s&eacute;rie de Puppy 4.x<br>
+              puppy-5: La s&eacute;rie de Puppy 5.x<br>
+            </div>
+            <br>
+            Pour votre Puppy/Toutou, vous pouvez &eacute;galement en
+            avoir d'autres, comme 'puppy-quirky', 'puppy-wary5', ou
+            'puppy-lucid'.<br>
+            <br>
+            En r&egrave;gle g&eacute;n&eacute;rale, utilisez ceux qui
+            semblent les plus appropri&eacute;es &agrave; votre version
+            de Puppy/Toutou. Les plus anciens ont des paquets qui
+            peuvent ou pas fonctionner
+            pour votre version. Plus le d&eacute;pot sera ancien plus ce
+            sera le cas. <br>
+            <br>
+            Nous gardons les anciens d&eacute;p&ocirc;ts disponibles,
+            parce qu'il arrive parfois que vous souhaitez utiliser
+            certains vieux paquets. Mais en r&egrave;gle
+            g&eacute;n&eacute;rale, cherchez dans les
+            d&eacute;p&ocirc;ts les plus r&eacute;cents en premier.<br>
+            <br>
+            Votre version de Puppy/Toutou peut &ecirc;tre construite
+            &agrave; partir des paquets de l'une des autres grandes
+            distributions Linux, comme Debian, Ubuntu ou Slackware. Dans
+            ce cas,
+            PPM offrira ces d&eacute;pots. Ils seront les plus
+            compatibles et ceux que vous devrez rechercher en premier.<br>
+            <br>
+            Bien s&ucirc;r, les paquets des autres distributions ne sont
+            pas des paquets PET. Les paquets PET poss&egrave;dent le
+            suffixe .pet (extension du fichier).<br>
+            Debian et Ubuntu ont des paquets DEB, avec le suffixe
+            ".deb".<br>
+            Les paquets Slackware ont comme suffixe ".tgz" ou ".txz".<br>
+            Quel que soit le type de paquet, PPM est capable de
+            l'installer.<br>
+            <br>
+            <h2>
+              Recherche</h2>
+            La boite "Rech." vous permet de rechercher n'importe quel
+            fichier, mais notez qu'il ne recherche que dans le
+            d&eacute;pot s&eacute;lectionn&eacute;.<br>
+            <br>
+            Vous pouvez taper un nom partiel, mais la correpondance
+            n'est trouv&eacute;e que de la gauche. Par exemple, si vous
+            effectuez une recherche pour "pan" vous allez trouver ceci :<br>
+            <br>
+            <div style="margin-left: 40px;">pango-1.28.1-w5 Library for
+              layout and rendering of internationalized text<br>
+              pango_DOC-1.28.1-w5 Library for layout and rendering of
+              internationalized text<br>
+              pangomm-2.26.2-w5 oo wrapper for pango library<br>
+              pangomm_DOC-2.26.2-w5 oo wrapper for pango library<br>
+              panoramixproto-1.1-w5 Panoramix extension headers<br>
+            </div>
+            <br>
+            Mais faire une recherche sur "mm" ne donnera rien, parce
+            qu'il n'y a pas de nom de paquet commen&ccedil;ant par "mm".<br>
+            <br>
+            Cependant, la bo&icirc;te de recherche acceptera les jokers
+            '*', que nous appelons les "Jokers globaux". Donc, taper "*
+            mm&raquo; permettra de trouver tous les paquets avec "mm"
+            dans le nom.<br>
+            <br>
+            Vous pouvez m&ecirc;me avoir des jokers multiples, par
+            exemple "p*mix*to", trouvera le paquet 'panoramixproto'.<br>
+            <br>
+            La recherche est insensible &agrave; la casse, ainsi une
+            recherche pour "PAN" donnera les m&ecirc;mes
+            r&eacute;sultats que plus haut.<br>
+            <br>
+            Autre chose &agrave; noter, la recherche est
+            effectu&eacute;e dans la totalit&eacute; du d&eacute;pot, et
+            ignore les boutons radio des cat&eacute;gories sur le
+            cot&eacute; gauche.<br>
+            <br>
+            <h2>Installation sans l'interface graphique PPM</h2>
+            Vous pouvez actuellement t&eacute;l&eacute;charger n'importe
+            quel paquet de n'importe o&ugrave; et l'installer. Tout ce
+            que vous avez &agrave; faire est de cliquer sur le paquet
+            dans la fen&ecirc;tre du gestionnaire de fichiers, et la
+            composante de l'installateur de paquet de PPM
+            s'ex&eacute;cutera et installera le paquet. Cela fonctionne
+            pour de nombreux types de paquets, y compris les PET,
+            Ubuntu/Debian DEB et les paquets Slackware et Arch.<br>
+            <br>
+            Notez toutefois, si vous installez un paquet individuel de
+            cette fa&ccedil;on, sans passer par l'interface graphique
+            PPM, toutes les d&eacute;pendances ne seront pas&nbsp;
+            forc&eacute;ment install&eacute;es, et vous devrez vous en
+            assurer vous-m&ecirc;me.<br>
+            <br>
+            Une bonne chose, un paquet install&eacute; de cette
+            mani&egrave;re sera affich&eacute; dans la fen&ecirc;tre des
+            paquets install&eacute;s de l'interface graphique PPM et il
+            pourra donc &ecirc;tre d&eacute;sinstall&eacute;.<br>
+            <br>
+            Cordialement,<br>
+            Barry Kauler, Dec. 2010</td>
+        </tr>
+      </tbody>
+    </table>
+    <br>
+  </body>
+</html>

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

@@ -1,10 +1,16 @@
 #default user interface.
 #120203 rodin.s: internationalized.
+#120224 handle translated help.htm
 
 export TEXTDOMAIN=petget___ui_Classic
 export OUTPUT_CHARSET=UTF-8
+
+#120224 handle translated help.htm
+LANG1="${LANG%_*}" #ex: de
+HELPFILE="/usr/local/petget/help.htm"
+[ -f /usr/local/petget/help-${LANG1}.htm ] && HELPFILE="/usr/local/petget/help-${LANG1}.htm"
 
 export MAIN_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\">
 
 <vbox>
  <hbox>
@@ -52,11 +58,11 @@
    <checkbox><default>${DEF_CHK_NLS}</default><label>NLS</label><variable>CHK_NLS</variable><action>/tmp/filterpkgs.results.postfilter.sh NLS \$CHK_NLS</action><action>refresh:TREE1</action></checkbox>
   </hbox>
 
   <hbox>
    <text><label>$(gettext 'Help:')</label></text>
-   <button><input file>/usr/local/lib/X11/mini-icons/mini-question.xpm</input><action>defaulthtmlviewer file:///usr/local/petget/help.htm & </action></button>
+   <button><input file>/usr/local/lib/X11/mini-icons/mini-question.xpm</input><action>defaulthtmlviewer file://${HELPFILE} & </action></button>
   </hbox>
 
   <hbox>
    <text><label>$(gettext 'Find:')</label></text>
    <entry activates-default=\"true\">

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

@@ -1,8 +1,9 @@
 #alternate user interface designed by zigbert.
 #120203 rodin.s: internationalized.
 #120224 more gettext's required. icons were missing.
+#120224 handle translated help.htm
 
 export TEXTDOMAIN=petget___ui_Ziggy
 export OUTPUT_CHARSET=UTF-8
 
 ALLITEM='' ; ALLSTOCK='' ; CATHEIGHT='100' ; WINHEIGHT='380'
@@ -10,10 +11,15 @@
  ALLITEM="<item stock=\"gtk-ALL\">$(gettext 'ALL')</item>"
  ALLSTOCK='stock["gtk-ALL"] = {{ "pet24.png", *, *, *}}'
  CATHEIGHT='112'
  WINHEIGHT='388'
 fi
+
+#120224 handle translated help.htm
+LANG1="${LANG%_*}" #ex: de
+HELPFILE="/usr/local/petget/help.htm"
+[ -f /usr/local/petget/help-${LANG1}.htm ] && HELPFILE="/usr/local/petget/help-${LANG1}.htm"
 
 export MAIN_DIALOG="<window title=\"$(gettext 'Puppy Package Manager')\" icon-name=\"gtk-about\" default_height=\"${WINHEIGHT}\" default_width=\"680\">
 <hbox>
  <vbox>
   <hbox>
@@ -28,11 +34,11 @@
     <action>/usr/local/petget/filterpkgs.sh</action>
     <action>refresh:TREE1</action>
    </button>
    <button tooltip-text=\"$(gettext 'Help')\">
     <input file>/usr/local/lib/X11/pixmaps/help24.png</input>
-    <action>defaulthtmlviewer file:///usr/local/petget/help.htm & </action>
+    <action>defaulthtmlviewer file://${HELPFILE} & </action>
    </button>
    <button type=\"exit\"  tooltip-text=\"$(gettext 'Quit package manager')\">
     <input file>/usr/local/lib/X11/pixmaps/shutdown24.png</input>
    </button>
    </hbox>

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

@@ -20,11 +20,12 @@
 #120214 generate a langpack PET package.
 #120215 added management of initrd files (initrd_strings SSS domain).
 #120217 small message fixes.
 #120217 support poeditor.
 #120218 LANG=${ORIGLANG} prefix needed various places. 120219 a few more.
-#1202120 need 'head -n1' ex: /usr/local/petget/ui_Classic has export TEXTDOMAIN in two places.
+#120220 need 'head -n1' ex: /usr/local/petget/ui_Classic has export TEXTDOMAIN in two places.
+#120224 add 'doc_strings' sss domain, for translating entire files (typically documentation files).
 
 #***MOMANAGER IS ENGLISH ONLY (NOT GETTEXT'ED)***
 #it is for use by developers/translators with knowledge of english.
 
 PARAM1=""
@@ -366,10 +367,27 @@
 #manage translations in many non-executable data files.
 #translations are kept in /usr/share/sss/$SSSDOMAIN/$SSSDOMAIN.$ORIGLANG1 ex: SSSDOMAIN=menu_strings ORIGLANG1=de
 YESSSS_XML=""; NOSSS_XML=""
 for ASSSDOMAIN in `find /usr/share/sss -mindepth 1 -maxdepth 1 -type d | sed -e 's%^/usr/share/sss/%%' | tr '\n' ' '`
 do
+
+ #120224 doc_strings is a special case, the translated file is elsewhere...
+ if [ -f /usr/share/sss/${ASSSDOMAIN}/${ASSSDOMAIN}.${ORIGLANG1} ];then
+  if [ "$ASSSDOMAIN" = "doc_strings" ];then
+   TRANSFLAG='fail'
+   TRANSLATEDFILES="`grep '^SSS_TRANSLATION_RULE' /usr/share/sss/${ASSSDOMAIN}/${ASSSDOMAIN}.${ORIGLANG1} | cut -f 2 -d "'" | sed -e "s%SSSLANG1MARKER%${ORIGLANG1}%" | tr '\n' ' '`" #'geanyfix
+   for ATRANSLATEDFILE in $TRANSLATEDFILES
+   do
+    if [ -f $ATRANSLATEDFILE ];then
+     echo "$ATRANSLATEDFILE" >> /tmp/momanager/translations4langpack
+     TRANSFLAG='success'
+    fi
+   done
+   [ "$TRANSFLAG" = "fail" ] && rm -f /usr/share/sss/${ASSSDOMAIN}/${ASSSDOMAIN}.${ORIGLANG1} #because translated file(s) does not exist.
+  fi
+ fi
+
  if [ -f /usr/share/sss/${ASSSDOMAIN}/${ASSSDOMAIN}.${ORIGLANG1} ];then
   #there is already a translation.
   YESSSS_XML="${YESSSS_XML}
 <item>${ASSSDOMAIN}.${ORIGLANG1}</item>"
   echo "/usr/share/sss/${ASSSDOMAIN}/${ASSSDOMAIN}.${ORIGLANG1}" >> /tmp/momanager/translations4langpack
@@ -398,11 +416,14 @@
 
 <b>script_strings</b>
 These are translations for scripts. The SSS method works on original scripts (in any language, ex: Bash, Lua, Perl, Tcl), whereas the gettext and t12s methods require editing of the script (however, gettext is a much more powerful translation technique).
 
 <b>initrd_strings</b>
-These are translations for files in the initrd (also known as the initramfs). This is a bit different from the other SSS domains, as the target files are translated at bootup, every bootup."
+These are translations for files in the initrd (also known as the initramfs). This is a bit different from the other SSS domains, as the target files are translated at bootup, every bootup.
+
+<b>doc_strings</b>
+This is totally different from the above, as translated copies are made of entire files, using a suitable editor -- this is typically documentation files."
 YESSSS_HELP_MSG="<b>SSS</b> means Simple String Substitution, a simple method of language translation for any type of text files. Files are translated in-place, that is, the original English files are replaced by the translated files -- this is translation <i>before</i> execution, as opposed to gettext which is run-time translation. An <b>SSS domain</b> defines a class of files that need to be translated. The drop-down list contains domains that have <b>${ORIGLANG1}</b> translations, however do check them as the translations may be incomplete. The headings below are the various domains:
 ${SSS_DOMAINS_MSG}"
 export DLG_HELP_YESSSS="<window resizable=\"false\" title=\"MoManager: Help edit SSS domains\" icon-name=\"${HELPICON}\" window_position=\"1\"><vbox><text use-markup=\"true\"><label>\"${YESSSS_HELP_MSG}\"</label><variable>VAR_HELP_YESSSS</variable></text><hbox><button><label>Close</label><action type=\"closewindow\">VAR_HELP_YESSSS</action></button></hbox></vbox></window>"
 YESSSSHELP_XML='<button><input file>/usr/local/lib/X11/mini-icons/mini-question.xpm</input><action type="launch">DLG_HELP_YESSSS</action></button>'
 NOSSS_HELP_MSG="<b>SSS</b> means Simple String Substitution, a simple method of language translation for any type of text files. Files are translated in-place, that is, the original English files are replaced by the translated files -- this is translation <i>before</i> execution, as opposed to gettext which is run-time translation. An <b>SSS domain</b> defines a class of files that need to be translated. The drop-down list contains domains that do <i>not</i> have <b>${ORIGLANG1}</b> translations (so any on-screen text will be in English). The headings below are the various domains:
@@ -956,12 +977,71 @@
   exec momanager reenter
  ;;
  create_sss) #BK's Simple String Substitution method.
   APKGNAME="WOOF"
   SSSFILE="$NOSSS_COMBO" #ex: menu_strings (located at /usr/share/sss/menu_strings/)
-  cp -f /usr/share/sss/$SSSFILE/$SSSFILE /tmp/momanager/$SSSFILE.$ORIGLANG1
+  cp -f /usr/share/sss/$SSSFILE/$SSSFILE /usr/share/sss/$SSSFILE/$SSSFILE.$ORIGLANG1
   sync
+
+  #120224 special handling req'd for doc_strings...
+  if [ "$SSSFILE" = "doc_strings" ];then
+   for ASECTIONID in `grep '^\[' /usr/share/sss/$SSSFILE/${SSSFILE}.${ORIGLANG1} | tr -d '[' | tr -d ']' | tr '\n' ' '` #ex: general _usr_local_petget_help.htm
+   do
+    sPTN="/^\[${ASECTIONID}\]/,/^$/p" #this is a multi-line block find expression.
+    CODEBLOCK="`sed -n "$sPTN" /usr/share/sss/$SSSFILE/${SSSFILE}.${ORIGLANG1} | sed -e '/^#/d' -e '/^$/d' -e '/^\[/d'`" #extracts just the relevant block of lines.
+    [ ! "$CODEBLOCK" ] && continue #precaution.
+    #allow any character to be the 'marker' for / in the section-id...
+    MARKERCHAR="`echo -n "$ASECTIONID" | cut -c 1`"
+    TARGETFILE="`echo -n "$ASECTIONID" | tr "${MARKERCHAR}" '/'`" #ex: /usr/local/petget/help.htm
+    [ ! -f "$TARGETFILE" ] && continue #precaution.
+    eval "$CODEBLOCK" #has variables SSS_HANDLER_EDITOR, SSS_TRANSLATION_RULE
+    SSS_TRANSLATION_FILE="`echo -n "$SSS_TRANSLATION_RULE" | sed -e "s%SSSLANG1MARKER%${ORIGLANG1}%"`"
+    case $SSS_HANDLER_EDITOR in
+     defaulthtmleditor)
+      killall seamonkey 2>/dev/null
+      killall seamonkey-bin 2>/dev/null
+      killall geany 2>/dev/null
+     ;;
+     *) #defaulttexteditor
+      killall geany 2>/dev/null
+     ;;
+    esac
+    [ ! -f "$SSS_TRANSLATION_FILE" ] && cp -a -f $TARGETFILE $SSS_TRANSLATION_FILE
+    echo '#!/bin/sh
+    sleep 3
+    yaf-splash -bg orange -placement top -timeout 9 -text "This is the original English file. Use this for reference only, do not edit. PLEASE WAIT..."
+    ' > /tmp/momanager/yafmsg5a
+    chmod 755 /tmp/momanager/yafmsg5a
+    /tmp/momanager/yafmsg5a & #msg has delay so will appear on top of text editor window.
+    defaulttexteditor "$TARGETFILE" &
+    dPID=$!
+    sleep 10
+    echo '#!/bin/sh
+    sleep 3
+    yaf-splash -bg yellow -placement top -timeout 11 -text "You must translate all of the text in this file to '${ORIGLANG1}' language. Edit, then Save, then Quit. Note, if you do not want to change anything, just Quit the editor..."
+    ' > /tmp/momanager/yafmsg5b
+    chmod 755 /tmp/momanager/yafmsg5b
+    /tmp/momanager/yafmsg5b & #msg has delay so will appear on top of text editor window.
+    xASTAT1="`stat --format=%Y "$SSS_TRANSLATION_FILE"`" #seconds since epoch.
+    LANG=${ORIGLANG} ${SSS_HANDLER_EDITOR} ${SSS_TRANSLATION_FILE}
+    xASTAT2="`stat --format=%Y "$SSS_TRANSLATION_FILE"`" #seconds since epoch.
+    kill $dPID
+    [ "$xASTAT1" = "$xASTAT2" ] && continue
+    DIRTRANSLATIONFILE="`dirname "${SSS_TRANSLATION_FILE}"`"
+    mkdir -p /root/MoManager-${ORIGLANG12}-${APKGNAME}${DIRTRANSLATIONFILE}
+    cp -a -f "${SSS_TRANSLATION_FILE}" /root/MoManager-${ORIGLANG12}-${APKGNAME}${DIRTRANSLATIONFILE}/
+    echo "MACTION=${EXIT} TODAY_DATE=${ADATE} TRANS_FILE='${SSS_TRANSLATION_FILE}' AUTHOR='${AUTHORSPECS}'" >> /root/MoManager-${ORIGLANG12}-${APKGNAME}/write.log
+    pupdialog --background green --colors --backtitle "MoManager: SSS edit completed" --msgbox "You have translated file \Zb${SSS_TRANSLATION_FILE}\ZB. Click OK button to continue..." 0 0
+   done
+   mkdir -p /root/MoManager-${ORIGLANG12}-${APKGNAME}
+   echo "MACTION=${EXIT} TODAY_DATE=${ADATE} SSS_FILE='/usr/share/sss/${SSSFILE}/${SSSFILE}.${ORIGLANG1}' AUTHOR='${AUTHORSPECS}'" >> /root/MoManager-${ORIGLANG12}-${APKGNAME}/write.log
+   mkdir -p /root/MoManager-${ORIGLANG12}-${APKGNAME}/usr/share/sss/${SSSFILE}/
+   cp -f /usr/share/sss/${SSSFILE}/$SSSFILE.$ORIGLANG1 /root/MoManager-${ORIGLANG12}-${APKGNAME}/usr/share/sss/${SSSFILE}/
+   export LANG=$ORIGLANG
+   exec momanager reenter
+  fi
+
   killall geany 2>/dev/null
   echo '#!/bin/sh
   sleep 3
   yaf-splash -bg yellow -placement top -timeout 9 -text "The SSS file is now open in a text editor. You must only edit between the last two % characters. Edit, then Save, then Quit text editor..."
   ' > /tmp/momanager/yafmsg5
@@ -1024,10 +1104,67 @@
  edit_sss)
   APKGNAME="WOOF"
   SSSFILE="$YESSSS_COMBO" #ex: menu_strings.de (located at /usr/share/sss/menu_strings/)
   SSSFILE="`echo -n "$SSSFILE" | rev | cut -f 2-9 -d '.' | rev`" #dump the extension, ex: menu_strings.de -> menu_strings
   #cp -f /usr/share/sss/$SSSFILE/$SSSFILE.$ORIGLANG1 /tmp/momanager/$SSSFILE.$ORIGLANG1
+
+  #120224 special handling req'd for doc_strings...
+  if [ "$SSSFILE" = "doc_strings" ];then
+   for ASECTIONID in `grep '^\[' /usr/share/sss/$SSSFILE/${SSSFILE}.${ORIGLANG1} | tr -d '[' | tr -d ']' | tr '\n' ' '` #ex: general _usr_local_petget_help.htm
+   do
+    sPTN="/^\[${ASECTIONID}\]/,/^$/p" #this is a multi-line block find expression.
+    CODEBLOCK="`sed -n "$sPTN" /usr/share/sss/$SSSFILE/${SSSFILE}.${ORIGLANG1} | sed -e '/^#/d' -e '/^$/d' -e '/^\[/d'`" #extracts just the relevant block of lines.
+    [ ! "$CODEBLOCK" ] && continue #precaution.
+    #allow any character to be the 'marker' for / in the section-id...
+    MARKERCHAR="`echo -n "$ASECTIONID" | cut -c 1`"
+    TARGETFILE="`echo -n "$ASECTIONID" | tr "${MARKERCHAR}" '/'`" #ex: /usr/local/petget/help.htm
+    [ ! -f "$TARGETFILE" ] && continue #precaution.
+    eval "$CODEBLOCK" #has variables SSS_HANDLER_EDITOR, SSS_TRANSLATION_RULE
+    SSS_TRANSLATION_FILE="`echo -n "$SSS_TRANSLATION_RULE" | sed -e "s%SSSLANG1MARKER%${ORIGLANG1}%"`"
+    case $SSS_HANDLER_EDITOR in
+     defaulthtmleditor)
+      killall seamonkey 2>/dev/null
+      killall seamonkey-bin 2>/dev/null
+      killall geany 2>/dev/null
+     ;;
+     *) #defaulttexteditor
+      killall geany 2>/dev/null
+     ;;
+    esac
+    [ ! -f "$SSS_TRANSLATION_FILE" ] && cp -a -f $TARGETFILE $SSS_TRANSLATION_FILE
+    echo '#!/bin/sh
+    sleep 3
+    yaf-splash -bg orange -placement top -timeout 9 -text "This is the original English file. Use this for reference only, do not edit. PLEASE WAIT..."
+    ' > /tmp/momanager/yafmsg5a
+    chmod 755 /tmp/momanager/yafmsg5a
+    /tmp/momanager/yafmsg5a & #msg has delay so will appear on top of text editor window.
+    defaulttexteditor "$TARGETFILE" &
+    dPID=$!
+    sleep 10
+    echo '#!/bin/sh
+    sleep 3
+    yaf-splash -bg yellow -placement top -timeout 11 -text "You must translate all of the text in this file to '${ORIGLANG1}' language. Edit, then Save, then Quit. Note, if you do not want to change anything, just Quit the editor..."
+    ' > /tmp/momanager/yafmsg5b
+    chmod 755 /tmp/momanager/yafmsg5b
+    /tmp/momanager/yafmsg5b & #msg has delay so will appear on top of text editor window.
+    xASTAT1="`stat --format=%Y "$SSS_TRANSLATION_FILE"`" #seconds since epoch.
+    LANG=${ORIGLANG} ${SSS_HANDLER_EDITOR} ${SSS_TRANSLATION_FILE}
+    xASTAT2="`stat --format=%Y "$SSS_TRANSLATION_FILE"`" #seconds since epoch.
+    kill $dPID
+    [ "$xASTAT1" = "$xASTAT2" ] && continue
+    DIRTRANSLATIONFILE="`dirname "${SSS_TRANSLATION_FILE}"`"
+    mkdir -p /root/MoManager-${ORIGLANG12}-${APKGNAME}${DIRTRANSLATIONFILE}
+    cp -a -f "${SSS_TRANSLATION_FILE}" /root/MoManager-${ORIGLANG12}-${APKGNAME}${DIRTRANSLATIONFILE}/
+    echo "MACTION=${EXIT} TODAY_DATE=${ADATE} TRANS_FILE='${SSS_TRANSLATION_FILE}' AUTHOR='${AUTHORSPECS}'" >> /root/MoManager-${ORIGLANG12}-${APKGNAME}/write.log
+    pupdialog --background green --colors --backtitle "MoManager: SSS edit completed" --msgbox "You have translated file \Zb${SSS_TRANSLATION_FILE}\ZB. Click OK button to continue..." 0 0
+   done
+   echo "MACTION=${EXIT} TODAY_DATE=${ADATE} SSS_FILE='/usr/share/sss/${SSSFILE}/${SSSFILE}.${ORIGLANG1}' AUTHOR='${AUTHORSPECS}'" >> /root/MoManager-${ORIGLANG12}-${APKGNAME}/write.log
+   mkdir -p /root/MoManager-${ORIGLANG12}-${APKGNAME}/usr/share/sss/${SSSFILE}/
+   cp -f /usr/share/sss/${SSSFILE}/$SSSFILE.$ORIGLANG1 /root/MoManager-${ORIGLANG12}-${APKGNAME}/usr/share/sss/${SSSFILE}/
+   export LANG=$ORIGLANG
+   exec momanager reenter
+  fi
 
   #sync translated sss-file with original (master) sss-file (/usr/share/sss/$SSSFILE/$SSSFILE)...
   #ex: 'menu_strings' is the master (no translations in it), 'menu_strings.de' has German translations.
   #(Woof developers only have to edit the master, and the translation sss-files will sync to it).
   #to do this properly have to write code that analyses the sss-files by section, that is, the files

Changes to woof-code/rootfs-skeleton/usr/share/sss/doc_strings/doc_strings

@@ -1,1 +1,18 @@
+[general]
+#this is different from the other SSS domains, they have simple sed expressions to translate
+#blocks of english text within a file -- XML, script, configuration, etc.
+#however, we do have the situation, mostly documentation files, where we need to translate
+#the entire file, and create a translated copy. For example, /usr/local/petget/help.htm is a
+#English help file for the Puppy Package Manager. The scripts ui_Classic and ui_Ziggy will
+#recognise a translated file if it exists, for example /usr/local/petget/help-de.htm
+#THERE IS NOTHING TO EDIT IN THIS FILE -- MoManager reads this file and does all that is needed.
+#I REPEAT, PLEASE DO NOT CHANGE THIS FILE, use MoManager.
+
+[_usr_local_petget_help.htm]
+#the English help file is /usr/local/petget/help.htm.
+#note, /usr/local/petget/ui_Classic and ui_Ziggy look for a translated file, if not exist fall back to help.htm.
+#this identifies the name and location of the translated file, ex: the German translation would be file /usr/local/petget/help-de.htm...
+SSS_TRANSLATION_RULE='/usr/local/petget/help-SSSLANG1MARKER.htm'
+#this identifies the editor to be used...
+SSS_HANDLER_EDITOR='defaulthtmleditor'
 

Changes to woof-code/rootfs-skeleton/usr/share/sss/doc_strings/doc_strings.fr

@@ -1,1 +1,18 @@
+[general]
+#this is different from the other SSS domains, they have simple sed expressions to translate
+#blocks of english text within a file -- XML, script, configuration, etc.
+#however, we do have the situation, mostly documentation files, where we need to translate
+#the entire file, and create a translated copy. For example, /usr/local/petget/help.htm is a
+#English help file for the Puppy Package Manager. The scripts ui_Classic and ui_Ziggy will
+#recognise a translated file if it exists, for example /usr/local/petget/help-de.htm
+#THERE IS NOTHING TO EDIT IN THIS FILE -- MoManager reads this file and does all that is needed.
+#I REPEAT, PLEASE DO NOT CHANGE THIS FILE, use MoManager.
+
+[_usr_local_petget_help.htm]
+#the English help file is /usr/local/petget/help.htm.
+#note, /usr/local/petget/ui_Classic and ui_Ziggy look for a translated file, if not exist fall back to help.htm.
+#this identifies the name and location of the translated file, ex: the German translation would be file /usr/local/petget/help-de.htm...
+SSS_TRANSLATION_RULE='/usr/local/petget/help-SSSLANG1MARKER.htm'
+#this identifies the editor to be used...
+SSS_HANDLER_EDITOR='defaulthtmleditor'