Review Request 118678: [ki18n] Allow querying for translations of a specific domain

Sebastian Kügler sebas at kde.org
Wed Jun 11 23:24:19 UTC 2014



> On June 11, 2014, 11:09 p.m., David Edmundson wrote:
> > Can I check I'm understanding the objective. 
> > 
> > For the language KCM we want to list all possible languages. Potentially systemsettings isn't translated so won't be listed. In order to get round this we need to pick a random other component that we can assume is translated in order to list all possible languages?
> > 
> > If so we could just do:
> >     QStringList localeDirPaths = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation,
> >                                  QString::fromLatin1("locale"),
> >                                  QStandardPaths::LocateDirectory);
> >     foreach (const QString &localDirPath, localeDirPaths) {
> >         languages  << localeDir.entryList(QDir::AllDirs);
> >     }
> > 
> > which is what kcatalog is doing internally and will list everything.
> >

Actually, after looking a bit further: I don't think we really need this. For systemsettings, it makes sense to check whether systemsettings is translated, which is a good indicator for an available translation of the workspace. That makes the use-case for this patch academic, but not needed, so I'll simply drop this RR.

Thanks for the review, though!


- Sebastian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118678/#review59840
-----------------------------------------------------------


On June 11, 2014, 10:09 p.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/118678/
> -----------------------------------------------------------
> 
> (Updated June 11, 2014, 10:09 p.m.)
> 
> 
> Review request for Plasma, Chusslove Illich and John Layt.
> 
> 
> Repository: ki18n
> 
> 
> Description
> -------
> 
> Allow querying for translations of a specific domain
> 
> In the new translations KCM, we want to list available languages for the
> workspace. This might, or might not be the same application domain as
> the one set (current translation is different from installed
> translations). In order to list the installed translations, we need to
> specify that domain, independently from the one set in
> KLocalizedString's global static.
> 
> With this patch, I can successfully list installed languages in the new KCM.
> 
> 
> I'm not super-familiar with how this stuff works, there might be a better way, 
> in which case I'm sure you guys will enlighten me. :)
> 
> 
> Diffs
> -----
> 
>   src/kcatalog.cpp 7711e9b261fc30d8faa355af9014d320275463a5 
>   src/klocalizedstring.h 1a9fce8abcafcc8be0a2601c9062c33509dd403e 
>   src/klocalizedstring.cpp e12d6dfa9c147ffb127f462dc5db236be0d2ff75 
> 
> Diff: https://git.reviewboard.kde.org/r/118678/diff/
> 
> 
> Testing
> -------
> 
> Tested new translations KCM, languages show up.
> 
> 
> Thanks,
> 
> Sebastian Kügler
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140611/89105502/attachment-0001.html>


More information about the Plasma-devel mailing list