Translation tool, if you prefer a non-English source

Discuss and coordinate development of mainline and user-made content translations.

Moderator: Forum Moderators

Post Reply
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Translation tool, if you prefer a non-English source

Post by Viliam »

Have you found someone willing to translate Wesnoth to a language X (or willing to help you translating to your language), but then you found that the person does not speak English? This is no longer a problem!


My solution is a Perl script that will enrich your PO file with translations to other language(s), inserted as comments to the English phrases. When you work with "poEdit" application and click on the phrase, you will see translations in other language(s) in the comment window; so you can translate the phrase without a good knowledge of English, or you can have an advantage of using translation to language similar to your one.

You can immediately use the compiled MO files in game, because the PO file remains an "English to language X" translation. Only comments are changed, nothing else.


Examples:

I have a Slovak translation "sk.po", and would like to use a Czech translation as help:

multi_po.pl sk.po --add cs.po CS > sk_multi.po

In file "sk_multi.po" there is for every phrase added corresponding Czech translation from "cs.po" file, labeled as "CS". (My original comments in "sk.po" file are there, too.)

Before sending to translation maintainers, I remove unnecessary comments:

multi_po.pl sk_multi.po --remove > sk.po

The Czech translations are removed. (My original comments remained.)

It is possible to add more languages to one PO file. To use newer version of translation, you must remove the translations, and add them again. Your comments will remain (unless you use "{ ... }" as substring in them).


If someone finds this helpful, please report to me any bugs found. (That is... be careful and backup your PO files. This is a program written today, not much tested yet.)
Attachments
multi_po.zip
A perl script, and 2 example shell files
(1.81 KiB) Downloaded 2306 times
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

So this is for someone who speaks A and B, but not English?
Hope springs eternal.
Wesnoth acronym guide.
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

scott wrote:So this is for someone who speaks A and B, but not English?
Exactly. This is for someone who speaks A and B, but not English... in situations where there already exists a translation to A, but there is not a translation to B yet. For example now I have a volunteer to translate from Slovak to Esperanto.

But it is also for someone who speaks both A and B, and English, in situations where languages A and B are similar (and both different from English), so that translator can have a big advantage to see the other translation. For example in Slavic languages translators can borrow ideas on how to translate uncommon words like "Lich", etc.
bloom
Posts: 25
Joined: April 13th, 2005, 8:06 am
Location: Almere, NL

dankon, tre utila programo

Post by bloom »

Thanks for the program, it is really useful. I added german translations to the dutch files for inspiration.

I didn't notice any bugs, but I did have to explicitly run "perl multi_po.pl ..." because it wouldn't find the interpreter (it has something to do with dos line-endings I think).
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Re: dankon, tre utila programo

Post by Viliam »

bloom wrote:I didn't notice any bugs, but I did have to explicitly run "perl multi_po.pl ..." because it wouldn't find the interpreter (it has something to do with dos line-endings I think).
I have the ".PL" extension associated with ("C:\Perl\bin\perl.exe" "%1" %*). I use ActivePerl 5.8.0, and it probably associated the extension when installing.

Oh, wait... You are probably using Linux, which gets information from the first line of the file; and the line is corrupted because it has ASCII 13 ASCII 10 ending, instead of ASCII 10 only. Maybe removing the character at the end of first line would solve the problem. But typing "perl ..." is an easier solution.
User avatar
Dugucloud
Posts: 31
Joined: April 9th, 2010, 1:37 pm
Location: China
Contact:

Re: Translation tool, if you prefer a non-English source

Post by Dugucloud »

Thanks. I'll try to use.
Mi povas paroli Esperanton.
Post Reply