Commit 857eff12 authored by Arjen Hiemstra's avatar Arjen Hiemstra

Add context to translated strings and clarify some strings

Summary:
Many of the shorter strings are not really informative, so add context
so translators can figure out what they mean. Some of the strings were
also wrong, those have been corrected as well.

Test Plan: Still compiles.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D29721
parent dbb0b515
This diff is collapsed.
...@@ -55,45 +55,55 @@ private: ...@@ -55,45 +55,55 @@ private:
}; };
GPU::GPU(int index, SensorContainer *parent) GPU::GPU(int index, SensorContainer *parent)
: SensorObject(QStringLiteral("gpu%1").arg(index), i18n("GPU %1", index), parent) : SensorObject(QStringLiteral("gpu%1").arg(index), i18nc("@title", "GPU %1", index + 1), parent)
{ {
auto displayIndex = index + 1;
m_pwr = new SensorProperty(QStringLiteral("power"), this); m_pwr = new SensorProperty(QStringLiteral("power"), this);
m_pwr->setName(i18n("Power")); m_pwr->setName(i18nc("@title", "GPU %1 Power Usage", displayIndex));
m_pwr->setShortName(i18nc("@title GPU Power Usage", "Power"));
m_pwr->setUnit(KSysGuard::utils::UnitWatt); m_pwr->setUnit(KSysGuard::utils::UnitWatt);
m_pwr->setVariantType(QVariant::UInt); m_pwr->setVariantType(QVariant::UInt);
m_temp = new SensorProperty(QStringLiteral("temperature"), this); m_temp = new SensorProperty(QStringLiteral("temperature"), this);
m_temp->setName(i18n("Temperature")); m_temp->setName(i18nc("@title", "GPU %1 Temperature", displayIndex));
m_temp->setShortName(i18nc("@title GPU Temperature", "Temperature"));
m_temp->setUnit(KSysGuard::utils::UnitCelsius); m_temp->setUnit(KSysGuard::utils::UnitCelsius);
m_temp->setVariantType(QVariant::Double); m_temp->setVariantType(QVariant::Double);
m_sm = new SensorProperty(QStringLiteral("sharedMemory"), this); m_sm = new SensorProperty(QStringLiteral("sharedMemory"), this);
m_sm->setName(i18n("Shared memory")); m_sm->setName(i18nc("@title", "GPU %1 Shared Memory Usage", displayIndex));
m_sm->setShortName(i18nc("@title GPU Shared Memory Usage", "Shared Memory"));
m_sm->setUnit(KSysGuard::utils::UnitPercent); m_sm->setUnit(KSysGuard::utils::UnitPercent);
m_sm->setVariantType(QVariant::UInt); m_sm->setVariantType(QVariant::UInt);
m_mem = new SensorProperty(QStringLiteral("memory"), this); m_mem = new SensorProperty(QStringLiteral("memory"), this);
m_mem->setName(i18n("Memory")); m_mem->setName(i18nc("@title", "GPU %1 Memory Usage", displayIndex));
m_mem->setShortName(i18nc("@title GPU Memory Usage", "Memory"));
m_mem->setUnit(KSysGuard::utils::UnitPercent); m_mem->setUnit(KSysGuard::utils::UnitPercent);
m_mem->setVariantType(QVariant::UInt); m_mem->setVariantType(QVariant::UInt);
m_enc = new SensorProperty(QStringLiteral("encoderUsage"), this); m_enc = new SensorProperty(QStringLiteral("encoderUsage"), this);
m_enc->setName(i18n("Encoder")); m_enc->setName(i18nc("@title", "GPU %1 Encoder Usage", displayIndex));
m_enc->setShortName(i18nc("@title GPU Encoder Usage", "Encoder"));
m_enc->setUnit(KSysGuard::utils::UnitPercent); m_enc->setUnit(KSysGuard::utils::UnitPercent);
m_enc->setVariantType(QVariant::UInt); m_enc->setVariantType(QVariant::UInt);
m_dec = new SensorProperty(QStringLiteral("decoderUsage"), this); m_dec = new SensorProperty(QStringLiteral("decoderUsage"), this);
m_dec->setName(i18n("Decoder")); m_dec->setName(i18nc("@title", "GPU %1 Decoder Usage", displayIndex));
m_dec->setShortName(i18nc("@title GPU Decoder Usage", "Decoder"));
m_dec->setUnit(KSysGuard::utils::UnitPercent); m_dec->setUnit(KSysGuard::utils::UnitPercent);
m_dec->setVariantType(QVariant::UInt); m_dec->setVariantType(QVariant::UInt);
m_memClock = new SensorProperty(QStringLiteral("memoryClock"), this); m_memClock = new SensorProperty(QStringLiteral("memoryClock"), this);
m_memClock->setName(i18n("Memory clock")); m_memClock->setName(i18nc("@title", "GPU %1 Memory Clock", displayIndex));
m_memClock->setName(i18nc("@title GPU Memory Clock", "Memory Clock"));
m_memClock->setUnit(KSysGuard::utils::UnitMegaHertz); m_memClock->setUnit(KSysGuard::utils::UnitMegaHertz);
m_memClock->setVariantType(QVariant::UInt); m_memClock->setVariantType(QVariant::UInt);
m_processorClock = new SensorProperty(QStringLiteral("processorClock"), this); m_processorClock = new SensorProperty(QStringLiteral("processorClock"), this);
m_processorClock->setName(i18n("Processor clock")); m_processorClock->setName(i18nc("@title", "GPU %1 Processor Clock", displayIndex));
m_processorClock->setName(i18nc("@title GPU Processor Clock", "Processor Clock"));
m_processorClock->setUnit(KSysGuard::utils::UnitMegaHertz); m_processorClock->setUnit(KSysGuard::utils::UnitMegaHertz);
m_processorClock->setVariantType(QVariant::UInt); m_processorClock->setVariantType(QVariant::UInt);
} }
...@@ -106,7 +116,7 @@ NvidiaPlugin::NvidiaPlugin(QObject *parent, const QVariantList &args) ...@@ -106,7 +116,7 @@ NvidiaPlugin::NvidiaPlugin(QObject *parent, const QVariantList &args)
return; return;
} }
auto gpuSystem = new SensorContainer("nvidia", "Nvidia", this); auto gpuSystem = new SensorContainer("nvidia", i18nc("@title NVidia GPU information", "NVidia"), this);
//assuming just one GPU for now //assuming just one GPU for now
auto gpu0 = new GPU(0, gpuSystem); auto gpu0 = new GPU(0, gpuSystem);
......
...@@ -48,12 +48,12 @@ NetworkPlugin::NetworkPlugin(QObject *parent, const QVariantList &args) ...@@ -48,12 +48,12 @@ NetworkPlugin::NetworkPlugin(QObject *parent, const QVariantList &args)
qCDebug(KSYSGUARD_PLUGIN_NETWORK) << "Network plugin loading"; qCDebug(KSYSGUARD_PLUGIN_NETWORK) << "Network plugin loading";
qCDebug(KSYSGUARD_PLUGIN_NETWORK) << "Found helper at" << qPrintable(executable); qCDebug(KSYSGUARD_PLUGIN_NETWORK) << "Found helper at" << qPrintable(executable);
m_inboundSensor = new ProcessAttribute(QStringLiteral("netInbound"), i18n("Download Speed"), this); m_inboundSensor = new ProcessAttribute(QStringLiteral("netInbound"), i18nc("@title", "Download Speed"), this);
m_inboundSensor->setShortName(i18n("Download")); m_inboundSensor->setShortName(i18nc("@title", "Download"));
m_inboundSensor->setUnit(KSysGuard::UnitByteRate); m_inboundSensor->setUnit(KSysGuard::UnitByteRate);
m_inboundSensor->setVisibleByDefault(true); m_inboundSensor->setVisibleByDefault(true);
m_outboundSensor = new ProcessAttribute(QStringLiteral("netOutbound"), i18n("Upload Speed"), this); m_outboundSensor = new ProcessAttribute(QStringLiteral("netOutbound"), i18nc("@title", "Upload Speed"), this);
m_outboundSensor->setShortName(i18n("Upload")); m_outboundSensor->setShortName(i18nc("@title", "Upload"));
m_outboundSensor->setUnit(KSysGuard::UnitByteRate); m_outboundSensor->setUnit(KSysGuard::UnitByteRate);
m_outboundSensor->setVisibleByDefault(true); m_outboundSensor->setVisibleByDefault(true);
......
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