mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
generic: adjust to time zone translation changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
aed504625e
commit
a0c85fc3ff
3 changed files with 4 additions and 17 deletions
|
@ -58,7 +58,6 @@
|
|||
Dtime::Dtime(QWidget * parent)
|
||||
: QWidget(parent)
|
||||
{
|
||||
KGlobal::locale()->insertCatalog( "timezones4" );
|
||||
setupUi(this);
|
||||
|
||||
connect(setDateTimeAuto, SIGNAL(toggled(bool)), this, SLOT(serverTimeCheck()));
|
||||
|
@ -132,7 +131,7 @@ void Dtime::currentZone()
|
|||
m_local->setText(
|
||||
i18nc(
|
||||
"%1 is name of time zone", "Current local time zone: %1",
|
||||
KTimeZoneWidget::displayName(localZone)
|
||||
KSystemTimeZones::zoneName(localZone.name())
|
||||
)
|
||||
);
|
||||
} else {
|
||||
|
@ -140,7 +139,7 @@ void Dtime::currentZone()
|
|||
i18nc(
|
||||
"%1 is name of time zone, %2 is its abbreviation",
|
||||
"Current local time zone: %1 (%2)",
|
||||
KTimeZoneWidget::displayName(localZone),
|
||||
KSystemTimeZones::zoneName(localZone.name()),
|
||||
QString::fromUtf8(localZone.abbreviations().first())
|
||||
)
|
||||
);
|
||||
|
|
|
@ -70,8 +70,6 @@ KclockModule::KclockModule(QWidget *parent, const QVariantList &)
|
|||
)
|
||||
);
|
||||
|
||||
KGlobal::locale()->insertCatalog("timezones4"); // For time zone translations
|
||||
|
||||
QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
layout->setMargin(0);
|
||||
layout->setSpacing(KDialog::spacingHint());
|
||||
|
|
|
@ -206,15 +206,6 @@ static QString kDisplayCondition(const QString &icon)
|
|||
return i18n("N/A");
|
||||
}
|
||||
|
||||
static QString kDisplayZoneName(const QString &ktimezonename)
|
||||
{
|
||||
const QByteArray ktimezonenamebytes = ktimezonename.toUtf8();
|
||||
QString result = i18n(ktimezonenamebytes.constData());
|
||||
// replace underscore with space like KTimeZoneWidget
|
||||
result = result.replace(QLatin1Char('_'), QLatin1Char(' '));
|
||||
return result;
|
||||
}
|
||||
|
||||
class KWeatherData
|
||||
{
|
||||
public:
|
||||
|
@ -759,7 +750,6 @@ WeatherApplet::WeatherApplet(QObject *parent, const QVariantList &args)
|
|||
m_spacer(nullptr)
|
||||
{
|
||||
KGlobal::locale()->insertCatalog("plasma_applet_weather");
|
||||
KGlobal::locale()->insertCatalog("timezones4");
|
||||
setAspectRatioMode(Plasma::AspectRatioMode::IgnoreAspectRatio);
|
||||
setHasConfigurationInterface(true);
|
||||
setPopupIcon(s_defaultweathericon);
|
||||
|
@ -781,7 +771,7 @@ void WeatherApplet::init()
|
|||
m_longitude = configgroup.readEntry("weatherLongitude", KTimeZone::UNKNOWN);
|
||||
QString source;
|
||||
if (!m_location.isEmpty()) {
|
||||
source = kDisplayZoneName(m_location);
|
||||
source = KSystemTimeZones::zoneName(m_location);
|
||||
} else if (m_latitude != KTimeZone::UNKNOWN && m_longitude != KTimeZone::UNKNOWN) {
|
||||
source = i18n("Custom");
|
||||
}
|
||||
|
@ -814,7 +804,7 @@ void WeatherApplet::createConfigurationInterface(KConfigDialog *parent)
|
|||
if (ktimezonename == QLatin1String("UTC")) {
|
||||
continue;
|
||||
}
|
||||
sortedzones.insert(kDisplayZoneName(ktimezonename), ktimezonename);
|
||||
sortedzones.insert(KSystemTimeZones::zoneName(ktimezonename), ktimezonename);
|
||||
}
|
||||
m_locationbox->addItem(i18n("Automatic"));
|
||||
m_locationbox->addItem(i18n("Custom"));
|
||||
|
|
Loading…
Add table
Reference in a new issue