README.txt 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ROX-Filer source package does not have .pot file!
  2. However, it does have lots of .po files, ex de.po.
  3. However, Puppy Forum member LaRioja has done some work on de.po, improved it:
  4. http://www.murga-linux.com/puppy/viewtopic.php?t=76281
  5. However, i need a .pot file, to put here:
  6. /usr/share/doc/nls/ROX-Filer/ROX-Filer.pot
  7. ...MoManager will find this and a translator can then create a .po hence .mo file.
  8. I found some info how to convert po to pot:
  9. http://www.commandlinefu.com/commands/view/10042/empty-a-gettext-po-file-or-po2pot
  10. This line does it (plus a bit of editing by me):
  11. # msgfilter --keep-header -i ROX-Filer.po -o ROX-Filer.pot awk -e '{}'
  12. Extract from the User Manual is below. It states that src/messages.pot exists in source,
  13. but it doesn't.
  14. The gist of the docs is that a .mo file has to be in a special location, for example:
  15. /usr/local/apps/ROX-Filer/Messages/de/LC_MESSAGES/ROX-Filer.mo
  16. The docs also state that /usr/local/apps/ROX-Filer/Options.xml has to be edited:
  17. "so that your language is listed, restart the filer and select it from the Options box
  18. (see the <xref linkend="LANG"/> section)"
  19. Barry Kauler
  20. March 7, 2012
  21. INSTRUCTIONS FROM ROX-FILER USER MANUAL
  22. ---------------------------------------
  23. <chapter id="i18n">
  24. <title>Internationalisation</title>
  25. <para>
  26. </para>
  27. <sect1>
  28. <title><anchor id="LANG" xreflabel="Translations"/>
  29. Selecting a translation
  30. </title>
  31. <para>
  32. <application>ROX-Filer</application> is able to translate many of its messages,
  33. provided suitable translation files are provided:
  34. <orderedlist>
  35. <listitem><para>Open the Options box from the menu,</para></listitem>
  36. <listitem><para>Select a language from the list,</para></listitem>
  37. <listitem><para>Click on <guibutton>OK</guibutton> and restart the filer
  38. for the new setting to take full effect.</para></listitem>
  39. </orderedlist>
  40. </para>
  41. </sect1>
  42. <sect1>
  43. <title>Creating a new translation</title>
  44. <para>
  45. <orderedlist>
  46. <listitem><para>Go into the <filename>src/po</filename> directory and create
  47. the file <filename>src/messages.pot</filename>:
  48. <screen>
  49. $ cd ROX-Filer/src/po
  50. $ ./update-po</screen>
  51. </para></listitem>
  52. <listitem><para>Copy the file into the <filename>src/po</filename>
  53. directory as <filename>&lt;name&gt;.po</filename>. Eg, if your
  54. language is referred to as `ml' (`my language'):
  55. <screen>$ cp ../messages.pot ml.po</screen>
  56. </para></listitem>
  57. <listitem><para>Load the copy into a text editor.</para></listitem>
  58. <listitem><para>Fill in the translations, which are all blank to start with.
  59. </para></listitem>
  60. <listitem><para>Run the <filename>make-mo</filename> script to create the
  61. binary file which <application>ROX-Filer</application> can use.
  62. You will need the GNU gettext package for this.
  63. <screen>
  64. $ cd ROX-Filer/src/po
  65. $ ./make-mo ml
  66. Created file ../../Messages/ml.gmo OK</screen>
  67. </para></listitem>
  68. <listitem><para>Edit <filename>ROX-Filer/Options.xml</filename> so that
  69. your language is listed, restart the filer and select it from the Options box
  70. (see the <xref linkend="LANG"/> section).
  71. </para></listitem>
  72. <listitem><para>Submit the <filename>.po</filename> file to the ROX
  73. patch tracker so that we can include it in future releases of the filer.
  74. </para></listitem>
  75. </orderedlist>
  76. </para>
  77. </sect1>
  78. <sect1>
  79. <title>Updating an existing translation</title>
  80. <para>
  81. <orderedlist>
  82. <listitem><para>Go into the directory containing the <filename>.po</filename>
  83. files and run the <filename>update-po</filename> script.
  84. This checks the source code for new and changed strings and updates all
  85. the translation files.
  86. <screen>
  87. $ cd ROX-Filer/src/po
  88. $ ./update-po</screen>
  89. </para></listitem>
  90. <listitem><para>Edit the file by hand as before, filling in the new blanks
  91. and updating out-of-date translations.
  92. Look out for <computeroutput>fuzzy</computeroutput> entries where
  93. <command>update-po</command> has made a guess; check it's correct and
  94. remove the <computeroutput>fuzzy</computeroutput> line.
  95. </para></listitem>
  96. <listitem><para>Run <command>make-mo</command> as before.</para></listitem>
  97. <listitem><para>Submit the updated file to us.</para></listitem>
  98. </orderedlist>
  99. See the <command>gettext</command> info page for more instructions on creating
  100. a translation.
  101. </para>
  102. </sect1>
  103. </chapter>
  104. ROX-FILER SCRIPTS
  105. -----------------
  106. The script src/po/make-mo:
  107. #!/bin/sh
  108. if [ "$#" != 1 ]; then
  109. cat << HERE
  110. Usage: 'make-mo <LANG>'
  111. Eg: 'make-mo fr' to compile the French translation, fr.po, ready for use.
  112. HERE
  113. exit 1
  114. fi
  115. OUT_DIR=../../Messages
  116. LOCALE_DIR="$OUT_DIR/$1/LC_MESSAGES"
  117. OUT="$LOCALE_DIR/ROX-Filer.mo"
  118. mkdir -p "$LOCALE_DIR"
  119. # This code converts to UTF-8 format. Needed by Gtk+-2.0 at
  120. # least, and may help with other versions.
  121. charset=`grep "charset=" $1.po | head -1 | sed 's/^.*charset=\(.*\)\\\n.*/\1/'`
  122. echo Using charset \'$charset\'
  123. iconv -f $charset -t utf-8 $1.po | \
  124. sed 's/; charset=\(.*\)\\n"/; charset=utf-8\\n"/' | \
  125. msgfmt --statistics - -o $OUT && echo Created file $OUT OK