How to translate .lua file
Sun, 2017-09-03 15:37
Hello,
I would like to help with the translation. I have the it.lua file
E.g.:
["Rounds Complete"] = "Round Completati",
-- ["Rubber Band"] = "", -- Construction_Mode
How to translate the second string? I just need to remove "--" at the beginning of the line and remove the "-- Construction_Mode" string? I see that the translated string don't have the "-- Construction_Mode" (or similar) at the end.
Thanks
the -- is to comment a line, or comment at the end of a line
So this line :
-- ["Rubber Band"] = "", -- Construction_Mode
is a comment, that mean the game won't read it
To translate it, remove the first --, so the game read the line, and it stop to read it when it reache the second -- : -- construction mode
dont delete the second -- , it is here to show people where the line come from, in this example the line come from the construction mode file. (it happen that there is no second -- ).
put the translation here :
-- ["Rubber Band"] = "TRANSLATION HERE, BETWEEN THE " ", -- Construction_Mode
and keep the " , " at the end of the translation
Devs and other people might add interesting stuff to my comment but you can start i guess
Thank you very much.
So the string:
-- ["Rubber Band"] = "", -- Construction_Mode
becomes
["Rubber Band"] = "Banda Elastica", -- Construction_Mode
correct? I've seen that all the italian translated strings doesn't have the last comment "-- Construction_Mode". Do you think I should start from scratch or continue with this file?
The comments are nice to have but not essential. It's mstly to give context.
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev
Ok, thank you very much. I'll start translating soon. Do you know when the new version will be released? I would like to translate more strings and improve the italian translation before the new release, but it's not essential
release schedule
If the release schedule doesnt help you, i would guess it would be near halloween
And your exemple for translation is correct
One simple question. If some strings is used in italian without translation (e.g. "highlander" which is common in italian, too) do you prefer to leave the string unstranslated or translate it with the same content?
Translate with same content, I'd say. Otherwise people or scripts checking for Translation completeness could falsely categorize that string as missing translation.
sheepluva <- me my code stats ->
a Hedgewars Developer
click here to message me
<- where I'm from what I speak ->
Ok thank you! I'll upload the file on bugzilla next week I think Thanks for help
Hello, I've translated the entire "Classic Fairytale" file. I'm now playing the adventure to see if the translations are correct and coherent with the game, but I would like to unlock all the levels (I can't even pass the 3rd mission which seems buggy). Is there any way to unlock all the missions?
P.S. Where I can find the "A Space Adventure" translation file?
find the folder of the campaign and edit the file " campaign.ini" MissionNum=X replace X with the right number
also, try to do the mission yourself, it is way better
for the translation file of A space Adventure, i dont know, should be the same as the other campaign, maybe it is not yet added to the locale file...
Hello, modify the campaign.ini file didn't work. It's already set to MissionNum=10 but also modifying this value doesn't unlock the missions. I've seen that the mission unlocked have a .hwp file but I can't open it. Maybe this file is needed to unlock a mission?
My intention was to play every map, but the "journey back" seems buggy for me. The other Hogs doesn't move and I cant take the crates as I have no ropes os something useful. I spent a lot of time trying to understand how to play that mission but I can't. I'm spending more time to play THAT mission than to review my translation. The latter is the priority for me at the moment
the .hwp is just the map file if i remember correctly
i remember reading in IRC that there were bugs on the campaign, but Wuzzy worked on it to fix the most bugs possible, try to install the beta version of the next release, : http://hedgewars.org/node/6772
also, usually modifying the campaign.ini work (i done it when i tested my shoppa campaign), but i think the problem here is because the campaign let you some choice so if you dont play the mission you dont write the choices in the next mission's lua file, so.... wait a real developper come with a better answer than mine ^^ i can't help more sorry
you can read the lua file to see how you would like your translation, see if it fits etc...
My themes / Theme Editor / Code contributions /
Dank
Thank you, both.
I'll try to do my best to translate the right way. I have no problem translating the content of the game, but italian is a bit more complex than english.
E.g.: "You have to wait"
"You" can be used if talking with ONE person or MORE than one person... "have" is always "have". In italian there are different verbal forms. "Tu devi aspettare" (One person) or "Voi dovete aspettare" (more than one person). This can make a simple talk totally non-sense.
This is why I would need to play every single mission to provide a good translation
yep, i had the same problem when i worked on the french translation, i guess a lot of langages need more context,
try to hand around on the irc, maybe you can direc speak with the developpers in charge
maybe, and that might help you just a little, you can find a walkthrough on youtube, or in the demo section, ask if anyone has the demo files (i havent ;p )
So, the original question of this thread seems to be answered, right?
For more questions about translations, go to https://hedgewars.org/kb/Translations
Yes, the .lua file has a very confusing syntax for those who do not program in Lua. Yes, these .lua files contain real code of a programming language, which is a bit crazy. xD
I guess I will explain this strange .lua file translation in that wiki page soonish.
Hi, I am a Hedgewars developer.