Translation tool, if you prefer a non-English source
Moderator: Forum Moderators
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
Translation tool, if you prefer a non-English source
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.)
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 2338 times
So this is for someone who speaks A and B, but not English?
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
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.scott wrote:So this is for someone who speaks A and B, but not English?
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.
dankon, tre utila programo
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).
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).
- Viliam
- Translator
- Posts: 1341
- Joined: January 30th, 2004, 11:07 am
- Location: Bratislava, Slovakia
- Contact:
Re: dankon, tre utila programo
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.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).
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.
Re: Translation tool, if you prefer a non-English source
Thanks. I'll try to use.
Mi povas paroli Esperanton.