Re: Gnome-games and scheme



tor 2003-05-22 klockan 13.49 skrev Callum McKenzie:
> It is a minor step up from what it previously was, you couldn't
> even reverse the order of the rank and suit before :).

Certainly. Aisleriot is a mess (obviously it wasn't written with l10n in
mind :) and you're certainly spending spending a lot of work improving
the code.
We all owe you a *huge* thanks for doing that. My mail was just intended
as a "oops, this specific solution isn't fully adequate either". :)


> I'm going to alter the code as you suggest and give all 56 possible strings
> to the translators. (That is 13 cards * 4 suits + 2 jokers)

Yeah. I think most translators will agree that more messages are always
better than fewer messages that aren't properly localizable or easily
localized. Obviously, this also has a limit, but I think we can manage
55 additional rather simple messages.


> There is another problem. Once the card name has been generated it
> is usually placed in another string. Unfortunately it is just not
> feasible to to produce strings for all 3136 possible "move card a
> onto card b" style messages. I intend to make the basic card strings
> of the form "the queen of hearts" so that at the very least the article
> can be given the correct gender. This leaves a string of the form:
> 
> "Move %s onto %s."

Ok. If you have the possibility, please add a comment above that line in
the code so that translators know what %s and %s get filled in with in
this case. Something like:

/* Translators: The first and second %s are card names like "queen of
hearts" */
g_printf (_"Move %s onto %s", card1, card2);

Such comments will show up next to the message in the po files and can
be very helpful when translating.


> If the arguments need to be reversed then it is possible to use
> "%1$s" or "%2$s" to specify which argument to use, but this requires
> the translator to have a detailed knowledge of printf's format
> specification.

Don't worry about that, the need for reversing arguments is quite a
common problem for some languages and I plan to write something about it
in the translator document. So just assume translators know about that.


> Does anyone have any ideas how to handle this nicely ? I would imagine
> that since the strings to be substituted are just describing different
> types of the same thing (playing cards) then it should be possible in
> most languages. Does someone have a counter-example ?

I also believe it should work, yes.


> There are also several strings of the form:
> 
> "Move the ~a off the board"
> 
> in principle it is possible to treat these individually, but it still
> represents at least another 162 strings.
> 
> In each case the ~a is the name of a card preceded by a definite article
> so I would imagine that for the single card case it should be possible
> to phrase things to allow the full string to be generated. Once again,
> examples of why this wouldn't work are welcome.

Please put the definite article together with the subject, so you would
have "Move ~a off the board" and "the queen of hearts".
The reason is that some languages don't have the equivalent of a
standalone definite article but rather use modifications of the actual
word, and so constructions where "the" is seperated from the actual word
are difficult to translate.

Again, comments are welcome if possible (don't know if it's possible to
have them in scheme files).


Christian





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]