Guide: Translating your UMC without WesCamp

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

User avatar
octalot
General Code Maintainer
Posts: 777
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Guide: Translating your UMC without WesCamp

Post by octalot »

James_The_Invisible wrote: June 8th, 2017, 9:55 am
  1. Make sure that you add-on can be translated. The wiki provides some instructions for this. You can stop reading at Getting your add-on into WesCamp as WesCamp is dead by now.
That part of the WesCamp page has now been moved to GettextForWesnothDevelopers, and a big update was done afterwards.

I'm thinking of doing (this weekend):
  • Done: Replace that part of the WesCamp page with just a link to the new location
  • Add female_message to the new location
  • Add Lua to the new location.
User avatar
EarthCake
Posts: 376
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: Guide: Translating your UMC without WesCamp

Post by EarthCake »

The template (.pot) file contains all of the strings that need to be translated in the .po files, but without the translations.

The .pot is generated from WML and Lua files using is a tool called wmlxgettext. On Wesnoth 1.13 and later, it is shipped with Wesnoth itself and can be used from Maintenance tools GUI. Just go to data/tools, launch GUI.pyw and switch to the wmlxgettext tab.

Pre-1.13 instructions on how to get and use it are in Nobun's forum posting.
This really doesn't help how to create .pot files. After reading this, I only found wmlxgettext.
User avatar
octalot
General Code Maintainer
Posts: 777
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Guide: Translating your UMC without WesCamp

Post by octalot »

Thanks for the feedback. Here's a new revision of the second paragraph:
The .pot is generated from WML and Lua files using a tool called wmlxgettext. With Wesnoth 1.14.5 and later, this is shipped with Wesnoth itself as part of the Maintenance_tools and can be used from the Maintenance Tools' GUI. At the moment it's not documented on that page, but if you follow the instructions to get GUI.pyw running then you'll see there's a wmlxgettext tab.
The Maintenance_tools page itself needs someone who uses Windows to check and update it.
User avatar
Adamant14
Posts: 962
Joined: April 24th, 2010, 1:14 pm

Re: Guide: Translating your UMC without WesCamp

Post by Adamant14 »

wiki.wesnoth.org/Maintenance_tools wrote: Note to Windows Users: This means you have to run it from the Command Line. The command line may be reached by hitting Start, then Run, then "cmd" or "command" depending on your version of Windows.
I works also without any use of the command line on Windows 10.
All I have done:
- I have installed Python 3.7.3
- then I opened Wesnoths folder where the tools are to find
- then I selected GUI.pyw
- then I clicked 'open'
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
User avatar
EarthCake
Posts: 376
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: Guide: Translating your UMC without WesCamp

Post by EarthCake »

Are .pot files important for campaign translating?
I mean, I know you can translate campaign without .pot files (can you?), but is it much easier with .pot files or it is the same?
User avatar
Adamant14
Posts: 962
Joined: April 24th, 2010, 1:14 pm

Re: Guide: Translating your UMC without WesCamp

Post by Adamant14 »

EarthCake wrote: May 24th, 2019, 6:24 am Are .pot files important for campaign translating?
I mean, I know you can translate campaign without .pot files (can you?), but is it much easier with .pot files or it is the same?
Using Poedit, you can generate po.files/mo.files out of pot-files, and then translate them easily.
What is the name of the campaign you want to translate?
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
User avatar
EarthCake
Posts: 376
Joined: March 29th, 2019, 1:57 pm
Location: The Wall

Re: Guide: Translating your UMC without WesCamp

Post by EarthCake »

Adamant14 wrote: May 24th, 2019, 3:33 pm What is the name of the campaign you want to translate?
I am currently writing my own campaign, so I would like to translate it.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by Celtic_Minstrel »

octalot wrote: May 17th, 2019, 4:29 pm
James_The_Invisible wrote: June 8th, 2017, 9:55 am
  1. Make sure that you add-on can be translated. The wiki provides some instructions for this. You can stop reading at Getting your add-on into WesCamp as WesCamp is dead by now.
That part of the WesCamp page has now been moved to GettextForWesnothDevelopers, and a big update was done afterwards.

I'm thinking of doing (this weekend):
  • Done: Replace that part of the WesCamp page with just a link to the new location
  • Add female_message to the new location
  • Add Lua to the new location.
I added a few notes to the C++ section (and syntax highlighting!) and added a stub section about translations in Lua. Feel free to expand on the latter.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
James_The_Invisible
Posts: 533
Joined: October 28th, 2012, 1:58 pm
Location: Somewhere in the Northlands, fighting dark forces
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by James_The_Invisible »

I just updated the first post in this thread. I fixed the link to wiki a moved instructions for Wesnoth 1.14 before those for older versions (as 1.14 is the current stable series).
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by Celtic_Minstrel »

Might be a good idea to also mention that you need to download and install Python 3 in order to use GUI.pyw. Especially on Windows, where Python isn't shipped with the OS. (I'm not sure if it's shipped with MacOS these days.)
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
egallager
Posts: 568
Joined: November 19th, 2020, 7:27 pm
Location: Concord, New Hampshire
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by egallager »

Some translation things I'd like help with: Please let me know if you are able to help!
Last edited by egallager on July 5th, 2021, 4:16 am, edited 1 time in total.
User avatar
egallager
Posts: 568
Joined: November 19th, 2020, 7:27 pm
Location: Concord, New Hampshire
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by egallager »

egallager wrote: June 14th, 2021, 10:17 pm Some translation things I'd like help with: Please let me know if you are able to help!
Update to this: TEG is now translatable! I'll be posting the potfile in its thread momentarily.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by Celtic_Minstrel »

I think there should also be a link to this page on GettextForWesnothDevelopers, but I'm not sure where on that page is a good place to add it…
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
egallager
Posts: 568
Joined: November 19th, 2020, 7:27 pm
Location: Concord, New Hampshire
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by egallager »

Celtic_Minstrel wrote: July 5th, 2021, 4:42 am I think there should also be a link to this page on GettextForWesnothDevelopers, but I'm not sure where on that page is a good place to add it…
I put it under "See Also": https://wiki.wesnoth.org/index.php?titl ... ldid=68488
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Guide: Translating your UMC without WesCamp

Post by Celtic_Minstrel »

Yeah, that's definitely better than nothing! Thanks.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply