Page 8 of 10
Posted: Sat Dec 06, 2008 10:10 pm
by Cmdr Wyvern
Notepad is known to do odd things to a file when you save with it.
Try this editor on for size.
Posted: Sat Dec 06, 2008 10:14 pm
by DaddyHoggy
I second notepad++ fab little program - everything M$ could have made notepad but didn't!
Posted: Sat Dec 06, 2008 10:48 pm
by OSH
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:
Code: Select all
168 tons Futra
220 tons Likiery/wina
and so on...
Problem is, this isn't natural Polish declination. Right will be so:
Code: Select all
168 ton futer
220 ton likierow/win
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?
Posted: Sun Dec 07, 2008 7:34 pm
by OSH
Bump...
Posted: Sun Dec 07, 2008 7:56 pm
by JensAyton
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:
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
}
and in Polish.oxp:
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
}
in the mean time, could you use a unit symbol like "t" instead?
Posted: Sun Dec 07, 2008 8:10 pm
by OSH
Ahruman wrote:in the mean time, could you use a unit symbol like "t" instead?
Yes. I know, I have to wait for next release...I'm only signalise this problem, and I know, it will be very complicate to beat this...but I hope Oolite team will be able to...
Posted: Sun Dec 07, 2008 8:41 pm
by JensAyton
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…)
Posted: Sun Dec 07, 2008 9:09 pm
by OSH
And I have to add:
1 tona
2-4 tony
5 and more ton
BUT
1 kilogram
2-4 kilogramy
5 and more kilogramów
and for gram is similar to kilogram.
I know, Polish is very complicated language...
Posted: Sun Dec 07, 2008 10:00 pm
by another_commander
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.
Posted: Sat Dec 13, 2008 11:51 pm
by OSH
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:
Code: Select all
[14]
"%H",
"Planeta %H",
"Ta planeta",
"",
""
.
.
.
***[36]***
"Świat %H",
"Ten świat",
"",
"",
""
and
Code: Select all
"system-description-string" = "[14] jest [22].";
"system-description-string" = "[36] jest [22].";
is this possible?
Posted: Sun Dec 14, 2008 12:53 am
by another_commander
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]",
);
Posted: Sun Dec 14, 2008 12:10 pm
by OSH
Thanks, it works! Translation Oolite in progress
Posted: Sun Dec 14, 2008 1:04 pm
by JensAyton
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…
Posted: Sun Dec 14, 2008 1:34 pm
by OSH
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:
Code: Select all
// Assorted messages sent out by ships etc..
/* %H - homeworld
%I - homeworld+ian
Is it possible to make a switch, maybe something like this:
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...
Posted: Sun Dec 14, 2008 1:47 pm
by JensAyton
OSH wrote:Other questions. Is it possible, to make an array with more/fewer than 5 elements ?
No. The current code requires exactly five elements per array, which are selected in a way finely tuned to match original Elite behaviour.
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.)
Is it possible to make a switch, maybe something like this:
At the moment, no.