Multilingual Oolite

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Cyrillic, Greek, Turkish and Eastern European (Windows Latin 2) “starter kit” OXPs are now at http://svn.berlios.de/svnroot/repos/ool ... encodings/.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Ahruman wrote:
Test of localizable commodity names (via descriptions.plist). Also a start on a Swedish localization.

The OXP description.plist looks like this (XML due to copy&pasting):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>commodity-name Food</key>
	<string>Fööd</string>
	<key>commodity-name Textiles</key>
	<string>Tëxtïles</string>
	<key>commodity-name Radioactives</key>
	<string>Rädïöäctïvës</string>
	<key>commodity-name Slaves</key>
	<string>Slävës</string>
	<key>commodity-name Liquor/Wines</key>
	<string>Lïqüör/Wïnës</string>
	<key>commodity-name Luxuries</key>
	<string>Lüxürïës</string>
	<key>commodity-name Narcotics</key>
	<string>Närcötïcs</string>
	<key>commodity-name Computers</key>
	<string>Cömpütërs</string>
	<key>commodity-name Machinery</key>
	<string>Mächïnëry</string>
	<key>commodity-name Alloys</key>
	<string>Ällöys</string>
	<key>commodity-name Firearms</key>
	<string>Fïrëärms</string>
	<key>commodity-name Furs</key>
	<string>Fürs</string>
	<key>commodity-name Minerals</key>
	<string>Minëräls</string>
	<key>commodity-name Gold</key>
	<string>Göld</string>
	<key>commodity-name Platinum</key>
	<string>Plätïnüm</string>
	<key>commodity-name Gem-Stones</key>
	<string>Gëm-Stönës</string>
	<key>commodity-name Alien Items</key>
	<string>Älïën Ïtëms</string>
	
	<key>commodity-column-title</key>
	<string>Børk Bork:</string>
	<key>price-column-title</key>
	<string>Börk:</string>
	<key>for-sale-column-title</key>
	<string>Bøørk:</string>
	<key>in-hold-column-title</key>
	<string>Bork:</string>
</dict>
</plist>
Thanks for this! And to avoid unnecessary doublettes I just want to mention that another_commander already had introduced <key>commodity-column-title</key>, <key>price-column-title</key>, <key>for-sale-column-title</key> and <key>in-hold-column-title</key> before.

Edit: accidental moderator edit, undone
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

I’ve changed it so the descriptions.plist keys are lowercase, and lookups are case-insensitive. This is basically in anticipation of sloppy JavaScript coding. ;-) (Display names for commodities can be looked up with the new global function DisplayNameForCommodity(commodityName : String) : String.)
Commander McLane wrote:
Thanks for this! And to avoid unnecessary doublettes I just want to mention that another_commander already had introduced <key>commodity-column-title</key>, <key>price-column-title</key>, <key>for-sale-column-title</key> and <key>in-hold-column-title</key> before.
Right. I just included those for the proper Swedish ämbience.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Ahruman wrote:
I’ve changed it so the descriptions.plist keys are lowercase, and lookups are case-insensitive.
Does this mean that I can still keep <key>commodity-name Food</key>?

But it's probably better if I use the lowercase names. What about the two-word commodities? Is it <key>commodity-name gem-stones</key> and <key>commodity-name alien items</key>?

One more thing, just for uniformity of the code: another_commander has always used hyphens in the keys, so far there is nowhere a SPACE. So wouldn't it be better to go with <key>commodity-name-food</key> etc.?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
Ahruman wrote:
I’ve changed it so the descriptions.plist keys are lowercase, and lookups are case-insensitive.
Does this mean that I can still keep <key>commodity-name Food</key>?
No. For efficient case-insensitive lookup, the keys are lowercase and the thing being looked up is changed to lowercase before looking up. In other words, it’s case-insensitive in every context except this one. :-) I’ve amended the original example to use the correct keys.
One more thing, just for uniformity of the code: another_commander has always used hyphens in the keys, so far there is nowhere a SPACE. So wouldn't it be better to go with <key>commodity-name-food</key> etc.?
I did it this way because it made editing easier (if you like to use double-click to select whole words, that is). There’s no actual advantage to avoiding spaces in dictionary keys, and doing it this way makes it easier to see the join between the two parts (“commodity-name” and the actual commodity name).
zimmemic25
Competent
Competent
Posts: 47
Joined: Sun Jan 20, 2008 3:51 pm

Post by zimmemic25 »

can i download a german linux version now?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

You will be able to download a German version for any OS, as soon as it will be finished, because it will be an OXP, which you can install regardless of your computer configuration.

Unfortunately, due to other work I have to do, and also due to the complicatedness of German grammar, which makes translating the system descriptions a really non-trivial task, the German version is not finished yet.

And it will only work in 1.71 and above, which is not yet released.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Here’s one for aspiring translators: a graph of the system description grammar: PDF, DOT (Graphviz format). 1.71 will be able to spit this out based on the current descriptions.plist.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Hmmm, spaghetti! :)

While the diagram for the system description grammar is very helpful as it is, I just wanted to add that the system descripion routine is very flexible and can use more than 33 blocks.

Why use more numbered blocks? In quite a lot of languages all parts of a sentence need to agree with both gender (male, female & neuter) and number (one or many). One not-too-complicated example would be the relationship between blocks 8 and 21.

There's two sentences inside block 8 that say "[21] solar activity" and "[21] earthquakes". At a minimum, you'd need to create a new block - block 34 ? - just to put the plural form for all the adjectives found in block 21. You can then have"[21] solar activity" and "[34] earthquakes" etc.

As a rule of thumb, where English needs just one form, other languages may need up to 6. Not for the faint hearted, even with the help of the diagram. Another_commander & Commander McLane, any chances to see the diagrams for Italian & German? Having more examples to look at might definitely inspire any budding translator! :)

Cheers,

Kaks
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Genuine Italian spaghetti: PDF, DOT.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Thanks, Ahruman, that's a really fine tool! :D

I've tried to do something similar by hand, creating a huge table like an excel-sheet, containing every possible description string in boxes from left to right. Didn't finish it, as the printed version wouldn't have fitted on my desk, anyway. :oops:

I also have to confess that I haven't yet returned to this work. Lack of time. As soon as I have nothing else to do and the wife is out of the house for a couple of days (just one of the conditions fulfilled will not be sufficient!) I'll get to it again. Promised! :wink:
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Okay, 1.71 being out makes it so much easier to work on the german localization, as I can see everything I do at once in the game, without sending the scripts to another_commander and getting screenshots from him. (Thanks for that service, by the way!) :wink:

Anyway, back to it, and right now comparing the descriptions.plist from 1.71 with the one from another_commander I was working on. There are a couple of differences. I'd like to understand them all, so I post them here:
  • a_c's version had a @-locked-onto-@. Am I right that this one is replaced by the new ident-locked-onto-@?
  • In a_c's version there was a gameoptions-back. I don't find a substitute for that in 1.71. (Although on the options screen there appears the word "Zurück".) Is it substituted by the new (and more general) gui-back?
  • In a_c's version there were gameoptions-itunes-no and gameoptions-itunes-yes. This seems to be included in the new music-mode, with Off, On and iTunes as options. Right?
  • The is-word from a_c's version is obviously substituted by system-description-string in 1.71 (which gives a little more flexibility).
  • What happened to ident-system-string from a_c's version?
  • And to long-range-chart-find-planet (without the @ at the end)? No longer in use?
  • What about missile-string from a_c's version?
  • Oh, and one thing is missing: The different options for Growl-Messages: OFF (for all messages); ON (for highest priority messages); ON (for high priority messages); ON (for medium priority messages); ON (for low priority messages); and ON (for all messages) are not coded in descriptions.plist, so I can't translate them.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Working out exactly what got replaced with what would require some fiddly archæology, so I’m going to go with guesswork here.
Commander McLane wrote:
  • a_c's version had a @-locked-onto-@. Am I right that this one is replaced by the new ident-locked-onto-@?
Yes, and also missile-locked-onto-@. (I think at one point it used missile-locked-onto-@ or @-locked-onto-@ for missile locks depending on whether you had something targeted before arming the missile.)
  • In a_c's version there was a gameoptions-back. I don't find a substitute for that in 1.71. (Although on the options screen there appears the word "Zurück".) Is it substituted by the new (and more general) gui-back?
Looks like it. Also used in load/save screen, shipyard and joystick setup.
  • In a_c's version there were gameoptions-itunes-no and gameoptions-itunes-yes. This seems to be included in the new music-mode, with Off, On and iTunes as options. Right?
Yes.
  • The is-word from a_c's version is obviously substituted by system-description-string in 1.71 (which gives a little more flexibility).
Yes.
  • What happened to ident-system-string from a_c's version?
Dunno. What did it say?
  • And to long-range-chart-find-planet (without the @ at the end)? No longer in use?
No, it just passes an empty string as the %@ parameter.
  • What about missile-string from a_c's version?
Only used (redundantly) with defunct @-locked-onto-@.
  • Oh, and one thing is missing: The different options for Growl-Messages: OFF (for all messages); ON (for highest priority messages); ON (for high priority messages); ON (for medium priority messages); ON (for low priority messages); and ON (for all messages) are not coded in descriptions.plist, so I can't translate them.
Oops, yes, those are hard-coded. Will fix. Syntax will be:

Code: Select all

"growl-priority-levels" = ("On (for all messages)", "On (for low priority messages)", "On (for medium priority messages)", "On (for high priority messages)", "On (for highest priority messages)", "Off (for all messages)" );
To be honest I think we could do with less detailed control here, but meh.

For future expansion, also add "growl-not-available" = "Not available";
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Okay, I deleted the defunct keys and added the Growl-message keys.

There is one other issue: a_c and I were a little bothered with capitalization, because (especially) in German this is handled differently from most other languages. We start every noun with a capital letter, every time.

Oolite has a built-in function that changes capital letters to small letters automatically at a few instances, which gets in the way of correct German writing. Most notable with the weapons on the shipyard screen, where it says "forward weapon has been upgraded to beam laser" or something of the like. In the German version "Beam Laser" should be written with capitals. Another_commander had introduced a new key for that purpose, a boolean named weapon_name_constant, which defaults to NO, but can be set to YES, in order to indicate that the strings as defined in weapon_name shall not be changed. Now in the released 1.71 this key and the corresponding functionality are missing. So please include a_c's changes in the trunk.

And while playtesting I found some not-yet-plist'ified strings: For a start the "Game paused."-string (the "F2 for game options, P to continue" is, however) and everything that is related to hitting debug-message-keys whilst paused, like "Entity list dumped. Debugging OFF" etc.

*****

Oh, and one purely cosmetic issue: The two mentioned keys, together with only two or three others (system_description, thargoid_curses, probably something else) are the only ones with an underscore in their name. All the rest has hyphens. If there is no specific reason for that (and I don't suppose there is), couldn't we unify this to hyphens only?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Commander McLane wrote:
Oh, and one purely cosmetic issue: The two mentioned keys, together with only two or three others (system_description, thargoid_curses, probably something else) are the only ones with an underscore in their name. All the rest has hyphens. If there is no specific reason for that (and I don't suppose there is), couldn't we unify this to hyphens only?
I’m not a fan of changing stuff that doesn’t really matter, but newly introduced strings should use hyphens of we remember.

I’ll leave the weapon-name stuff to another_commander.

game-paused is there, and is in fact localizable in 1.65 too.
Post Reply