From 8f2c2712a375f7a8713cfc999f003e7a7464db6e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Tue, 25 Aug 2020 18:30:57 +0900 Subject: [PATCH] Added translation capabilities for display profile. This resolves issue #167. Signed-off-by: Michele Calgaro --- kcontrol/displayconfig/displayconfig.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kcontrol/displayconfig/displayconfig.cpp b/kcontrol/displayconfig/displayconfig.cpp index ca8b867ac..8311b428e 100644 --- a/kcontrol/displayconfig/displayconfig.cpp +++ b/kcontrol/displayconfig/displayconfig.cpp @@ -986,7 +986,7 @@ void KDisplayConfig::loadProfileFromDiskHelper(bool forceReload) { void KDisplayConfig::selectProfile (int slotNumber) { TQString selectedProfile = base->displayProfileList->currentText(); - if (selectedProfile == "") { + if (selectedProfile == i18n("")) { selectedProfile = ""; } activeProfileName = selectedProfile; @@ -1141,7 +1141,7 @@ void KDisplayConfig::updateStartupProfileLabel() { TQString friendlyName = startupProfileName; if (friendlyName == "") { - friendlyName = ""; + friendlyName = i18n(""); } base->startupDisplayProfileList->setCurrentItem(friendlyName, false); @@ -1150,7 +1150,7 @@ void KDisplayConfig::updateStartupProfileLabel() void KDisplayConfig::selectDefaultProfile(int slotNumber) { TQString selectedProfile = base->startupDisplayProfileList->currentText(); - if (selectedProfile == "") { + if (selectedProfile == i18n("")) { selectedProfile = ""; } @@ -1695,7 +1695,7 @@ void KDisplayConfig::createHotplugRulesGrid() { } KComboBox* combo = new KComboBox(base->profileRulesGridWidget, (TQString("%1").arg(i)).ascii()); connect(combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed())); - combo->insertItem(""); + combo->insertItem(i18n("")); for (TQStringList::Iterator it3 = availableProfileNames.begin(); it3 != availableProfileNames.end(); ++it3) { combo->insertItem(*it3); } @@ -1800,8 +1800,8 @@ void KDisplayConfig::profileListChanged() { // Clear and reload the combo boxes base->displayProfileList->clear(); base->startupDisplayProfileList->clear(); - base->displayProfileList->insertItem(""); - base->startupDisplayProfileList->insertItem(""); + base->displayProfileList->insertItem(i18n("")); + base->startupDisplayProfileList->insertItem(i18n("")); for (TQStringList::Iterator it = availableProfileNames.begin(); it != availableProfileNames.end(); ++it) { base->displayProfileList->insertItem(*it); base->startupDisplayProfileList->insertItem(*it);