ROX-Filer language translation.
March 07, 2012 —
BarryK
Thanks to L18L who posted here:
http://murga-linux.com/puppy/viewtopic.php?t=76182&start=30
Which linked to this post by LaRioja:
http://www.murga-linux.com/puppy/viewtopic.php?t=76281
I need a file ROX-Filer.pot to put into Woof, however the ROX-Filer source package does not have a .pot file!
However, it does have lots of .po files, ex de.po.
However, Puppy Forum member LaRioja has done some work on de.po, improved it.
However, i need a .pot file, to put here:
/usr/share/doc/nls/ROX-Filer/ROX-Filer.pot
...MoManager will find this and a translator can then create a .po hence .mo file.
I found some info how to convert po to pot:
http://www.commandlinefu.com/commands/view/10042/empty-a-gettext-po-file-or-po2pot
This line does it (plus a bit of editing by me):
# msgfilter --keep-header -i ROX-Filer.po -o ROX-Filer.pot awk -e '{}'
Here is the Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/ecbf88309e
Comments
re roxUsername: L18L
...MoManager will find this tested My momanager gave me wrong information http://murga-linux.com/puppy/viewtopic.php?t=76182&start=69
ROX-Filer fix
Username: BarryK
"L18L, Thanks, I have fixed the path. It took me quite a long time today to get this sorted out. Apart from fixing the path for the mo file, I found that the 'intltool-update' utility is broken with ROX-Filer. 'intltool-update' is called by MoManager to merge the existing translations in the mo file into the pot file, creating an updated po file. Except that the utility fails, without giving any error message. I have implemented a workaround, a rather tedious one, for cases where 'intltool-update' fails. This is probably a situation where we need to keep the po file, rather than just uncompiling the mo file. Woof commit: http://bkhome.org/fossil/woof2.cgi/info/10c1621580 Well, this answers the question why the ROX-Filer source no longer has 'messages.pot' (despite what it says in the User Manual).
rox: messages.pot
Username: L18L
"LaRioja´s comment from March 7 at 22:58 http://www.murga-linux.com/puppy/viewtopic.php?t=76281 Has made made me trying to produce a pot file. The culprit is ROX-FILER/src/po/update-po line 7: [code]xgettext --keyword=_ --keyword=N_ --output=messages.pot *.c tips ../Templates.glade[/code] Templates.glade does not exist thus no messages.pot I have changed to use Templates.ui which exists and this produces a messages.pot. But the relevant contents of Templates.ui, ex: <property name="title" translatable="yes">ROX-Filer log viewer</property> are of course NOT in this messages.pot. -----
rox: messages.pot solved
Username: L18L
"Search for rox-filer template.glade brought up the solution in: http://www.digipedia.pl/usenet/thread/11644/10132/ Code in script src/po/update-po [code]#(cd ..; python po/tips.py; # xgettext --keyword=_ --keyword=N_ --output=messages.pot *.c tips ) (cd ..; python po/tips.py && intltool-extract --type=gettext/glade --update ../Templates.ui && xgettext --keyword=_ --keyword=N_ --output=messages.pot *.c tips ../Templates.ui.h)[/code] .. and messages.pot is correct now, ex: #: ../Templates.ui.h:19 msgid "ROX-Filer log viewer" msgstr ""
rox: messages.pot solved
Username: L18L
"Search for rox-filer template.glade brought up the solution in: http://www.digipedia.pl/usenet/thread/11644/10132/ Code in script src/po/update-po [code]#(cd ..; python po/tips.py; # xgettext --keyword=_ --keyword=N_ --output=messages.pot *.c tips ) (cd ..; python po/tips.py && intltool-extract --type=gettext/glade --update ../Templates.ui && xgettext --keyword=_ --keyword=N_ --output=messages.pot *.c tips ../Templates.ui.h)[/code] .. and messages.pot is correct now, ex: #: ../Templates.ui.h:19 msgid "ROX-Filer log viewer" msgstr ""
MoManager saves po files
Username: BarryK
"For binary executables, if MoManager finds a pot file inside /usr/share/doc/nls, and if a mo file already exists, MoManager uncompiles the mo file and then uses 'intltool-update' to merge it with the pot file and create an updated po file. That's the normal scenario, except that it fails with ROX-Filer. I implemented a workaround for this, however I needed to do something better... Now, for binary executables, MoManager offers to save the po file, for example /usr/share/doc/nls/ROX-Filer/de.po. Then, next time that MoManager is used to edit the po file, it will use this (instead of the uncompile routine described in the first paragraph). MoManager will also put the po file into the langpack. Woof commit: http://bkhome.org/fossil/woof2.cgi/info/398123183f This is a good solution. I have not implemented it for scripts, as have not had any reports of the uncompile-of-mo-merge-pot method failing for scripts.
Tags: woof