Re: ngettext revisited
- From: Christian Rose <menthos gnome org>
- To: Danilo Segan <danilo gnome org>
- Cc: GNOME Desktop Development List <desktop-devel-list gnome org>,GNOME I18N List <gnome-i18n gnome org>
- Subject: Re: ngettext revisited
- Date: 30 Sep 2003 23:41:09 +0200
tis 2003-09-30 klockan 18.31 skrev Danilo Segan:
> > gdm http://bugzilla.gnome.org/show_bug.cgi?id=106696
>
> This seems to be troublesome because there are strings in XML files
> using "%d".
>
> AFAICS, intltool doesn't yet support plural forms with XML files.
> Actually, this doesn't seem easily solveable at all, because there are
> some strings which are loaded from XML files, and since they store the
> messages at runtime (PO files are just used for initial editting, and
> the strings from there are put into XML files at compile time), there's
> no way to get the correct strings in running programs.
>
> I don't know much about XML localization issues (yes, I've noticed that
> some kind of 'xml:lang' attribute is used for translations, but this is
> not enough for plural forms), so any hint would be helpful.
>
> Btw, this could probably be solved more easily if GDM would actually
> pass these strings to (n)gettext (depending on whether %d is used).
> Still, there would need to be some more custom markup for .xml.in (like
> <N_and then the tag name>singular english form<n_>plural english form</
> N_closing tag>
>
> But this would still bring in many complications.
There seems to be only a few (two) strings in gdm theme xml files that
require ngettext. Perhaps they could be moved from the theme files to
some place else. In any case that should be discussed in the specific
bug report.
> > nautilus http://bugzilla.gnome.org/show_bug.cgi?id=106702
>
> This one will has one tricky for fixing, like where there are several
> "%d"'s in one string.
>
> It would be nice to get some input from other translation teams if it's
> ok to use concatenation, i.e. can they translate correctly the string:
>
> msgid "Uptime is %d days, %d hours, %d minutes"
>
> if it's split into:
>
> msgid "Uptime is %d days"
> msgid "%d hours"
> msgid "%d minutes"
>
> and later concatenated into
> "%s, %s, %s"
> ?
Such things are already used in some modules when absolutely necessary.
I would use a slight modification though:
msgid "Uptime is %d days, %s, %s"
msgid "%d hours"
msgid "%d minutes"
Naturally, providing a comment(*) to translators explaining how such
messages are put together is absolutely essential.
This should be possible to translate correctly, albeit with a greater
danger of accidental mistranslation, even with a comment.
So *please* refrain from doing such concatenations unless absolutely
necessary.
Christian
(*)
http://developer.gnome.org/doc/tutorials/gnome-i18n/developer.html#use-comments
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]