Review Request 118690: Introduce a KLocalizedTranslator
Aleix Pol Gonzalez
aleixpol at kde.org
Tue Jun 17 16:39:44 UTC 2014
> On June 12, 2014, 11:06 p.m., Albert Astals Cid wrote:
> > What's the use case? Didn't we have a different way for translating ui files?
>
> Martin Gräßlin wrote:
> > What's the use case?
>
> well as explained in the comment for translating dynamically loaded UI files. Where is that used? In KWin for the configuration of scripts and scripted effects (example: translucency effect).
>
> > Didn't we have a different way for translating ui files?
>
> I'm not aware of one and AFAIU ki18n it would need to have compiled sources which is not possible with the given use case.
>
> Chusslove Illich wrote:
> (From private exchange with Martin.) In fact this situation is comparable with KXMLGui files, since they too are dynamically loaded. There the .rc file itself states the domain name (attribute to top tag) and KXMLGui library links to Ki18n and places the appropriate translation call. Since this does not make sense for Qt dynamically loaded UI files, I don't see conceptually a better solution. At most Qt could provide something to reduce the boilerplate elements (addContextToMonitor and language change events).
>
> Albert Astals Cid wrote:
> I can understand the use case for dynamically loaded .ui files.
>
> For static ones I thought we were using "uic -tr i18n", but are we? I can't find where we do it.
>
> Aleix Pol Gonzalez wrote:
> IIRC we were waiting for 5.3 to be released to add that change, it would be a good moment to do so now.
FWIW, at the moment we're using ki18n_wrap_ui that already does the -tr i18n. It's qt5_wrap_ui that might need to be adapted in that direction.
- Aleix
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118690/#review59925
-----------------------------------------------------------
On June 12, 2014, 8:55 a.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118690/
> -----------------------------------------------------------
>
> (Updated June 12, 2014, 8:55 a.m.)
>
>
> Review request for KDE Frameworks, Aurélien Gâteau and Chusslove Illich.
>
>
> Repository: ki18n
>
>
> Description
> -------
>
> Introduce a KLocalizedTranslator
>
> The KLocalizedTranslator is a QTranslator subclass which can delegate
> to ki18n for translations. This class allows to translate text which
> can only use Qt's translation system with ki18n.
>
>
> Diffs
> -----
>
> autotests/klocalizedstringtest.h 52b6248270e7d117855cb96c5d3d8582d89a99b0
> autotests/klocalizedstringtest.cpp e4e97ce92224f8886705c39091a5f07ea3a209d1
> src/CMakeLists.txt 09490e54ecd2126873482b187b17642c57ca7d28
> src/klocalizedtranslator.h PRE-CREATION
> src/klocalizedtranslator.cpp PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/118690/diff/
>
>
> Testing
> -------
>
> see added unit test and class already used in (and implemented for) KWin.
>
>
> Thanks,
>
> Martin Gräßlin
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140617/2c759a1a/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list