Multilingual Oolite
Moderators: winston, another_commander
- Cmdr Wyvern
- ---- E L I T E ----
- Posts: 1649
- Joined: Tue Apr 11, 2006 1:47 am
- Location: Somewhere in the great starry void
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
I second notepad++ fab little program - everything M$ could have made notepad but didn't!
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
- OSH
- Dangerous
- Posts: 124
- Joined: Thu Dec 04, 2008 2:57 pm
- Location: Poland, Lave Station :)
- Contact:
Thanks Cmdr Wyvern! Notepad++ works perfectly!
Hmm, I have another problem, but this is Polish grammar specific. Look at this picture:
As you see, on the Cargo list we have few positions:
and so on...
Problem is, this isn't natural Polish declination. Right will be so:
In Polish, declination of numerals is quite complicated:
1 tona=1 tone
2,3,4 tony = 2,3,4 tons
5, 6,...ton = 5,6 and more tons
and of course also noun is declinated:
Nominative plural: futra
genitive plural: futer
And genitive shall be used here.
And of course, without capitalization of first noun's letter. This can be complicated, because Oolite using only one commodities list, and use position from this list in all game. But in Polish is wrong to write noun with upper case, when this noun isn't first in the sentence, or is common noun.
Is this possible to implement this features in game code?
Hmm, I have another problem, but this is Polish grammar specific. Look at this picture:
As you see, on the Cargo list we have few positions:
Code: Select all
168 tons Futra
220 tons Likiery/wina
Problem is, this isn't natural Polish declination. Right will be so:
Code: Select all
168 ton futer
220 ton likierow/win
1 tona=1 tone
2,3,4 tony = 2,3,4 tons
5, 6,...ton = 5,6 and more tons
and of course also noun is declinated:
Nominative plural: futra
genitive plural: futer
And genitive shall be used here.
And of course, without capitalization of first noun's letter. This can be complicated, because Oolite using only one commodities list, and use position from this list in all game. But in Polish is wrong to write noun with upper case, when this noun isn't first in the sentence, or is common noun.
Is this possible to implement this features in game code?
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
I don’t think we can really expect to improve this much before the next full release. A list of words and sentences just isn’t flexible enough to handle all languages elegantly.
My long-term desire (I’m not going to go so far as to call it a plan) is to rewrite much of the user interface code in JavaScript. This way, you could override some of the logic. For instance, you might have a function like this in the core game:
and in Polish.oxp:
in the mean time, could you use a unit symbol like "t" instead?
My long-term desire (I’m not going to go so far as to call it a plan) is to rewrite much of the user interface code in JavaScript. This way, you could override some of the logic. For instance, you might have a function like this in the core game:
Code: Select all
this.FormatCargoQuantity = function(quantity, unit)
{
if (unit == "tons")
{
if (quantity == 1) return "1 " + expandDescription("cargo-ton");
else return quantity.toString() + " " + expandDescription("cargo-tons");
}
// similar for kilograms and grams
}
Code: Select all
this.FormatCargoQuantity = function(quantity, unit)
{
if (unit == "tons")
{
if (quantity == 1) return "1 tona";
else if (quantity < 5) return quantity.toString() + " tony";
else return quantity.toString() + " ton";
}
// similar for kilograms and grams
}
E-mail: [email protected]
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
To be clear, by “next full release” I don’t mean 1.73. (It could be 1.75, that’s a nice half-round number…)
E-mail: [email protected]
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Every language has its own idiosyncracies and particularities. It is to be expected that no rules for specific languages can be applied in the game logic (unless you go the way Ahruman proposed, which is something that will take its time to reach full implementation status), simply because there are so many different languages and doing so would make Oolite a study in linguistics, not a game.
The important (and most difficult, probably) thing in building a localization OXP is to try to fit the language you are working on to the very simple rules and phrase structure of the English language on which the game was originally built. Sometimes it can become a Herculean task. You will know what I mean when you try to translate the planet descriptions. But it can be done, or at least it can be done to an acceptable degree with most languages. Just don't expect it to be a walk in the park. Some "funny" translated phrases would be unavoidable, but then again, "edible arts graduate" is a funny original phrase.
The important (and most difficult, probably) thing in building a localization OXP is to try to fit the language you are working on to the very simple rules and phrase structure of the English language on which the game was originally built. Sometimes it can become a Herculean task. You will know what I mean when you try to translate the planet descriptions. But it can be done, or at least it can be done to an acceptable degree with most languages. Just don't expect it to be a walk in the park. Some "funny" translated phrases would be unavoidable, but then again, "edible arts graduate" is a funny original phrase.
- OSH
- Dangerous
- Posts: 124
- Joined: Thu Dec 04, 2008 2:57 pm
- Location: Poland, Lave Station :)
- Contact:
Ekhm, I have one question...
In system_description, under [14] a find few words like "%H","The planet %H", "The world %H", "This planet", "This world". In Polish "the planet", and "this planet" are female word group, and "world" and "this world" are masculine. Due this difference, I have to divide [14] into two groups: masculine and female word groups. But is one hurdle: "system-description-string". Here is only one combination [14] is [22]. I want know, is possible to make two "system-description-strings": [14] is [22] and [36] (in this array I want to put only masculine word groups) is [22]. Something like this:
and
is this possible?
In system_description, under [14] a find few words like "%H","The planet %H", "The world %H", "This planet", "This world". In Polish "the planet", and "this planet" are female word group, and "world" and "this world" are masculine. Due this difference, I have to divide [14] into two groups: masculine and female word groups. But is one hurdle: "system-description-string". Here is only one combination [14] is [22]. I want know, is possible to make two "system-description-strings": [14] is [22] and [36] (in this array I want to put only masculine word groups) is [22]. Something like this:
Code: Select all
[14]
"%H",
"Planeta %H",
"Ta planeta",
"",
""
.
.
.
***[36]***
"Świat %H",
"Ten świat",
"",
"",
""
Code: Select all
"system-description-string" = "[14] jest [22].";
"system-description-string" = "[36] jest [22].";
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Yes it is. You need to set it up as an array, like this:
Code: Select all
"system-description-string" = ("[14] jest [22].",
"[36] jest [22]",
);
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
It occurs to me that it would be a lot easier to write the system description things if there was a tool to write them using named references instead of numbers. I’ll see about hacking something up…
E-mail: [email protected]
- OSH
- Dangerous
- Posts: 124
- Joined: Thu Dec 04, 2008 2:57 pm
- Location: Poland, Lave Station :)
- Contact:
Other questions. Is it possible, to make an array with more/fewer than 5 elements ?
How can I switch between upper/lower case? In Polish adjectives for planets' names are lower case:
Laveian - > lavejański
Disoian - > disojański
but here is so:
Is it possible to make a switch, maybe something like this:
?
I'm sorry for so much questions, but I want to make my job perfectly...
How can I switch between upper/lower case? In Polish adjectives for planets' names are lower case:
Laveian - > lavejański
Disoian - > disojański
but here is so:
Code: Select all
// Assorted messages sent out by ships etc..
/* %H - homeworld
%I - homeworld+ian
Code: Select all
// Assorted messages sent out by ships etc..
/* %H - homeworld
%I - homeworld (lower case)+jański
I'm sorry for so much questions, but I want to make my job perfectly...
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
No. The current code requires exactly five elements per array, which are selected in a way finely tuned to match original Elite behaviour.OSH wrote:Other questions. Is it possible, to make an array with more/fewer than 5 elements ?
This could probably be made more flexible in future versions, but until then you’re stuck with five values, or 1 + 4n values if you split it into n arrays. (However, doing that would result in a different random number sequence, so the rest of the description could not be made to match the English one.)
At the moment, no.Is it possible to make a switch, maybe something like this:
E-mail: [email protected]