[Koha-docs] [Koha-translate] Arabic manual 38

Bernardo Gonzalez Kriegel bgkriegel at gmail.com
Fri Aug 3 21:19:32 CEST 2012


Hi Laurence,

On Fri, Aug 3, 2012 at 12:31 PM, Laurence Lefaucheur <
laurence.lefaucheur at biblibre.com> wrote:

> Hi,
>
> what you propose with xml2pot is great ! Thanks.
>
> I now have to solve the next step :
> when the english manual is updated, how can the po file be updated without
> being overwritten ?
> When I execute all commands after having updated manual.xml, translations
> in the po file are lost
>
>
To update the po file you can try the following (equivalent to what
previously said Karam):

Update the original file (ej. git pull)
xml2pot manual.xml > manual.up,pot  (create updated pot)
msginit -i manual.up.pot -o manual.up.po --no-wrap --no-translator (create
updated po)
msgmerge -U manual.po manual.up.po (update strings, preserve translations)
rm *.up*



> I'll look a it after my holidays...
>
> Happy holidays!

Bernardo


> Regards,
>
> Laurence
>
>
> Le 29/07/2012 01:02, Bernardo Gonzalez Kriegel a écrit :
>
>> Hi Karam, Laurence and all interested.
>>
>> While watching the Olympics, I was working in the process of translating
>> the manual,
>> following the procedure suggested by Karam.
>>
>> I did use the git version of the manual for Koha 3.8.x
>> (git clone git://git.koha-community.org/**kohadocs.git<http://git.koha-community.org/kohadocs.git>
>> <http://git.koha-community.**org/kohadocs.git<http://git.koha-community.org/kohadocs.git>>;
>> cd kohadocs; git branch
>>
>> --track 3.8.x origin/manual3.8.x; git checkout 3.8.x)
>> and found the following:
>>
>> 1) Using itstool from repository (itstool 1.1.0, Min12/Ubuntu 11.0) on
>> english version of the manual,
>> (itstool -l es_ES -o manual.pot manual.xml 2> err.log), was able to
>> create manual.pot.
>> I found the same error messages as Laurence, and no editing (XMLEditor,
>> vi) could get rid of them.
>>
>> The offending words (for itstool) where '&copy;', '&eacute;',
>> '&egrave;', '&infin;', '&ldquo;', '&lsquo;', '&mdash;', '&nbsp;',
>> '&pound;', '&rdquor;' and '&rsquor;'.
>>
>> 2) Most of them can be replaced.
>> In fact, I suggest (Nicole) to switch the encoding of the manual to
>> UTF-8 (current encoding="US-ASCII").
>> Then, for consistency
>> eacute and egrave should be replaced by é and è (ej. Café, Babelthèque)
>> ldquo and rdquor by "
>> lsquo and rsquor by '
>> nbsp could be deleted or replaced by space. (only five occurrences)
>> mdash appears only once in the GNU license, and they use "--" in that
>> position in their website.
>> (I coud send a patch for all these)
>>
>> There is no logic replacement for 'infin' (once) and 'pound' (twice),
>> they are valid symbols.
>> But 'infin' appears in an example URL, perhaps is a mistake.
>> And 'pound' appears in an example of costs, could be replaced by $
>>
>> Anyway the 'pot' file is created with those symbols/words and can be
>> translated, but...
>>
>> 3) There is another tool, xml2pot (from package poxml), that generates
>> a MUCH MUCH MUCH better PO file.
>> itstool produces 3 lines for each string (msgctxt, msgid and msgstr),
>> and produces an irrelevant entry for each image (827 lines)
>>
>> xml2pot produces a cleaner POT file, and without warnings/errors
>> (usage: xml2pot manual.xml > manual.pot)
>>
>> There is a tool for the reverse task, po2xml (same package), but do not
>> recommend using it (because it mangles the output file)
>>
>> 4) Then I suggest a change in the procedure:
>>
>> Fix manual.xml, at least the encoding
>> xml2pot manual.xml > manual.pot
>> msginit -i manual.pot -o manual.po --locale=xx_YY --no-translator
>> do some translation on manual.po
>> msgfmt -o manual.mo manual.po
>> itstool -m manual.mo -o manual.xx.xml manual.xml (this gives warnigs if
>> manual.xml is not fixed)
>>
>> Then open and read your (partially) translated manual.
>>
>> I hope that you could try this steps and comment your results.
>>
>> Regards
>>
>> Bernardo
>> --
>> Bernardo Gonzalez Kriegel
>> bgkriegel at gmail.com <mailto:bgkriegel at gmail.com>
>>
>>
>>
>>
>> On Fri, Jul 27, 2012 at 3:56 PM, Karam Qubsi <karamqubsi at gmail.com
>> <mailto:karamqubsi at gmail.com>> wrote:
>>
>>     Hi Laurence ,
>>     I don't know what is the problem exactly , but I solve this problem
>>     by open the manual.xml via (XMLEditor
>>     <http://www.xmlmind.com/**xmleditor/<http://www.xmlmind.com/xmleditor/>>
>> ) and add (space) and delete it
>>
>>     (then save it ) and try again and it will work :)
>>
>>     maybe this is about the (UTF-8)  encoding
>>
>>
>>
>>     On Fri, Jul 27, 2012 at 6:43 PM, Laurence Lefaucheur
>>     <laurence.lefaucheur at biblibre.**com<laurence.lefaucheur at biblibre.com>
>>     <mailto:laurence.lefaucheur@**biblibre.com<laurence.lefaucheur at biblibre.com>>>
>> wrote:
>>
>>         Hi,
>>
>>         In installed itstool-1.2.0, and when I run :
>>
>>         itstool -o manual.pot manual.xml
>>
>>         I have many errors like :
>>
>>         manual.xml:40231:  parser  error :  Entity 'lsquo' not defined
>>         &lsquo;<literal>show c</literal>' should show the appropriate
>>         parts of the
>>
>>         Did you have the same ?
>>         How can I solve the problem ?
>>
>>         Thanks,
>>
>>         Laurence
>>
>>
>>
>
> --
> ------------------------
> Laurence Lefaucheur
> BibLibre
> solutions libres pour les bibliothèques
> http://www.biblibre.com
> laurence.lefaucheur at biblibre.**com <laurence.lefaucheur at biblibre.com>
> p. 06 27 85 46 49
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.koha-community.org/cgi-bin/mailman/private/koha-docs/attachments/20120803/c5f90dfb/attachment.htm>


More information about the Koha-docs mailing list