How to properly translate missions?

2 replies [Last post]
alzen
User offline. Last seen 5 years 25 weeks ago. Offline
Joined: 2008-02-28
Posts: 93

As I'm working on Polish translation update I would like to know how to properly translate missions.

I mean campaign and training missions. I know I can translate mission names and descriptions - but I'm thinking also about translating dialogs, team names, hedgehog names and so on.

There is no point to translate descriptions where you can find English names when I'm unable to change these names inside the game as well. And translating it with original names also doesn't make much sense.

I know missions are scripted in Lua but is there any chance someone would create some kind of how-to about translating this part of the game?

Or just a brief instructions here please?

XMPP:alzen@jid.pl / GG: 3747253

Wuzzy
Wuzzy's picture
User offline. Last seen 1 week 6 days ago. Offline
Joined: 2012-06-20
Posts: 1301

I would generally not recommend to translate mission strings when no release is being prepared. Your translation efforts would be mostly wasted as most strings you translate now will already be outdated in the next release. Keep in mind that translating software is not a one-time effort but requires continious work, otherwise translations become outdated (and incomplete). You can, of course still translate now but make sure to definitely check out Hedgewars again when a release is being prepared.
Talk to sheepluva in our chatroom for questions regarding release stuff and more.

Anyways, when the time for translations has come (normally it should be announced on the news page), here are the instructions for translationg mission strings:

First of all, translation of mission strings is quite a pain in the ass. It has been badly hacked together, it more or less works but it is not fun to work with. So take your time to try to understand it.

The mission strings can be found in the “.lua” files in Data/Locale. Yes, those are actual Lua scripts, but you don't need to know how to program.
“pl.lua” is for Polish.
These “.lua” files contain all the in-game strings of all missions, campaigns, styles and mission maps. This includes team names, dialogs and practially most other strings you see in-game. Yes, all of them are in one single huge file.
Basically they just contain a huge list of strings. On the left side it's in English (which you MUST keep intact) and the right side is the target language.
The quotation marks mark the beginning and end of each string, those quotation mark MUST be kept intact as well.

Also, if a line starts with two dashes, they have to be removed when you translated the string. This must be done, or else the translation won't be “seen” by Hedgewars.
Apart from that, you must keep the rest of the general syntax intact, otherwise the missions may fail.
If, for some reason, you need a literal ASCII quote (") in your translation, you have to write it as:

\"

Finally, when you're done (which might take a while) you absolutely should test your translations. Ideally, you do so by playing ALL missions, styles and mission maps. If you don't have the time, at least make brief tests to check if the missions work at all for your language to make sure you didn't make any syntax errors (there may break Hedgewars!).

General translation notes can be found here:
http://hedgewars.org/kb/Translations

Hi, I am a Hedgewars developer. Smile

nemo
nemo's picture
User offline. Last seen 1 week 4 days ago. Offline
Joined: 2009-01-28
Posts: 1861

The biggest impact on lua strings would be if we finally fixed the fragmentation introduced by some of the script writers, who concatenated strings, instead of using string formatting variables.

But, barring that, I don't think there's been any huge shift in the strings lately, so it isn't likely you'll have to redo much.

If the fragmentation thing is fixed, then a fair # of small strings could end up changing though.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]