Hello, we apologize but forum registrations are non-functional at this time. This issue should be fixed around mid-December. Until then, please stop by our Discord channel if you'd like to get in touch with the team. Thanks!

Changes needed for translation

For translation of Allacrost game text, dialogue, story, documentation, etc.

Moderator: Staff

Post Reply
User avatar
marcavis
Junior Member
Posts: 32
Joined: Tue Jun 09, 2009 6:28 pm
Location: Santa Catarina, Brazil

Changes needed for translation

Post by marcavis » Sat May 22, 2010 2:11 am

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: Select all

_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.
User avatar
gorzuate
Developer
Posts: 2575
Joined: Wed Jun 16, 2004 9:03 pm
Location: Hermosa Beach, CA
Contact:

Re: Changes needed for translation

Post by gorzuate » Tue May 25, 2010 9:07 pm

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
User avatar
Bertram
Senior Member
Posts: 127
Joined: Fri Feb 26, 2010 3:08 am

Re: Changes needed for translation

Post by Bertram » Thu Jun 03, 2010 3:26 am

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.
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: Select all

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: Select all

_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.
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.
rujasu
Developer
Posts: 758
Joined: Sat Feb 24, 2007 10:40 pm
Location: Maryland, USA

Re: Changes needed for translation

Post by rujasu » Fri Jun 04, 2010 9:37 pm

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.
Post Reply