Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old July 19, 2010, 04:14   #1
hernaldo
Rookie
 
Join Date: Jul 2010
Posts: 14
hernaldo is on a distinguished road
Translate Angband 3.1.0 to other language

Hi people,
I have some doubts about to translate the game to other language:

1.- Can I translate Angband to other language? (I compile the source code)

2.- If I finish my tranlation, can i put my nick in the welcome title on load the game?

3.- Can I generate mi own Blog page with the status and other information about the translation? or Am I required to post in this forum? or Both?

4.- What would my product license translated? GPL?

thank and goodbye
hernaldo is offline   Reply With Quote
Old July 19, 2010, 04:52   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 8,049
Donated: $60
Nick will become famous soon enough
In my opinion all of those would be acceptable, and welcome.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old July 19, 2010, 05:12   #3
hernaldo
Rookie
 
Join Date: Jul 2010
Posts: 14
hernaldo is on a distinguished road
thanks Nick!!

First problem, my language has accents (for example ), but when i put in the text " it is a test hello " y the screen I only see " it is a test hello" (white space in the "" position)

then, What object i have to modify for get all characteres that i need ?
I seek in the Pref/ font-win.prf but this has not a letters.

some help?
hernaldo is offline   Reply With Quote
Old July 19, 2010, 05:51   #4
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,372
AnonymousHero is on a distinguished road
If you do do this, please use the "gettext" library for it. It is very easy to use and hopefully your changed could be re-integrated back into vanilla Angband for all to benefit from. (NOTE: I don't have any say in this, but "gettext" is minimally disruptive to the code, so I expect it's the approach which has the greatest chance of ever making it into Vanilla. It's also probably less work for you since it can extract strings to translate automatically.)

Basically any time you see
Code:
       println("Hi, this is a text!");
you change it to
Code:
      println(_("Hi, this is a text!"));
The way you translate then, is to provide a language-specific file with strings saying:
Code:
    "Hi, this is a text!" gets translated to "Hej, dette er en tekst!"
AnonymousHero is offline   Reply With Quote
Old July 19, 2010, 06:11   #5
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 8,049
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by hernaldo View Post
First problem, my language has accents (for example ), but when i put in the text " it is a test hello " y the screen I only see " it is a test hello" (white space in the "" position)

then, What object i have to modify for get all characteres that i need ?
I seek in the Pref/ font-win.prf but this has not a letters.
Angband does not support accented characters at the moment; this may change before too long.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old July 19, 2010, 12:55   #6
nppangband
NPPAngband Maintainer
 
Join Date: Dec 2008
Location: Stat Gain, Angband
Posts: 926
nppangband is on a distinguished road
Quote:
Originally Posted by Nick View Post
Angband does not support accented characters at the moment; this may change before too long.
I saw a thread once debating the switch from ASCII to unicode. Is that being considered?

I almost have the extended characters from NPP working with the current Angband code base. That could be quickly and easily added (once I get all the bugs worked out).

To answer the original poster's question, over the years Angband has been translated into many languages. Japanese, Russian, and Dutch are three that have been completed. I am not sure what they did about the fonts, however.
nppangband is offline   Reply With Quote
Old July 19, 2010, 13:35   #7
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 8,049
Donated: $60
Nick will become famous soon enough
Quote:
Originally Posted by nppangband View Post
I saw a thread once debating the switch from ASCII to unicode. Is that being considered?

I almost have the extended characters from NPP working with the current Angband code base. That could be quickly and easily added (once I get all the bugs worked out).
Yeah, I have it in FA, too.

Takkaria wants to move to UTF-8 (which Wikipedia tells me is unicode...), but last I heard he didn't want to do the extended character stuff. I was planning to include the xchars in AngbandBase, but maybe I should look into UTF-8. The only issue is whether I finish it this lifetime.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old July 19, 2010, 14:08   #8
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
If you do do this, please use the "gettext" library for it. It is very easy to use and hopefully your changed could be re-integrated back into vanilla Angband for all to benefit from. (NOTE: I don't have any say in this, but "gettext" is minimally disruptive to the code, so I expect it's the approach which has the greatest chance of ever making it into Vanilla. It's also probably less work for you since it can extract strings to translate automatically.)

Basically any time you see
Code:
       println("Hi, this is a text!");
you change it to
Code:
      println(_("Hi, this is a text!"));
The way you translate then, is to provide a language-specific file with strings saying:
Code:
    "Hi, this is a text!" gets translated to "Hej, dette er en tekst!"
Greetings, every time someone mentions translating, someone else mentions gettext and then still someone else says 'Dude, Angband has dozens of language related functions, there's much more to it then just using gettext, in fact gettext might very well annoy future translators instead of helping them."

Gettext is great for static text, most of the text in Angband is dynamically generated which has to take care of declensions, word order typology and other cool stuff.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Old July 19, 2010, 14:23   #9
AnonymousHero
Veteran
 
AnonymousHero's Avatar
 
Join Date: Jun 2007
Posts: 1,372
AnonymousHero is on a distinguished road
Gettext handles dynamic text pretty well too. (Including stuff people usually never think of until it's too late.)

It's still not trivial, but it's much better than trying to maintain a fork in a different language.

EDIT: See this as an example: http://www.gnu.org/s/libc/manual/htm...functions.html
AnonymousHero is offline   Reply With Quote
Old July 19, 2010, 15:44   #10
konijn_
Hellband maintainer
 
konijn_'s Avatar
 
Join Date: Jul 2007
Location: New York, the Big Apple
Age: 42
Posts: 367
Donated: $120
konijn_ is on a distinguished road
Quote:
Originally Posted by AnonymousHero View Post
Gettext handles dynamic text pretty well too. (Including stuff people usually never think of until it's too late.)

It's still not trivial, but it's much better than trying to maintain a fork in a different language.

EDIT: See this as an example: http://www.gnu.org/s/libc/manual/htm...functions.html
Yes, gettext supports plurals, that wont get you far enough.

Just think how you would approach :

message("You hit the %s with your %s for %s damage." % (target, weapon,
damage))

or ( already more advanced )

message(strings.msg_you_hit % (target, weapon, damage))

It means you would have to provide ( especially for French/German ) the genus of the words and actors in the game just to support those languages or have different calls depending on the player / monster genus ( yuck ! )

There's a dutch guy on the forums sometimes that maintains a Dutch version of Angband, you can ask him more details as to why gettext by itself could be more a hindrance than a benefit.

T.
__________________
* Are you ready for something else ? Hellband 0.8.8 is out! *
konijn_ is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Morgothian programming language zaimoni Idle chatter 2 April 22, 2009 09:26
Angband and language tigpup Idle chatter 1 February 1, 2009 12:53
C Language momo125 Vanilla 11 February 27, 2008 08:30


All times are GMT +1. The time now is 17:06.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.