D5208: Allow loading i18n catalogs from arbitrary locations

David Edmundson noreply at phabricator.kde.org
Tue Mar 28 03:23:49 UTC 2017


davidedmundson created this revision.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  In KDE4, Plasma used to be able to load bundled translations with any
  plasmoid downloaded from kde-look.
  
  It used added a KGlobal::dirs()->addResourceDir("locale") at runtime
  when we load a plasmoid.
  
  Rather than just constantly expanding the list of locale search paths,
  this patch allows for adding a custom path for a specific translation
  domain which should be a lot faster and also prevent any collisions.
  
  A static method is added to KCatalog, then proxied via KLocalizedString
  as that header is exported.

TEST PLAN
  Added unit test
  Also patched plasma-framework and debug showed it loaded .po files 
  from the correct directory

REPOSITORY
  R249 KI18n

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D5208

AFFECTED FILES
  autotests/klocalizedstringtest.cpp
  autotests/klocalizedstringtest.h
  src/kcatalog.cpp
  src/kcatalog_p.h
  src/klocalizedstring.cpp
  src/klocalizedstring.h

To: davidedmundson, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170328/5d4c6dcf/attachment.html>


More information about the Kde-frameworks-devel mailing list