add missing strings to translations

This commit is contained in:
Jussi Kuokkanen 2023-10-11 14:19:28 +03:00
parent 4969bec762
commit 0489b37aa1
7 changed files with 70 additions and 10 deletions

View File

@ -1,5 +1,8 @@
src/plugins/CPU.cpp src/plugins/CPU.cpp
src/plugins/Nvidia.cpp src/plugins/Nvidia.cpp
src/tuxclocker-qt/data/AssignableItem.cpp
src/tuxclocker-qt/data/DeviceModel.cpp
src/tuxclocker-qt/data/DeviceModelDelegate.cpp
src/tuxclocker-qt/widgets/DeviceBrowser.cpp src/tuxclocker-qt/widgets/DeviceBrowser.cpp
src/tuxclocker-qt/widgets/FunctionEditor.hpp src/tuxclocker-qt/widgets/FunctionEditor.hpp
src/tuxclocker-qt/widgets/Settings.cpp src/tuxclocker-qt/widgets/Settings.cpp

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tuxclocker\n" "Project-Id-Version: tuxclocker\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-09 15:16+0300\n" "POT-Creation-Date: 2023-10-11 14:16+0300\n"
"PO-Revision-Date: 2023-10-09 13:11+0000\n" "PO-Revision-Date: 2023-10-09 13:11+0000\n"
"Last-Translator: Jussi Kuokkanen <jussi.kuokkanen@protonmail.com>\n" "Last-Translator: Jussi Kuokkanen <jussi.kuokkanen@protonmail.com>\n"
"Language-Team: Finnish <https://hosted.weblate.org/projects/tuxclocker/" "Language-Team: Finnish <https://hosted.weblate.org/projects/tuxclocker/"
@ -148,6 +148,22 @@ msgstr "Tuulettimet"
msgid "Utilizations" msgid "Utilizations"
msgstr "Käyttöasteet" msgstr "Käyttöasteet"
#: src/tuxclocker-qt/data/AssignableItem.cpp:75
msgid "(Parametrized)"
msgstr ""
#: src/tuxclocker-qt/data/DeviceModel.cpp:243
msgid "No value set"
msgstr ""
#: src/tuxclocker-qt/data/DeviceModelDelegate.cpp:28
msgid "Parametrize..."
msgstr ""
#: src/tuxclocker-qt/data/DeviceModelDelegate.cpp:29
msgid "Reset to default"
msgstr ""
#: src/tuxclocker-qt/widgets/DeviceBrowser.cpp:34 #: src/tuxclocker-qt/widgets/DeviceBrowser.cpp:34
msgid "Showing:" msgid "Showing:"
msgstr "Näytetään:" msgstr "Näytetään:"
@ -173,7 +189,7 @@ msgid "Apply"
msgstr "Tallenna" msgstr "Tallenna"
#: src/tuxclocker-qt/widgets/FunctionEditor.hpp:72 #: src/tuxclocker-qt/widgets/FunctionEditor.hpp:72
#: src/tuxclocker-qt/widgets/Settings.cpp:69 #: src/tuxclocker-qt/widgets/Settings.cpp:70
msgid "Cancel" msgid "Cancel"
msgstr "Peru" msgstr "Peru"
@ -217,7 +233,7 @@ msgstr "Nimetön"
msgid "Use tray icon" msgid "Use tray icon"
msgstr "Käytä ikonia tehtäväpalkissa" msgstr "Käytä ikonia tehtäväpalkissa"
#: src/tuxclocker-qt/widgets/Settings.cpp:66 #: src/tuxclocker-qt/widgets/Settings.cpp:67
msgid "" msgid ""
"Enabling this hides TuxClocker into the tray instead of exiting when closing " "Enabling this hides TuxClocker into the tray instead of exiting when closing "
"the window." "the window."
@ -225,7 +241,7 @@ msgstr ""
"Tämän ottaminen käyttöön piilottaa TuxClockerin tehtäväpalkkiin sulkemisen " "Tämän ottaminen käyttöön piilottaa TuxClockerin tehtäväpalkkiin sulkemisen "
"sijaan ikkunan suljettaessa." "sijaan ikkunan suljettaessa."
#: src/tuxclocker-qt/widgets/Settings.cpp:73 #: src/tuxclocker-qt/widgets/Settings.cpp:74
msgid "Save" msgid "Save"
msgstr "Tallenna" msgstr "Tallenna"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tuxclocker\n" "Project-Id-Version: tuxclocker\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-09 15:20+0300\n" "POT-Creation-Date: 2023-10-11 14:16+0300\n"
"PO-Revision-Date: 2023-10-08 19:24+0000\n" "PO-Revision-Date: 2023-10-08 19:24+0000\n"
"Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n" "Last-Translator: Allan Nordhøy <epost@anotheragency.no>\n"
"Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/" "Language-Team: Norwegian Bokmål <https://hosted.weblate.org/projects/"
@ -149,6 +149,22 @@ msgstr "Vifter"
msgid "Utilizations" msgid "Utilizations"
msgstr "Bruk" msgstr "Bruk"
#: src/tuxclocker-qt/data/AssignableItem.cpp:75
msgid "(Parametrized)"
msgstr ""
#: src/tuxclocker-qt/data/DeviceModel.cpp:243
msgid "No value set"
msgstr ""
#: src/tuxclocker-qt/data/DeviceModelDelegate.cpp:28
msgid "Parametrize..."
msgstr ""
#: src/tuxclocker-qt/data/DeviceModelDelegate.cpp:29
msgid "Reset to default"
msgstr ""
#: src/tuxclocker-qt/widgets/DeviceBrowser.cpp:34 #: src/tuxclocker-qt/widgets/DeviceBrowser.cpp:34
msgid "Showing:" msgid "Showing:"
msgstr "" msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: tuxclocker\n" "Project-Id-Version: tuxclocker\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-10-09 15:20+0300\n" "POT-Creation-Date: 2023-10-11 14:16+0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -146,6 +146,22 @@ msgstr ""
msgid "Utilizations" msgid "Utilizations"
msgstr "" msgstr ""
#: src/tuxclocker-qt/data/AssignableItem.cpp:75
msgid "(Parametrized)"
msgstr ""
#: src/tuxclocker-qt/data/DeviceModel.cpp:243
msgid "No value set"
msgstr ""
#: src/tuxclocker-qt/data/DeviceModelDelegate.cpp:28
msgid "Parametrize..."
msgstr ""
#: src/tuxclocker-qt/data/DeviceModelDelegate.cpp:29
msgid "Reset to default"
msgstr ""
#: src/tuxclocker-qt/widgets/DeviceBrowser.cpp:34 #: src/tuxclocker-qt/widgets/DeviceBrowser.cpp:34
msgid "Showing:" msgid "Showing:"
msgstr "" msgstr ""

View File

@ -1,6 +1,9 @@
#include "AssignableItem.hpp" #include "AssignableItem.hpp"
#include <DynamicReadableConnection.hpp> #include <DynamicReadableConnection.hpp>
#include <libintl.h>
#define _(String) gettext(String)
Q_DECLARE_METATYPE(AssignableItemData) Q_DECLARE_METATYPE(AssignableItemData)
@ -69,7 +72,7 @@ void AssignableItem::updateText(AssignableItemData data) {
QString targetText; QString targetText;
if (data.value().canConvert<DynamicReadableConnectionData>()) { if (data.value().canConvert<DynamicReadableConnectionData>()) {
// Include possible unit // Include possible unit
auto target = "(Parametrized)"; auto target = _("(Parametrized)");
m_currentTargetData.parametrizationText = target; m_currentTargetData.parametrizationText = target;
targetText = target; targetText = target;
goto ret; goto ret;

View File

@ -4,6 +4,7 @@
#include "DynamicReadableProxy.hpp" #include "DynamicReadableProxy.hpp"
#include <fplus/fplus.hpp> #include <fplus/fplus.hpp>
#include <Globals.hpp> #include <Globals.hpp>
#include <libintl.h>
#include <Utils.hpp> #include <Utils.hpp>
#include <QApplication> #include <QApplication>
#include <QDBusReply> #include <QDBusReply>
@ -12,6 +13,8 @@
#include <QStyle> #include <QStyle>
#include <QVariantAnimation> #include <QVariantAnimation>
#define _(String) gettext(String)
// 'match' is a method in QAbstractItemModel :( // 'match' is a method in QAbstractItemModel :(
namespace p = mpark::patterns; namespace p = mpark::patterns;
using namespace fplus; using namespace fplus;
@ -237,7 +240,7 @@ QStandardItem *DeviceModel::createAssignable(
QString DeviceModel::displayText(AssignableProxy *proxy, AssignableItemData data) { QString DeviceModel::displayText(AssignableProxy *proxy, AssignableItemData data) {
auto currentValue = proxy->currentValue(); auto currentValue = proxy->currentValue();
auto defVal = "No value set"; auto defVal = _("No value set");
if (!currentValue.has_value()) if (!currentValue.has_value())
return defVal; return defVal;

View File

@ -6,6 +6,7 @@
#include <FunctionEditor.hpp> #include <FunctionEditor.hpp>
#include <Globals.hpp> #include <Globals.hpp>
#include <IntRangeEditor.hpp> #include <IntRangeEditor.hpp>
#include <libintl.h>
#include <patterns.hpp> #include <patterns.hpp>
#include <QDebug> #include <QDebug>
#include <QEvent> #include <QEvent>
@ -16,14 +17,16 @@
#include <QSettings> #include <QSettings>
#include <Utils.hpp> #include <Utils.hpp>
#define _(String) gettext(String)
using namespace TuxClocker::Device; using namespace TuxClocker::Device;
using namespace mpark::patterns; using namespace mpark::patterns;
Q_DECLARE_METATYPE(AssignableItemData) Q_DECLARE_METATYPE(AssignableItemData)
DeviceModelDelegate::DeviceModelDelegate(QObject *parent) : QStyledItemDelegate(parent) { DeviceModelDelegate::DeviceModelDelegate(QObject *parent) : QStyledItemDelegate(parent) {
m_parametrize = new QAction{"Parametrize...", this}; m_parametrize = new QAction{_("Parametrize..."), this};
m_resetAssignable = new QAction{"Reset to default", this}; m_resetAssignable = new QAction{_("Reset to default"), this};
m_functionEditor = nullptr; m_functionEditor = nullptr;
} }