Check-in [26c45f7e8b]
Not logged in

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


SHA1 Hash:26c45f7e8b08d5267d967fcaaa88fae1819b108c
Date: 2012-08-01 00:28:38
User: BarryK
Comment:Translation howto page updated

Tags And Properties

Changes to woof-code/rootfs-skeleton/usr/share/doc/HOWTO-internationalization.htm

@@ -12,17 +12,13 @@
       <td style=" vertical-align: top;">
         <h1>HOWTO internationalize applications</h1>
-        <br>
-Internationalization of applications and scripts in Puppy Linux is a work-in-progress.<br>
-        <br>
-        <br>
+        <span style="color: rgb(153, 51, 0);">Page updated August 1, 2012</span><br>
+Internationalization of applications and scripts in Puppy Linux has become extremely easy, with MoManager, a GUI application.<br>
         <h2>Applications written in BaCon</h2>
 BaCon is a BASIC compiler, one of our officially supported languages for
  Puppy development. Internationalization is supported by the compiler,
@@ -42,45 +38,77 @@
 If you have the 'devx' SFS loaded, then these will also be present:<br>
         <div style="margin-left: 40px;">
-  <pre>/usr/sbin/welcome1stboot.bac<br>/usr/sbin/welcome1stboot.pot
+  <pre>/usr/sbin/welcome1stboot.bac<br>/usr/sbin/welcome1stboot.pupdev<br>/usr/share/doc/nls/welcome1stboot/welcome1stboot.pot
 The .bac file is the BaCon source code. The .pot file is the language
 translation file. The .pupdev file is just a text file which has
-instructions on how to compile and do the language translation. The .pot
- and .pupdev are optional, not necessarily always in the 'devx' -- but
+instructions on how to compile and create a .pot language translation
+file, plus any other developer notes. The .pupdev is optional, not
+necessarily always in the 'devx' -- but
 if you read one of the .pupdev files it should show you how to create a
-language translation for any other BaCon application.<br>
-        <br>
+.pot language translation file for any other BaCon application.<br>
+When you compile a BaCon application, place the .pot file into
+/usr/share/doc/nls, as per the above examples. This could be in a PET
+package of your application. MoManager searches this path for .pot files
+ to be translated.<br>
+Actually, the same thing holds for any application, written in C, Vala,
+Genie, or whatever, place the .pot file into
+/usr/share/doc/nls/&lt;domainname&gt;/&lt;domainname&gt;.pot and
+MoManager will use it.<br>
         <h2>Scripts internationalized with 'gettext'</h2>
 There are a lot of scripts in Puppy that use 'gettext' for translating. Here are some in /usr/sbin:<br>
         <div style="margin-left: 40px;">
-If you have the 'devx' SFS loaded, you will also find these in /usr/sbin:<br>
-        <div style="margin-left: 40px;">
-  <pre>mousecheck.pupdev<br>quicksetup.pupdev<br>shutdownconfig.pupdev</pre>
-        </div>
-...these are text files that explain how to do the internationalization.
- You can follow the instructions to translate the script to your own
-language. The instructions can also be applied to other scripts that use
- 'gettext'.<br>
-        <br>
+Inside each script you will find a line like this:<br>
+<pre>export TEXTDOMAIN=myapp</pre>
+MoManager finds all scripts with this entry, which confirms that it uses
+ 'gettext', and offers a GUI interface for translating each script. You
+do not have to learn the commandline tools for translating, the GUI
+interface makes it easy.<br>
+Basically, MoManager will create a .pot file for the application, in the
+ above example that will be 'myapp.pot'. Note that multiple scripts can
+have the same domainname 'myapp' and just the one 'myapp.pot' will be
+created. So, if your application has several scripts, you don't have to
+have a .pot for each (but you can if you want), just have the one .pot
+-- this is more efficient if there are common text strings to be
+translated in the scripts, and is simpler just to have the one .pot
+One technical detail: please place the "export ..." at column one, and
+do not place quotes around "myapp", the line in the script should look
+just like I have shown:<br>
+<pre>export TEXTDOMAIN=myapp</pre>
+.pot files are "translation files", which you then have to insert the
+translations for a particular language. When that is done, it becomes a
+.po file, and it is then compiled to a binary form and becomes a .mo
+file. The compiled .mo files are kept at /usr/share/locale. MoManager
+handles these conversions for you.<br>
+<h3>Pre-existing .pot files</h3>
+MoManager will create a .pot file from the script, however the
+commandline-tool (xgettext) to extract the text strings from the script
+and create the .pot file does not always work properly. An example is
+/usr/sbin/alsaconf -- in this case, we have a pre-existing .pot file,
+MoManager will automatically use any pre-existing .pot file that it
+finds in /usr/share/doc/nls, rather than use xgettext to extract the
+strings from the script(s).<br>
         <h2>Scripts internationalized with 't12s'</h2>
 This is a very fast technique pioneered by technosaurus and implemented for Puppy by L18L. See discussion in Puppy Forum:<br>
@@ -87,17 +115,10 @@
         <a href=""></a> <br>
-Here is an example script that you will find in recent puppies:<br>
-        <div style="margin-left: 40px;">
-  <pre>/usr/sbin/xdelta_gui</pre>
-        </div>
 Here are online instructions on how to use this technique to create a translation for your language:<br>
@@ -106,21 +127,28 @@
 ...this relies upon the application /usr/sbin/t12s, a GUI app created by
  L18L. It requires the 'yad' package be installed, that is likely to be
 the case in recent puppies.<br>
-        <br>
+MoManager will recognise the existence of these translation files, and
+bundle them into the output "langpack" PET, however most developers are
+recommended to use the 'gettext' method.<br>
 MoManager translation manager</h2>
-MoManager is a GUI application written by me (Barry Kauler) that makes it very easy for anyone to
-create non-English translations for applications in Puppy. You must have a Puppy built from a Woof
-version later than February 14, 2012.<br>
+MoManager is a GUI application written by me (Barry Kauler) that makes
+it very easy for anyone to
+create non-English translations for applications in Puppy. You must have
+ a Puppy built from a Woof
+version later than February 14, 2012, however if you want to use
+MoManager to create a "langpack" for a particular language it is
+recommended to use the very latest Puppy built from latest Woof -- see
+my blog (<a href=""></a>) for announcements of Puppy builds.<br>
 MoManager is for creating and updating translation files for scripts,
-XML files, menu files and any other data text files. <br>
+XML files, menu files, any other data text files, and binary executables. <br>
 Scripts are applications that are text files,
 usually written in Bash or Ash (or Perl, Python, Tcl, etc.). Note, if
 you are unfamiliar with 'scripts', don't worry, they are just
@@ -144,12 +172,11 @@
 changed and you will need to update the translation.<br>
 A translation file for a script means that when the application runs, it
  will output all text in your language. By creating translation files
 for all the scripts, you can help to create a Puppy that runs nicely in
-your language -- and by sending the translation files to me, I can put
-them into Woof for all future builds of Puppy.<br>
+your language.<br>
 Although it is probably possible to figure out how to edit a translation
  file, known as a 'po' file in it's editable form, or 'mo' file in it's
 compiled form, it is helpful to readup a bit on the topic. I suggest:<br>
 <div style="margin-left: 40px;"><a href=""></a> <br>
@@ -157,16 +184,74 @@
 <div style="margin-left: 40px;"><a href=""></a> <br>
 ...note though, reading all of that can be confusing! It is possible to
 use MoManager without understanding all of those details. MoManager uses
- a normal text editor to edit po files rather than a specialized
+ a normal text editor to edit .po files rather than a specialized
 po-editor (such as poedit) and this is quite easy to do, you just need a
- very basic understanding of the format of po files. <br>
+ very basic understanding of the format of .po files. <br>
+This is a special text editor for .po files. Although MoManager uses the
+ default text editor (usually Geany in most puppies), if poedit is
+installed then MoManager can use it -- you will see a checkbox in the
+main window of MoManager to choose poedit.<br>
+To install poedit, look in the Puppy Package Manager. Most builds of Puppy will have it available.<br>
+You will also see in the MoManager window, a button to generate a
+"langpack" PET package. if you would like to translate Puppy for a
+particular language, this button is very nice. It will gather up all the
+ translations for your language and put them into a PET package, which
+you can then send to me, and I can place it along with the others at See the existing "langpacks" at, named
+"langpack_*.pet", for example "":<br>
+<a href=""></a><br>
+Note that the langpack is accumulative. Say for example that you install
+ "" (German). You can then create some more
+translations, or update existing ones, then click the "Create langpack
+PET" button, and a new updated PET will be created. Please let me know if this mechanism leaves anything out!<br>
+There are already maintainers for some languages, for example Puppy
+Forum member L18L maintains the German translation. So, if you want to
+contribute to the German translations please do it through L18L. At the
+time of writing, these are the translators:<br>
+<table style=" text-align: left;" border="0" cellpadding="2" cellspacing="2">
+  <tbody>
+    <tr>
+      <td style="vertical-align: top; font-style: italic;">de<br>
+      </td>
+      <td style="vertical-align: top; font-style: italic;">L18L<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; font-style: italic;">es<br>
+      </td>
+      <td style="vertical-align: top; font-style: italic;">vicmz<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; font-style: italic;">fr<br>
+      </td>
+      <td style="vertical-align: top; font-style: italic;">esmourguit<br>
+      </td>
+    </tr>
+    <tr>
+      <td style="vertical-align: top; font-style: italic;">ru<br>
+      </td>
+      <td style="vertical-align: top; font-style: italic;">rodin.s<br>
+      </td>
+    </tr>
+  </tbody>
+<h3>Further information</h3>
+If you want to learn more about MoManager, go to my blog <a href=""></a>, and type "MoManager" into the search box.<br>
 Barry Kauler<br>
+<small>(c) This page is Copyright Barry Kauler 2012, all rights reserved.</small>&nbsp; <br>