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 115193 - gnome-version.xml is not translated
gnome-version.xml is not translated
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: gnome-about
2.3.x
Other Linux
: Urgent major
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
AES[BADBUG]
: 118124 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-06-14 19:30 UTC by Andrew Sobala
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.3/2.4



Description Andrew Sobala 2003-06-14 19:30:50 UTC
The description of GNOME in gnome-version.xml is not translated. Since this
now appears in the gnome-about dialog box, it should be (it's user visible).
Comment 1 Mark McLoughlin 2003-07-21 12:21:41 UTC
Removing the easy-fix keyword and upping the priority.

There are two problems here

1) The <description> contents aren't translated
2) The build date in <date> isn't translated

At a glance here's what needs to be done for (1)

* The XML support in intltool-extract/update needs to be hacked to
support the translation of nodes - i.e. <_foo>$blah</_foo> to <foo
xml:lang="ru">$blah_in_russion</foo>. Strangely, intltool-merge
already has code to do this, but the extraction code doesn't exist.

* Move gnome-version.xml.in to gnome-version.xml.in.in, update the
AC_OUTPUT in configure.in, add 

-versiondir=$(datadir)/gnome-about
-version_DATA=gnome-version.xml
+versiondir       = $(datadir)/gnome-about
+version_in_files = gnome-version.xml.in
+version_DATA     = $(version_in_files:.version.in=.version)
+
+@INTLTOOL_XML_RULE@

  to Makefile.am, add gnome-verion.xml.in.in to po/POTFILES.in.

* Write code in gnome-about to select the correct node based on the
locale, see bonobo_server_info_lookup_prop for an example of doing this.



Fixing (2) seems a little bit harder.

* The date is generated at make dist time. Well, "generated" is a bit
of an exageration - I write it by hand. But it probably should be
generated.

* This means that translators can't be expected to translate the date.
I'm thinking something like:

for lang in $ALL_LINGUAS; do
  GNOME_DATE="$GNOME_DATE <date xml:lang=\"$lang\">$(LC_ALL=$lang
date)</date>"
done

might work. Not tested, though.

* Again, you need to write the code in gnome-about to select the right
<date>
Comment 2 Mark McLoughlin 2003-07-23 15:32:49 UTC
*** Bug 118124 has been marked as a duplicate of this bug. ***
Comment 3 Malcolm Tredinnick 2003-07-23 17:55:13 UTC
The patch in bug #118124 fixes the first stuff that Mark talks about
(Mark, you get the translation stuff being presented in the about box
"for free" once we have the intltool stuff set up). I have tested that
patch (including making some silly translations of the paragraphs to
check that they display).

Part (2) is trickier. I also have an almost working patch for that
(was going to submit it later). The problem is relatively simple
(small code change in gnome-about.c) *if* we say the date in
gnome-version.xml must be in ISO format (YYYY-MM-DD). The problem here
is that for some reason, it is now permissible to specify this date on
the command line and we have to decide whether to verify this string
or not. Verifying the date format using the infinitely portable shell
required for configure.in tests is going to be painful -- I haven't
quite worked it out yet. If we say that people entering the date as a
parameter are just required not to screw it up, things are easier. 

Mark: can you make an executive decision about this one? (Hint: if you
 make me do the verification stuff I am crossing you off my Christmas
card list! :-) )

Finally, there is one last trap for young players here: the
@PLATFORM@.@MAJOR@ stuff in the paragraphs section of the current
gnome-version.xml.in file has to go. The problem is that this is
substituted by configure, which is *before* intltool gets its grubby
hands on it to extract the string. So the translators see (currently)
the "2.3" string already substituted. Need I point out that it will
look silly when all the non-C locales have the wrong version number in
2.4 (their translations will not be automatically updated). I believe
the immediate solution to this is that Louis' rewrite of those
paragraphs does not include the version number. If we really want to
permit substitutions, then we have to come up with a new scheme
(probably placing an XML element where the version number should go
and substitute it at run-time). For now, I suggest we just go with the
"don't include the version number solution".
Comment 4 Mark McLoughlin 2003-07-24 10:39:07 UTC
Malcolm: for the date I'd say its best to just remove the option and
generate the dat using date(1).


For the rest of, its obvious you've looked into it closely. I just had
a different impression of intltool's support for this - probably just
read it wrong.

Proceed at will - I trust ya :-)
Comment 5 Malcolm Tredinnick 2003-07-29 03:35:08 UTC
All the changes for this bug have now been landed in CVS (including
some new paragraph text from Luis). I am not astoundingly proud of the
code to do the locale-specific presentation, but it works and can be
cleaned up later (btw, Mark: you were right, I was wrong... it was
very fiddly. My earlier test was bogus).

What is there now should be sufficient to localise the about box
without requiring more string changes.
Comment 6 Mark McLoughlin 2003-07-29 11:25:36 UTC
Thanks for doing that Malcolm