Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a0ef3397 authored by Sebastian Kügler's avatar Sebastian Kügler

Do not mess with KLS::setApplicationDomain

This is a no-no in library code (which plugins are), as it may break
applications' translations that load this plugin / library.

Use new API KLocalizedString::availableDomainTranslations instead.
parent 8b9275b9
......@@ -51,9 +51,6 @@ KCMTranslations::KCMTranslations(QWidget *parent, const QVariantList &args)
m_ui->setupUi(this);
// Set the translation domain
KLocalizedString::setApplicationDomain("kcmtranslations");
// Get the current config
m_config = KConfigGroup(KSharedConfig::openConfig(configFile), "Translations");
......@@ -89,11 +86,7 @@ void KCMTranslations::load()
// TODO May want to later add all installed .po files on system?
m_installedTranslations.clear();
// We reset the application domain temporarily, so available translations for
// "systemsettings" are searched, not this KCM.
KLocalizedString::setApplicationDomain("systemsettings");
m_installedTranslations = KLocalizedString::availableApplicationTranslations().toList();
KLocalizedString::setApplicationDomain("kcmtranslations");
m_installedTranslations = KLocalizedString::availableDomainTranslations("systemsettings").toList();
if (!m_installedTranslations.contains("en_US")) {
m_installedTranslations.append("en_US");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment