GNOME Bugzilla – Bug 115193
gnome-version.xml is not translated
Last modified: 2004-12-22 21:47:04 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).
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>
*** Bug 118124 has been marked as a duplicate of this bug. ***
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".
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 :-)
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.
Thanks for doing that Malcolm