MoManager: one .pot for many scripts

A problem with MoManager was reported to this blog:
http://bkhome.org/blog/?viewDetailed=02928

And solutions proposed on the Puppy Forum:
http://www.murga-linux.com/puppy/viewtopic.php?p=643538

The solution proposed by L18L looks good. I presume for the example of 'pprocess', that the scripts 'box_ok' and 'func' will not have the "export TEXTDOMAIN=..." declaration?

I have implemented L18L's solution, Woof commit:
http://bkhome.org/fossil/woof2.cgi/info/4eebc559f0


Posted on 30 Jul 2012, 22:35


Comments:

Posted on 30 Jul 2012, 23:32 by rodin.s
Momanager and pot-file.
What if two (or more) different scripts has the same textdomain? I meant the situation like that in my comment. In that case one pot-file for that two (or more) scripts should be generated. But I guess it's hard to implement. There should be some check for several scripts using the same textdomain.
Another, maybe simpler, solution... I somehow thought it's already implemented in MoManager, but I was wrong... If there is a textdomain.pot file in /usr/share/doc/nls then it is used directly and it is not regenerated from scripts again. (Something similar is done with alsaconf). In that case if I have "multyscript" pot file I will place it in /usr/share/doc/nls and when I choose to translate any of those scripts (with same textdomain) then common pot-file will be used. Maybe this mechanism works for binary files...


Posted on 30 Jul 2012, 24:58 by rodin.s
Another Idea
Maybe there should be separate field for direct handling pot files from /usr/share/doc/nls.
For example, pot files for tray applets are not found in MoManager. With direct access to /usr/share/doc/nls one could find them. Also any pot file found there could be translated directly even if it is a "multyscript" pot file.


Posted on 31 Jul 2012, 7:30 by BarryK
Re another idea
L18L's solution will only work if those child-scripts are called from 'pprocess' script. If called directly, they would need their own TEXTDOMAIN?

rodin.s,
Yes, I think that the .pot file in /usr/share/doc/nls was implemented for binary files, not for scripts.

Perhaps I need a bit more time to think of the best way to do this...

For example, if 'pprocess', 'box_ok' and 'func' all had "export TEXTDOMAIN='pprocess'", MoManager could recognise scripts in the same directory with the same TEXTDOMAIN and then automatically combine them to one .pot file.

That would be more elegant than L18L's solution?

...if you think that looks like a better solution, I will implement it this afternoon/evening (it is 6.30am here right now).



Posted on 31 Jul 2012, 7:54 by zigbert
Re:Re: another idea
Barry wrote:
For example, if 'pprocess', 'box_ok' and 'func' all had "export TEXTDOMAIN='pprocess'", MoManager could recognise scripts in the same directory with the same TEXTDOMAIN and then automatically combine them to one .pot file.

That sounds logical to me


Posted on 31 Jul 2012, 16:39 by L18L
Re:Re:Re: another idea
That sounds logical to me

to me too,
and better because there is no "list" to maintain and can be called directly.

.pot file in /usr/share/doc/nls (and po files)
was implemented first by shinobar IIRC.








Posted on 31 Jul 2012, 23:08 by BarryK
MoManager enhanced
Solution:

http://bkhome.org/blog/?viewDetailed=02936