New i18n interface for KDE 4, second try
nicolasg at snafu.de
Mon Oct 31 22:12:49 GMT 2005
On Monday 31 October 2005 22:36, Chusslove Illich wrote:
> > I meant that if QString::number does the job, we do not need a wrapper
> > around it. (What the proposed qarg are, even if the shown code used an
> > indirect way, instead of calling QString::number directly.)
> QString::number() has only one extra argument for the base, whereas arg()
> methods have also "field width" argument, which might be important in
> formatted output.
Ah, yes, I keep forgetting it and I am always disappointed when I want to use
it. (Perhaps I should really file a bug at qt-bugs for this.)
> But again, they are not important at all and were just a
> side remark.
> One more substantial thingy occurred to me as well. In Qt4, there is an
> option to use proper localized number formats, by "%Lxx" placeholder
> notation. This however would require programmer/translator to always use
> it for number arguments in their strings, which is, well... :) On the
> other hand, presence of standalone argf functions (which would also be
> used in i18n templates), would allow to automatically force "%Lxx" only
> for numerical arguments.
Does Gettext knows how to handle %L in its Qt mode?
If Gettext does, it would at least avoid that the translators forget the L.
But, anyway, on the developer side, it can indeed be forgotten.
> > On the other side, I am just remembering that one of the original
> > arguments for translation scriptings were phrases with multiple
> > plurals, so that is perhaps a problem indeed, as the multiple counts
> > must be given.
> Not only that, there is one much more frequent case. Where programmer would
> use eg. "Do you want to delete this file?" and "Do you want to delete
> these %n files?", in my language I'd have to use singular with %n, because
> some numbers other than 1 need same form. So for 1 I'd get "Do you want to
> delete this 1 file?", which is in my language as awkward as in English.
Yes, sure but from the interface point of view an integer remains an integer,
even if it is 1. On the output side, indeed, there is a difference.
(Perhaps it is a wish for Gettext too, to have a msgstrzero and msgstrone .)
Have a nice day!
More information about the kde-core-devel