Translation attempt

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

Moderator: Forum Moderators

Locked
User avatar
Seijo-ki
Posts: 11
Joined: May 10th, 2018, 6:19 pm

Translation attempt

Post by Seijo-ki »

Hello!

I'm quite new in the developpment/translation part, so I never made a translation file myself. I already read the translation topics in the "Create" tab, but I didn't find anywhere how to generate a .po file to make the translation.
I downloaded poedit, but I don't have any .po file, so that I can translate my own campaign.

The translation topics are mostly about how translation works, and how to join the official wesnoth translation... which is not quite what I searched for.

Can someone help me out?
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Translation attempt

Post by Bitron »

You can download the .po files here
Those are the German files, you need to choose your language first, then click on the textdoman you want to translate, it will open a text file on your browser.
You can download it per right click. Remember to change the ending from .txt to .po.
User avatar
octalot
General Code Maintainer
Posts: 777
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Translation attempt

Post by octalot »

@Bitron - the question is for a UMC campaign, not the mainline campaigns.

The tool to use appears to be wmlxgettext, and knowing the tool name we can find the documentation on how to do it: viewtopic.php?f=8&t=46366#p617733

Knowing the tool name, we can also find out that there isn't up-to-date documentation on the Wiki. :(
User avatar
Bitron
Developer
Posts: 453
Joined: October 19th, 2015, 9:23 am
Location: Germany

Re: Translation attempt

Post by Bitron »

octalot wrote: May 25th, 2018, 10:00 am @Bitron - the question is for a UMC campaign, not the mainline campaigns.
Ah, my bad. Apologies.
I found this page after some research, maybe that helps.
User avatar
Seijo-ki
Posts: 11
Joined: May 10th, 2018, 6:19 pm

Re: Translation attempt

Post by Seijo-ki »

It worked nicely, thank you very much! :)

The cmd-code given in the forum-thread was wrong, because python3 isn't reconized as a command to call python. Just had to figure out that the 3 had to be erazed and everything was generated in seconds.
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Translation attempt

Post by GunChleoc »

it depends on your python installation whether the command is python or python3. Maybe you can add that info to the wiki page for the next person?
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Translation attempt

Post by Celtic_Minstrel »

For the record, if you install wmlxgettext into the correct location (a "utils" folder in the main Wesnoth directory), then you can use it through the GUI.pyw program in data/tools.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Seijo-ki
Posts: 11
Joined: May 10th, 2018, 6:19 pm

Re: Translation attempt

Post by Seijo-ki »

Well, now that it works fine, I don't think I need to change it.

I did my translation, but even if I have the ".PO" file and its compilation ".MO", the translation does not activate when I launch the campaign.
The directory inside main.cfg is the right one, but maybe the name of my translation files are wrong.
I didn't find any explanation on how to manage to make the game recognize your translation files.

Any ideas?
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Translation attempt

Post by Celtic_Minstrel »

You can run Wesnoth with the --all-translations command-line option; then your translation should show up in the language selection list (provided the mo is in the correct location). Or you could use the --language=your-language command-line option. I think that would need the language abbreviation, eg "fr" for French.

There's also a file you can edit that will cause the translation to show up in the language selection list, but I'm not sure where that is. Somewhere in the Wesnoth data folder, probably.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Seijo-ki
Posts: 11
Joined: May 10th, 2018, 6:19 pm

Re: Translation attempt

Post by Seijo-ki »

Command-line options?
In my campaign folder, I have my main.cfg and 3 scenario.cfg files. In the translation folder, I have a .PO file and a .MO file with the name "fr".
I only tryed to run Wesnoth normally with the game in french, then launching the campaign in single player, and watching if the translated dialogues would show up, instead of the english version.
This didn't happen. Maybe my MO and PO files are somewhat wrong or missing informations.
User avatar
James_The_Invisible
Posts: 533
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Translation attempt

Post by James_The_Invisible »

Seijo-ki wrote: June 17th, 2018, 1:06 pm In the translation folder, I have a .PO file and a .MO file with the name "fr".
That is probably the problem. The file should be named after your add-on's textdomain (wesnoth-something) and placed in translations/language/LC_MESSAGES (in this case fr).
Edit: It was brought to my attention that this name and path will work only for mo files. Separate po file should indeed be named after the language but should go to translations/your textdomain.

EDIT: topic locked since its last post was in 2018 and nowadays it attracts spammers -- Elvish_Hunter
Locked