Review Request 112401: Let ki18n report the list of available translations of the application
Chusslove Illich
caslav.ilic at gmx.net
Mon Sep 2 08:49:08 UTC 2013
> On Sept. 1, 2013, 10:25 p.m., Albert Astals Cid wrote:
> > staging/ki18n/src/klocalizedstring.cpp, line 1293
> > <http://git.reviewboard.kde.org/r/112401/diff/2/?file=186081#file186081line1293>
> >
> > Should this insert be outside the if block?
>
> Chusslove Illich wrote:
> I chose on impulse to have it not ignore the anomalous case where
> KLocalizedString::setApplicationDomain was not called at some point earlier.
> I.e. if "there is no application" then there are also no available
> translations. But I don't have in mind any concrete advantage or
> disadvantage of either solution.
>
>
> Albert Astals Cid wrote:
> I don't care either, it's just that the docu says
>
> "If the application domain was set, the language set will always contain at least the source code language (<tt>en_US</tt>)."
>
> Which is not really true if you read the code ;-)
But I wrote that code exactly with the docstring in mind. As in
!s->applicationDomain.isEmpty() being true if setApplicationDomain was
called.
Well, setApplicationDomain could also have been called with an empty string,
but in general I don't ascribe strong semantics to empty domain names,
leaving it at "undefined behavior".
- Chusslove
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112401/#review39106
-----------------------------------------------------------
On Sept. 1, 2013, 12:22 p.m., Chusslove Illich wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/112401/
> -----------------------------------------------------------
>
> (Updated Sept. 1, 2013, 12:22 p.m.)
>
>
> Review request for KDE Frameworks, Albert Astals Cid and Aleix Pol Gonzalez.
>
>
> Description
> -------
>
> Add the static method KLocalizedString::availableApplicationTranslations
> that reports the list of language codes for which there exists the
> translation catalog for application's domain (as set by
> KLocalizedString::setApplicationDomain). This allows client code e.g. to
> offer a language switching feature in an application.
>
>
> Diffs
> -----
>
> staging/ki18n/autotests/klocalizedstringtest.cpp ec3966f
> staging/ki18n/src/kcatalog.cpp 183bea5
> staging/ki18n/src/kcatalog_p.h 6feb09c
> staging/ki18n/src/klocalizedstring.h eb44075
> staging/ki18n/src/klocalizedstring.cpp eab9216
>
> Diff: http://git.reviewboard.kde.org/r/112401/diff/
>
>
> Testing
> -------
>
> Unit test supplied.
>
>
> Thanks,
>
> Chusslove Illich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20130902/1c1aa97d/attachment.html>
More information about the Kde-frameworks-devel
mailing list