Noob questions

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

Moderator: Forum Moderators

User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Noob questions

Post by tekelili »

Hi, I am learning to prepare an add on to be translated. I learned to use predefined gettext files like #wenoth-units, but I have doubts about if they can be used to translate strings like:

_"ranged drain"
_"melee markaman"
_"forest movement"
_"Poison" (the initial cap gives me problems)

Thanks in advance for help.
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Noob questions

Post by GunChleoc »

The initial cap shouldn't be a problem. Gettext doesn't really care, except for that _"poison" and _"Poison" are two different strings.

I don't know how the textdomain for add-ons is defined and which script collects the strings for translation. Maybe looking at a similar add on will help.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Noob questions

Post by zookeeper »

I don't know what you're asking exactly.

If you have this:

Code: Select all

#textdomain wesnoth-units
_"Troll"
#textdomain wesnoth-mytextdomain
_"Orc"
Then the translation for "Troll" will be taken from #wesnoth-units, and the translation for "Orc" (and any subsequent strings) from #wesnoth-mytextdomain. There's nothing more to it than that.

EDIT: Added the missing "textdomain"s to the example... :whistle:
User avatar
Adamant14
Posts: 968
Joined: April 24th, 2010, 1:14 pm

Re: Noob questions

Post by Adamant14 »

It's not an answer to your question, but I guess 'markaman' should be 'marksman', right?
Author of Antar, Son of Rheor ( SP Campaign) | Development Thread + Feedback Thread + Replays of ASoR
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Noob questions

Post by tekelili »

zookeeper wrote:I don't know what you're asking exactly.

If you have this:

Code: Select all

#textdomain wesnoth-units
_"Troll"
#textdomain wesnoth-mytextdomain
_"Orc"
Then the translation for "Troll" will be taken from #wesnoth-units, and the translation for "Orc" (and any subsequent strings) from #wesnoth-mytextdomain. There's nothing more to it than that.

EDIT: Added the missing "textdomain"s to the example... :whistle:
I am already usin #textdomain wesnoth-units correctly for tranlate units names; my main doubt was that I was using "ranged drain" to indicate that unit gains drain to all attacks range ranged (wich I dont know if is the best English way to write it, btw). In my language (Spanish), the order of words would change in translation, so I imagine I can´t translate separately each word, so have doubts if is there a translation for the whole text.

And sorry for write wrong marksman :oops:
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Noob questions

Post by Dugi »

The translation translates whole strings, not word-by-word.
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Noob questions

Post by tekelili »

GunChleoc wrote:The initial cap shouldn't be a problem. Gettext doesn't really care, except for that _"poison" and _"Poison" are two different strings.

I don't know how the textdomain for add-ons is defined and which script collects the strings for translation. Maybe looking at a similar add on will help.
I am getting translated "Fearless", "Healthy" and "Poison" (that´s all). But I am not getting translated a lot of other abilities like "Teleport"... while I can get translated "teleport" :(
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
GunChleoc
Translator
Posts: 506
Joined: September 28th, 2012, 7:35 am
Contact:

Re: Noob questions

Post by GunChleoc »

Ths means that "teleport" has been translated in the text domain you chose and "Teleport" hasn't. For the translation system, they are two completely different strings.
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: Noob questions

Post by SkyOne »

I am not sure your problem exactly, but you may need to take a look this file?
wesnoth-help-esp.zip
(78.47 KiB) Downloaded 445 times
You can download all others here on this forum to take a look.
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Noob questions

Post by tekelili »

One last question, if I have the same string writed several times in my add on, would define a macro for that string become translators work easier, or it doesn´t matters and would be an useless effort?
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Noob questions

Post by zookeeper »

It doesn't matter. You can use the same string as many times as you want inside the same textdomain and it'll still show up only once to translators.
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Noob questions

Post by tekelili »

My campaign is under development and will have changes in flavor text, so I guess is not good idea upload it as translatable. However I would like translate myself some of the "info" text to Spanish and French. I downloaded Poedit and gettext, but understand how to create a po file is beyond my skills/time available. In case it was a few minutes task... could someone very kindly create es and fr po-files for me? ^_^
Attachments
World_Conquest_tek.rar
(82.6 KiB) Downloaded 406 times
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
trewe
Translator
Posts: 122
Joined: December 24th, 2012, 5:37 pm
Location: Portugal
Contact:

Re: Noob questions

Post by trewe »

Here you have.

Two notes: never have filenames containing spaces (there is a file called "Read me.txt", rename that) and the name of the textdomain should be prefixed by 'wesnoth-'.
Attachments
fr.po
(41 KiB) Downloaded 390 times
es.po
(41 KiB) Downloaded 401 times
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Noob questions

Post by tekelili »

Thanks a lot trewe, I will follow your advises :D
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
User avatar
tekelili
Posts: 1039
Joined: August 19th, 2009, 9:28 pm

Re: Noob questions

Post by tekelili »

In my noobinesh i thought all I needed was a po file to have a translation working... But I have translated 1 string in po file to test and copied it in my_campaign/translations/es/LC_MESSAGES without get it translated in game. Do I have skiped some basic steps to have translation working or is my mistake more subtle?

Of course I have this in _main

Code: Select all

[textdomain]
    name="wesnoth-World_Conquest_tek_translated"
    path="data/add-ons/World_Conquest_tek_translated/translations"
[/textdomain]
And I guess I declared well text domains as I got mainline translations working.
Attachments
World_Conquest_tek_translated.rar
(611.39 KiB) Downloaded 388 times
Be aware English is not my first language and I could have explained bad myself using wrong or just invented words.
World Conquest II
Post Reply