site  contact  subhomenews

MoManager: multiple scripts one TEXTDOMAIN

July 31, 2012 — BarryK
This is great news, I have unleashed MoManager. Now, you can have one TEXTDOMAIN for multiple script. Also, a pre-existing .pot file will be automatically used.

One TEXTDOMAIN
If multiple scripts have the same TEXTDOMAIN, for example:
export TEXTDOMAIN=myapp
then just one myapp.pot file and hence myapp.mo file will be created for all of those scripts.
Some people prefer this, as it is more efficient than having one .pot file for each script.

Note that these multiple scripts with same TEXTDOMAIN can be located anywhere. They do not have to be in the same directory.

Pre-existing .pot
A pre-existing .pot, for example /usr/share/doc/nls/myapp/myapp.pot, will automatically be used, instead of generating it from the script(s).
I could not see any reason why this should not be automatic.

Check out the changes in /usr/sbin/momanager, Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/6486b73f7e

A note about entering the TEXTDOMAIN into scripts:
export TEXTDOMAIN=myapp
...do not put quotes, do not append any comment, do not indent! Any of those might break MoManager.

Comments

comment
Username: BarryK
...um, no, appending comments should be ok.

MoManager enhanced is great
Username: L18L
"Thank you Barry My 1st working example, pfilesearch-1.31: http://www.murga-linux.com/puppy/viewtopic.php?t=79939&start=18


Tags: woof