Guide: Translating your UMC without WesCamp

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

User avatar
octalot
Developer
Posts: 496
Joined: July 17th, 2010, 7:40 pm

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: 372
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
Developer
Posts: 496
Joined: July 17th, 2010, 7:40 pm

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: 906
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: 372
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: 906
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: 372
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: 1666
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.
Maintainer of Steelhive.
User avatar
James_The_Invisible
Posts: 520
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: 1666
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.
Maintainer of Steelhive.
Post Reply