Fix localization of the systemmonitor widget configuration window

Summary:
Currently, the common config window messages are neither extracted nor used in all 5 widgets. It is not possible to add several translation catalogs for a single QML widget thus the messages are extracted into all 5 widget catalogs.

Idea of the fix by Victor Ryzhykh.

Test Plan: Extraction tested to work as expected, translation should work too.

Reviewers: #localization, #plasma, davidedmundson, ngraham

Reviewed By: #plasma, davidedmundson, ngraham

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26192
wilder-5.18
Yuri Chornoivan 6 years ago
parent 9683865f1b
commit 9f5ed252ba
  1. 2
      applets/systemmonitor/common/contents/ui/ConfigGeneral.qml
  2. 2
      applets/systemmonitor/cpu/Messages.sh
  3. 2
      applets/systemmonitor/diskactivity/Messages.sh
  4. 2
      applets/systemmonitor/diskusage/Messages.sh
  5. 2
      applets/systemmonitor/memory/Messages.sh
  6. 2
      applets/systemmonitor/net/Messages.sh

@ -131,7 +131,7 @@ Item {
}
textFromValue: function(value) {
var seconds = value / 1000
return i18nc("SpinBox text", "%1 seconds", seconds.toFixed(1))
return i18ncp("SpinBox text", "%1 second", "%1 seconds", seconds.toFixed(1))
}
valueFromText: function(text) {
return parseFloat(text) * 1000

@ -1,2 +1,2 @@
#! /usr/bin/env bash
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.cpu.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` `find ../common -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.cpu.pot

@ -1,2 +1,2 @@
#! /usr/bin/env bash
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.diskactivity.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` `find ../common -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.diskactivity.pot

@ -1,2 +1,2 @@
#! /usr/bin/env bash
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.diskusage.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` `find ../common -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.diskusage.pot

@ -1,2 +1,2 @@
#! /usr/bin/env bash
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.memory.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` `find ../common -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.memory.pot

@ -1,2 +1,2 @@
#! /usr/bin/env bash
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.net.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` `find ../common -name \*.qml` -o $podir/plasma_applet_org.kde.plasma.systemmonitor.net.pot

Loading…
Cancel
Save