After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 50676 - Translation of aisleriot doesn't work properly
Translation of aisleriot doesn't work properly
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: general
2.3.x
Other Linux
: Normal normal
: ---
Assigned To: Rosanna Yuen
Gregory Leblanc
: 2422 50677 113366 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-02-08 14:52 UTC by Martin Norbäck
Modified: 2012-01-31 23:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Martin Norbäck 2001-02-08 14:52:50 UTC
The translation of aisleriot doesn't work properly.
SCHEME_GAMES.h contains N_() of all terms used in the scheme games (or
could at least potentially do so), but the strings are concatenated by the
game before getting passed to _() by dialog.c

This occurs when asking for a hint, possibly on more places.

The solution to this is either to have a more general hint description
mechanism, or to somehow call gettext from the .scm file before
concatenating the strings.

Another thing is that the wording may well be reversed when translating
For instance "Queen of Hearts" is translated to "hjärter dam", where
hjärter is Hearts and dam is Queen.

Only by using some sort of printf which can accept positional %s this can
be solved. Simple concatenation won't do.
Comment 1 Martin Norbäck 2001-02-08 14:54:49 UTC
*** Bug 50677 has been marked as a duplicate of this bug. ***
Comment 2 Juan Pablo Mendoza 2001-06-09 06:01:11 UTC
*** Bug 2422 has been marked as a duplicate of this bug. ***
Comment 3 Juan Pablo Mendoza 2001-06-24 23:51:45 UTC
Ariel was looking at a guile gettext biding to solve this.
Comment 4 Kjartan Maraas 2002-05-01 10:32:32 UTC
I think gettext has support for this now, I could be mistaken though.
Comment 5 Bastien Nocera 2002-05-10 00:00:09 UTC
Could any i18n guru look at the current status, and mail me what to do ?
Comment 6 Callum McKenzie 2003-05-17 02:57:55 UTC
A status report on this hideously old bug: I've written a scheme
wrapper for gettext and as a result have shuffled the point where
gettext is called down to the scheme level. This doesn't yet solve any
of the problems (in the short term it potentially makes it worse), but
it provides a framework that allows them to be fixed. Once it's got to
the C level its too late. This will all appear in 2.3.2.

Unfortunately the scheme code does everything the i18n people tell you
not to do.
Comment 7 Callum McKenzie 2003-05-21 06:44:09 UTC
*** Bug 113366 has been marked as a duplicate of this bug. ***
Comment 8 Callum McKenzie 2003-05-21 23:32:13 UTC
*** Bug 106697 has been marked as a duplicate of this bug. ***
Comment 9 Callum McKenzie 2003-05-22 07:37:20 UTC
*** Bug 106697 has been marked as a duplicate of this bug. ***
Comment 10 Callum McKenzie 2003-05-22 10:03:30 UTC
Finally this is fixed. Aisleriot now uses gettext properly and there
are hopefully no more nasty concatenated strings.
Comment 11 Christian Rose 2003-05-22 10:33:55 UTC
#: aisleriot/eagle_wing.scm.h:7
msgid "Move the ~a to an empty foundation"

#: aisleriot/fortunes.scm.h:3
msgid "Move the ~a off the board"

#: aisleriot/plait.scm.h:2
msgid "Move the ~a to an empty field"

#: aisleriot/sol.scm.h:23
msgid "~a of ~a"

These ones seems weird. What's with the ~a? Is it some variable? Would
it be possible to somehow use regular C printf-style syntax instead?


#: aisleriot/first_law.scm.h:2
msgid "Remove the "

This one still seems to be concatenated.
Comment 12 Callum McKenzie 2003-05-22 12:01:20 UTC
In answer to the ~a question, I've already posted an answer to the
gnome-i18 list (as you have noticed). The reason for ~a rather than %s
is that that is what the standard guile (and common lisp) format
module uses. In principle I could copy the module into aisleriot and
mutilate it to change the format character, but I'd prefer not to do
anything so ugly unless translators get seriously confused.

I missed that first law string, thanks. Given that I fixed the code
immediately below that one this is brown paper bag territory.

Marking as fixed again, feel free to reopen if new issues crop up.
Comment 13 Martin Norbäck 2003-05-22 12:12:38 UTC
The "~a of ~a" string in sol.scm still has the issue I mentioned in my
original comment:

"Queen of Hearts" is translated (into Swedish) to "hjärter dam", where
hjärter is Hearts and dam is Queen.

This is exactly the case here. Is there any support for reordering
arguments to guile's "format"? If there is, can this be put in a
comment that will appear in the po file?
Comment 14 Callum McKenzie 2003-05-22 12:27:42 UTC
Martin, I explained how to get around the reordering in a message to
gnome-18n. In short if you want to reorder the string, use something
like "~1*~a of ~@*~a~1*". This is documented in the source, I'm not
sure how to get it into the po file. 

Hopefully it will be irrelevant since there are other problems that
have cropped up and I'm just going to put all 54 combinations of card
and suit into separate strings for translation (not tonight though).

In short, aisleriot is a mess with respect to i18n. Keep yelling at me
until I get it right.
Comment 15 Robert Ancell 2012-01-31 23:17:24 UTC
This bug is being reassigned to the "general" component so we can close the aisleriot bugzilla component.  Apologies for the mass email!