Troubles with commas

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

Moderator: Forum Moderators

yeti
Posts: 93
Joined: June 22nd, 2004, 4:56 pm
Location: Brno, Czech Republic
Contact:

Troubles with commas

Post by yeti »

I've just found out what causes the ugly spaces in some translated messages -- commas. The attached screenshot is from tutorial (turquoise emphasis added), now I remember I've seen some ugly spaces like this (and even worse) in other translated capmaigns too, but thought it was some random bug...

The space appears instead of any comma in a menu (choice). I suppose the character is used for something special in the menu code, but I need commas in Czech. Really.
-std::string font_name = "Vera.ttf";
+std::string font_name = "Bepa-Roman.ttf";
sanna
Posts: 425
Joined: June 5th, 2004, 9:59 am
Location: Halmstad, Sweden

Post by sanna »

I've seen the same thing, and I've kind of associated it with the comma. Never got around to submitting a bug though....
yeti
Posts: 93
Joined: June 22nd, 2004, 4:56 pm
Location: Brno, Czech Republic
Contact:

Post by yeti »

OK, by reading the code I've found out one has to prefix them with a backlash (\), and they become nonmagical then. So one just has to review translations of following msgids (this may not be a complete list):

Tutorial:
What do I do next?
How do I recruit units?
What's a leader?
How should I choose what kind of units to recruit?
What happens when I recruit a unit?
How do I end my turn?
What happens when I end my turn?
How far can my Elvish Fighter move?
What's the zone of control?
How do I tell who is allied and who is an enemy?
Can Merle retaliate from my attack?
How can you tell how powerful a unit's attacks are?
Will my fighter hit every time when he attacks?
What's experience?
What happens when a unit advances?
What happens when a unit moves onto a village?
How do I heal when there aren't any villages nearby?
How do I know how to complete a scenario? Will you always tell me?
What happens when I win a scenario?
What happens when I recall a unit?
How should I decide which units to recall?
What do traits do?
What kind of traits can my units get?
How much gold do my units cost?
How do I get gold?
What are the different alignments and times of day?
How do I know what time of day it is?
What are the different properties that terrains have?
How do I find out the properties of a specific terrain?
How does resistance affect attack damage?
What are the different damage types?
What do specialties do?
Which units get specialties?
What kinds of specialties can my units get?
How do I use specialties?
What kind of objects am I likely to encounter?
How long do these objects last?
How do I play a campaign?
How do I play multiplayer?

Heir to the Trone
Bay of Pearls
Ships? Ugh! I have been sea sick for the last time. We shall walk!
Going by ship we may at least get a little rest for ourselves. By sea it is!
The Siege of Elensefar
Very well. You may join us.
We cannot trust your motives. We shall rescue the city on our own!

Eastern Invasion
The Undead Border Patrol
We do not want to waste time here fighting Mal-Skraat. Onward!
You are right. It is foolish to go onward- we must defeat Mal-Skraat and turn back, going to the Northern Outpost.
Weldyn Under Attack
I'll accept this duel, and prove I am not a coward once and for all.
I'm not accepting a duel which you would obviously cheat in. I refuse!

The Rise of Wesnoth
A Harrowing Escape
I think I'll take the River Road. . .
We'll go through the Midlands. . .
The Ka'lian
I think I'll fight the Dragon!
Let's get those Saurians and Nagas on that beach!
Let's clear out that Troll Hole!
Let's put those Souls to rest on the Cursed Isle!
Fallen Lich Point
I think I'll say that magic phrase.
I think I'll wait a while before uttering any magic phrases.
The Dragon
Let's get out of here!
Let's finish off the rest of these monsters!
The Fall
I think that your skills may be useful. You may join us.
Your word can't be trusted. Prepare to meet your Gods!
-std::string font_name = "Vera.ttf";
+std::string font_name = "Bepa-Roman.ttf";
yeti
Posts: 93
Joined: June 22nd, 2004, 4:56 pm
Location: Brno, Czech Republic
Contact:

Post by yeti »

yeti wrote:to prefix them with a backlash (\)
Two backlashes, in fact. It might be obvious to me that a backslash must be itself escaped with a backslash, but not to everyone, so:

Put two backslashes before each such comma.
-std::string font_name = "Vera.ttf";
+std::string font_name = "Bepa-Roman.ttf";
isaac
Inactive Developer
Posts: 173
Joined: January 15th, 2004, 5:09 pm
Location: Zaragoza, Spain
Contact:

Post by isaac »

Uhm, currently commas are used for "column separation", but I think we are going to change it to '|' or something like that.

I'll talk with Dave ASAP and tell you.

Best regards
tephlon
Translator
Posts: 142
Joined: August 28th, 2004, 10:31 pm
Location: Göteborg, Sweden
Contact:

Post by tephlon »

But "|" is used for concatenating variables and strings, right? :)
yeti
Posts: 93
Joined: June 22nd, 2004, 4:56 pm
Location: Brno, Czech Republic
Contact:

Post by yeti »

isaac wrote:Uhm, currently commas are used for "column separation", but I think we are going to change it to '|' or something like that.

I'll talk with Dave ASAP and tell you.
@#$%! I've just fixed all offending comma instances to \\,

Never mind, it will be much easier to revert it than it was to do it... ;-)
-std::string font_name = "Vera.ttf";
+std::string font_name = "Bepa-Roman.ttf";
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Yeah commas are used to make menus into tables. This was probably quite short-sighted and we should have used something else. I guess we can switch it over still if it's really necessary.

Pipes (|) are out, since they are used to denote where help strings begin.

David
“At Gambling, the deadly sin is to mistake bad play for bad luck.” -- Ian Fleming
yeti
Posts: 93
Joined: June 22nd, 2004, 4:56 pm
Location: Brno, Czech Republic
Contact:

Post by yeti »

Dave wrote:Yeah commas are used to make menus into tables. This was probably quite short-sighted and we should have used something else. I guess we can switch it over still if it's really necessary.
Well, any change is a change for worse, so now when I
- know it's commas what causes problems and why
- know how to pacify them
- have already pacified them
I don't care any more, keep them or change them ... IMHO the important thing is that no translator knew what to do with it before (or at least no one answered), while now the solution is known.
-std::string font_name = "Vera.ttf";
+std::string font_name = "Bepa-Roman.ttf";
User avatar
Viliam
Translator
Posts: 1341
Joined: January 30th, 2004, 11:07 am
Location: Bratislava, Slovakia
Contact:

Post by Viliam »

yeti wrote:IMHO the important thing is that no translator knew what to do with it before (or at least no one answered), while now the solution is known.
Is there some page in Wiki containing "things that Wesnoth translators should know", i.e. besides the knowledge of how PO files work? Would someone please make it?
yeti
Posts: 93
Joined: June 22nd, 2004, 4:56 pm
Location: Brno, Czech Republic
Contact:

Post by yeti »

Viliam wrote:Is there some page in Wiki containing "things that Wesnoth translators should know", i.e. besides the knowledge of how PO files work? Would someone please make it?
I added this information to http://wesnoth.slack.it/?GettextForTranslators yesterday. I think things should generally go there (until it grows too large, but we will see how to split it then). However, it may turn out to be premature, as I don't know whether it is going to change or not.
-std::string font_name = "Vera.ttf";
+std::string font_name = "Bepa-Roman.ttf";
isaac
Inactive Developer
Posts: 173
Joined: January 15th, 2004, 5:09 pm
Location: Zaragoza, Spain
Contact:

Post by isaac »

yeti wrote: I added this information to http://wesnoth.slack.it/?GettextForTranslators yesterday. I think things should generally go there (until it grows too large, but we will see how to split it then). However, it may turn out to be premature, as I don't know whether it is going to change or not.
Great :), yes, it's the right place for it. There is no problem with people adding the \\ as it's easy to remove them if we change later.

Best regards
User avatar
ivanovic
Lord of Translations
Posts: 1149
Joined: September 28th, 2004, 10:10 pm
Location: Germany

Post by ivanovic »

I just thought a bit about possible signs. I do not really know if they are used. But I think these sighns do not make a conflict with any translation:
- *
- ^
- ~
I hope it can be changed.
Nils aka IVANOVIC
silene
Posts: 1109
Joined: August 28th, 2004, 10:02 pm

Post by silene »

I will modify the code so that the comma is not used as a column separator anymore. But we need a new separator. There are a few good ideas, but a choice needs to be made. So I have arbitrarily chosen "~". If this character is commonly used in a particular language, please say it quickly. Looking at all the .po files, it seems this symbol has been used only once (and it was due to the english original text).
EDIT: neither ~ nor * nor ^ is usable in fact; we are a bit short on available characters...
Lim_Dul
Posts: 1
Joined: December 1st, 2004, 3:41 pm

Post by Lim_Dul »

Must it be a single character?
Or can it be a string like :: ?
Post Reply