Hero of Allacrost Forums

It is currently Fri Sep 10, 2010 6:41 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Changes needed for translation
PostPosted: Sat May 22, 2010 7:11 am 
Offline
Junior Member
User avatar

Joined: Tue Jun 09, 2009 11:28 pm
Posts: 21
Location: Santa Catarina, Brazil
It's about time I compiled this...
Some in-game messages need a greater degree of flexibilization to allow for more natural translations.
Other translators may (will) need different changes, but these are mine (pt_BR):

1. Gettext has grouped together some messages that are the same in English but will have different translations, namely:
"Equip" in modes/menu/menu.cpp:521, where it's a noun, and at line 636, where it's a verb.
"Arm" in modes/menu/menu.cpp:853 and menu_views.cpp:204, where it's an abbreviation for Armor
"All" in modes/menu/menu_views.cpp:199 and again at line 703; I have no words that can fit both uses of All.
This applies, but I don't know how to apply that in the code, so I'll leave it to you guys for now.

2. This part (map_treasure.cpp:455) should really be a single sentence with format strings, since different languages will have a different word ordering.
Code:
_detail_textbox.SetDisplayText(UTranslate("With the additional ") + MakeUnicodeString(NumberToString(_treasure->_drunes)) +
         UTranslate(" drunes found in this treasure added, the party now holds a total of ") + MakeUnicodeString(NumberToString(GlobalManager->GetDrunes()))
         + MakeUnicodeString(" drunes."));


3. Some messages require usage of plural forms: "count", "unique", "characters" in both shop_confirm.cpp and shop_leave.cpp

This is about it, but I'll have to ask our other translators what they might need.


Top
 Profile  
 
 Post subject: Re: Changes needed for translation
PostPosted: Wed May 26, 2010 2:07 am 
Offline
Developer
User avatar

Joined: Thu Jun 17, 2004 2:03 am
Posts: 2523
Location: Hermosa Beach, CA
Thanks for this :) It's hard to know what capability is missing if our translators don't say anything. I'll take a look at implementing this stuff when I find some time... :uhoh:

Keep the suggestions flowing.

_________________
Image


Top
 Profile  
 
 Post subject: Re: Changes needed for translation
PostPosted: Thu Jun 03, 2010 8:26 am 
Offline
Junior Member
User avatar

Joined: Fri Feb 26, 2010 9:08 am
Posts: 25
Hi there!

I've finally read the whole gettext manual and took the time to (mostly) understand it ;)
I don't want to step on anyone's toes, so feel free to yell at me if I'm dealing with things too obvious, or already taken up by someone else.
Quote:
1. Gettext has grouped together some messages that are the same in English but will have different translations, namely:
"Equip" in modes/menu/menu.cpp:521, where it's a noun, and at line 636, where it's a verb.
"Arm" in modes/menu/menu.cpp:853 and menu_views.cpp:204, where it's an abbreviation for Armor
"All" in modes/menu/menu_views.cpp:199 and again at line 703; I have no words that can fit both uses of All.
This applies, but I don't know how to apply that in the code, so I'll leave it to you guys for now.

As Marcavis ingeniously said, we'll need to to make use of context by using the pgettext(context, stringToTranslate) function. Another new UTranslate-like function adding context as parameter is then needed, I guess.
Can I propose this as contexts for Marcavis examples?
Code:
String             Context
------             --------
Equip              noun
Equip              verb
Arm                Body Part
Arm                Armor Abbreviation
All                Equip Menu
All                Skill Menu


As for 2, I'd propose this (or alike):
Code:
_detail_textbox.SetDisplayText(UTranslate("With the additional %s drunes found in this treasure added, the party now holds a total of %s drunes.", MakeUnicodeString(NumberToString(_treasure->_drunes)), MakeUnicodeString(NumberToString(GlobalManager->GetDrunes())) );

So we can always make use of %s numbering if the order is changing as it could be for the German translation for example.

Quote:
3. Some messages require usage of plural forms: "count", "unique", "characters" in both shop_confirm.cpp and shop_leave.cpp

Indeed, the ngettext function should be used those cases.

I'll add that I remember seeing one or two sentences too similar in the english version of the story, making the dialogues in french a bit weird in some cases. I'll try to catch them for my next po update.

Best regards.


Top
 Profile  
 
 Post subject: Re: Changes needed for translation
PostPosted: Sat Jun 05, 2010 2:37 am 
Offline
Developer

Joined: Sun Feb 25, 2007 4:40 am
Posts: 603
Location: Maryland, USA
Your proposals sound good, Bertram. It might take a bit of time before we can implement them, but it sounds like your suggestions would work.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group