site  contact  subhomenews

"Error" in language packs

May 25, 2013 — BarryK
I was looking in robwoj44's Polish language pack, and noticed an "error". Some other language packs may also have this.

L18L provided a patch to MoManager on May 05, 2013, that handles the XML files /usr/local/apps/*/AppInfo.xml.
The modification is in /usr/sbin/momanager and /usr/share/doc/langpack-template/pinstall.sh.

When a PET is created in MoManager, all of those AppInfo.xml files get renamed to AppInfo.xml.in.
When the PET is installed by a user, the pinstall.sh post-install script extracts the language information (only) from the AppInfo.xml.in files and inserts it into the AppInfo.xml files.
Thus the latest AppInfo.xml files are not overwritten by those in the PET.

This is a very important improvement. Language maintainers, please ensure that all the AppInfo.xml files are renamed to AppInfo.xml.in.

Comments

The other .xml files
Username: BarryK
I have noticed one anomaly in L18L's patch that puzzles me... He renames all the XML files /usr/local/apps/*/AppInfo.xml to AppInfo.xml, but not other XML files. Early in the MoManager script, the XML files are found: [i]XMLFILES="`find /usr/local -type f -name '*.xml' | sed -e 's% %SPACECHAR%g' | tr '\n' ' '`"[/i] That is, a wider net is cast. So why not rename all of those to .xml.in? Maybe L18L had a reason. I am raising the question here, will send a pm to L18L about it. It would be a simple matter to cast the net wider also when renaming .xml to .xml.in later in the momanager script, and when merging in pinstall.sh.

re: The other .xml files
Username: L 18 L
"As I have actually not got a PM here my short answer: They only reason was my ignorance. I am glad if this can be generalized for all xml files by you. ...and happy if you will be using the changes in momanager-20130522.tar.gz from forum. While talking about momanager... ... we have found out that Xdialog uses Xdialog.mo in /usr/local/share/locale/..... ... and momanager cannot merge. Recompiling Xdialog --prefix=/usr should solve this.

re2: The other .xml files
Username: L 18 L
"I am recalling now that some other files are like <foo xml:lang="ll"> <Label>some text</Label> <bar>some other text</bar> </foo> The difficult part would be the merging if it is not in just 1 line like: <Label xml:lang="de">Müll leeren</Label> [b]Momanager[/b] replaced intltool-update by msgmerge ROX-Filer (and Xdialog) can be edited in momanager now without the "bad news". [code] #LANG=${ORIGLANG} rxvt -e intltool-update --dist --gettext-package=${ATEXTDOMAIN} --output-file=${ATEXTDOMAIN}.po ${ATEXTDOMAIN}1 LANG=${ORIGLANG} rxvt -e msgmerge ${ATEXTDOMAIN}1.po ${ATEXTDOMAIN}.pot --output-file=${ATEXTDOMAIN}.po ; #130525 BINMSG="A mo file has been converted to an editable po file. Edit, then Save, then Quit text editor..." #120308 intltool-update is broken with ROX-Filer.pot. need a fallback method... [/code]

Re casting a wider net
Username: BarryK
"L18L, Well, we can leave that one as-is for now, as it is academic. I did a test in Precise, running find for .xml files in /usr/local doesn't find any outside of /usr/local/apps. But, there might be some, if more apps get installed.

Re: "Error" in language packs
Username: L 18 L
"Barry wrote:[i]This is a very important improvement. Language maintainers, please ensure that all the AppInfo.xml files are renamed to AppInfo.xml.in. [/i] Recently uploaded Russian and German (thank you Barry) langpacks lack this "Error". Thus I have been able to demonstrate a QuickLocaleSwitcher using these two langpacks http://murga-linux.com/puppy/viewtopic.php?p=698296


Tags: puppy