[Mageia-i18n] Script for lang<->po conversion to translate Mageia web pages

Yuri Chornoivan yurchor at ukr.net
Sun Sep 16 13:26:32 CEST 2012


написане Sun, 16 Sep 2012 13:57:19 +0300, Stefano Negro  
<stblack at gmail.com>:

> On 09/09/2012 02:04 PM, Yuri Chornoivan wrote:
>> Hi,
>>
>> For some reasons usual conversion scripts for .lang files from
>> Translate Toolkit do not work as expected.
>>
>> Nevertheless, the attached script may be useful for those who want to
>> organize sustainable translation process of web pages translation.
>>
>> Prerequisites:
>>
>> Installed python-polib package:
>>
>> # urpmi python-polib
>>
>> Usage:
>>
>> 1. Copy the script into the folder with English .lang files.
>> 2. Run
>>   python langpo.py
>> 3. Script will create .pot's for all .lang's in the folder. Translate
>> pot's and rename the translations into <lang_code>.po
>> 4. Run
>>   python langpo.py
>>    once more to create lang's for your language.
>>
>> If you ever need to update something (.lang's were updated or you
>> found a typo, etc.) just run
>>   python langpo.py
>>
>> Limitations:
>> The script is useful only for Unicode translations.
>>
>> Hope it will be useful.
>>
>> Best regards,
>> Yuri
> Hi Yuri,
> I downloaded all lang with svn and after step 2 I have une directory for
> each pot. checking 2.pot I've seen that line :
>
> # en/2/download_index.php +15
> ;Download Mageia 2 DVD, CD, LiveCD, network install ISO images.
> Download Mageia 2 DVD, CD, LiveCD, network install ISO images.
>
> is missing in the pot.
>
> Another doubt.
> Which order has the strings in pot? It should be like  lang only with
> pot syntax?

Oops... Sorry for my stupid mistake in regular expression. I have fixed it  
(hopefully) and committed an updated version to SVN (the script is also  
attached to this message).

The order of messages should be the same as in .lang.

Many thanks for testing.

Best regards,
Yuri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: langpo.py
Type: application/octet-stream
Size: 2384 bytes
Desc: not available
URL: </pipermail/mageia-i18n/attachments/20120916/87670d39/attachment.obj>


More information about the Mageia-i18n mailing list