From c6438992cb1fc7f106be6e9abfcf6a1ec1459412 Mon Sep 17 00:00:00 2001 From: Nodir Temirkhodjaev Date: Wed, 7 Mar 2018 15:14:22 +0500 Subject: [PATCH] UI: Rename "dummyBool" vars to appropriate names. --- src/ui/qml/controls/TextContextMenu.qml | 8 ++--- src/ui/qml/pages/AddressesPage.qml | 4 +-- src/ui/qml/pages/ApplicationsPage.qml | 10 +++--- src/ui/qml/pages/BlockedPage.qml | 16 ++++----- src/ui/qml/pages/MainPage.qml | 20 +++++------ src/ui/qml/pages/OptionsPage.qml | 26 +++++++------- src/ui/qml/pages/SchedulePage.qml | 10 +++--- src/ui/qml/pages/StatisticsPage.qml | 34 +++++++++---------- .../qml/pages/addresses/AddressGroupRow.qml | 8 ++--- src/ui/qml/pages/apps/AppsColumn.qml | 12 +++---- src/ui/qml/pages/apps/SpeedLimitButton.qml | 8 ++--- src/ui/qml/pages/log/IpListView.qml | 2 +- src/ui/qml/pages/log/TrafOptionsButton.qml | 20 +++++------ src/ui/qml/pages/log/TrafRow.qml | 8 ++--- src/ui/qml/pages/schedule/TaskRow.qml | 2 +- src/ui/translationmanager.cpp | 2 +- src/ui/translationmanager.h | 6 ++-- src/ui/util/net/hostinfocache.h | 4 +-- 18 files changed, 100 insertions(+), 100 deletions(-) diff --git a/src/ui/qml/controls/TextContextMenu.qml b/src/ui/qml/controls/TextContextMenu.qml index ccb1089b..8d2d21b5 100644 --- a/src/ui/qml/controls/TextContextMenu.qml +++ b/src/ui/qml/controls/TextContextMenu.qml @@ -27,21 +27,21 @@ Menu { MenuItem { icon.source: "qrc:/images/page_copy.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Copy") enabled: textField && textField.selectedText onTriggered: textField.copy() } MenuItem { icon.source: "qrc:/images/cut.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Cut") enabled: textField && textField.selectedText onTriggered: textField.cut() } MenuItem { icon.source: "qrc:/images/page_paste.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Paste") enabled: textField && textField.canPaste onTriggered: textField.paste() @@ -51,7 +51,7 @@ Menu { MenuItem { icon.source: "qrc:/images/textfield_rename.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Select All") enabled: textField && textField.text onTriggered: textField.selectAll() diff --git a/src/ui/qml/pages/AddressesPage.qml b/src/ui/qml/pages/AddressesPage.qml index 5990b249..ccf99d20 100644 --- a/src/ui/qml/pages/AddressesPage.qml +++ b/src/ui/qml/pages/AddressesPage.qml @@ -16,12 +16,12 @@ BasePage { TabButton { icon.source: "qrc:/images/world.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Internet Addresses") } TabButton { icon.source: "qrc:/images/world_link.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Allowed Internet Addresses") } } diff --git a/src/ui/qml/pages/ApplicationsPage.qml b/src/ui/qml/pages/ApplicationsPage.qml index 9c7d983d..ede70269 100644 --- a/src/ui/qml/pages/ApplicationsPage.qml +++ b/src/ui/qml/pages/ApplicationsPage.qml @@ -61,20 +61,20 @@ BasePage { TextFieldFrame { id: editGroupName enabled: appGroupsCount < 16 - placeholderText: translationManager.dummyBool + placeholderText: translationManager.trTrigger && qsTranslate("qml", "Group Name") } Button { enabled: editGroupName.text icon.source: "qrc:/images/application_add.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Add Group") onClicked: addAppGroup() } RoundButtonTip { enabled: editGroupName.text && appsColumn.enabled icon.source: "qrc:/images/application_edit.png" - tipText: translationManager.dummyBool + tipText: translationManager.trTrigger && qsTranslate("qml", "Rename Group") onClicked: renameAppGroup() } @@ -86,7 +86,7 @@ BasePage { CheckBox { id: cbBlockAll enabled: !cbAllowAll.checked || checked - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Block All") checked: firewallConf.appBlockAll onToggled: { @@ -98,7 +98,7 @@ BasePage { CheckBox { id: cbAllowAll enabled: !cbBlockAll.checked || checked - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Allow All") checked: firewallConf.appAllowAll onToggled: { diff --git a/src/ui/qml/pages/BlockedPage.qml b/src/ui/qml/pages/BlockedPage.qml index 83efd0c8..dc33c0da 100644 --- a/src/ui/qml/pages/BlockedPage.qml +++ b/src/ui/qml/pages/BlockedPage.qml @@ -28,18 +28,18 @@ BasePage { ButtonMenu { enabled: appListView.count icon.source: "qrc:/images/bin_empty.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Clear…") MenuItem { enabled: appListView.currentIndex >= 0 - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Remove Application") onTriggered: appBlockedModel.remove( appListView.currentIndex) } MenuItem { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Clear All") onTriggered: { appListView.currentIndex = -1; @@ -51,25 +51,25 @@ BasePage { ButtonMenu { enabled: appListView.count icon.source: "qrc:/images/page_copy.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Copy…") MenuItem { enabled: !!currentAppPath - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Application Path") onTriggered: guiUtil.setClipboardData(currentAppPath) } MenuItem { enabled: !!currentIpText - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "IP Address") onTriggered: guiUtil.setClipboardData(currentIpText) } } CheckBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Resolve Addresses") checked: firewallConf.resolveAddress onToggled: { @@ -90,7 +90,7 @@ BasePage { Switch { font.weight: Font.DemiBold - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Show Blocked Applications") checked: firewallConf.logBlocked onToggled: { diff --git a/src/ui/qml/pages/MainPage.qml b/src/ui/qml/pages/MainPage.qml index e99f2a2d..dad711c8 100644 --- a/src/ui/qml/pages/MainPage.qml +++ b/src/ui/qml/pages/MainPage.qml @@ -46,32 +46,32 @@ Page { TabButton { icon.source: "qrc:/images/cog.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Options") } TabButton { icon.source: "qrc:/images/link.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "IPv4 Addresses") } TabButton { icon.source: "qrc:/images/application_double.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Applications") } TabButton { icon.source: "qrc:/images/application_error.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Blocked") } TabButton { icon.source: "qrc:/images/chart_line.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Statistics") } TabButton { icon.source: "qrc:/images/clock.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Schedule") } } @@ -98,7 +98,7 @@ Page { Button { enabled: confFlagsEdited || confEdited || scheduleEdited icon.source: "qrc:/images/tick.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "OK") onClicked: { mainPage.aboutToSave(); @@ -115,7 +115,7 @@ Page { Button { enabled: confFlagsEdited || confEdited || scheduleEdited icon.source: "qrc:/images/accept.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Apply") onClicked: { mainPage.aboutToSave(); @@ -131,13 +131,13 @@ Page { } Button { icon.source: "qrc:/images/cancel.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Cancel") onClicked: closeWindow() } Button { icon.source: "qrc:/images/cross.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Quit") onClicked: fortManager.exit() } diff --git a/src/ui/qml/pages/OptionsPage.qml b/src/ui/qml/pages/OptionsPage.qml index fd822115..11f827c1 100644 --- a/src/ui/qml/pages/OptionsPage.qml +++ b/src/ui/qml/pages/OptionsPage.qml @@ -27,7 +27,7 @@ BasePage { CheckBox { id: cbStart - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Start with Windows") checked: fortSettings.startWithWindows onToggled: { @@ -36,7 +36,7 @@ BasePage { } CheckBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Block access to network when Fort Firewall is not running") checked: firewallConf.provBoot onToggled: { @@ -47,7 +47,7 @@ BasePage { } CheckBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Filter Enabled") checked: firewallConf.filterEnabled onToggled: { @@ -61,7 +61,7 @@ BasePage { spacing: 20 CheckBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Stop Traffic") checked: firewallConf.stopTraffic onToggled: { @@ -72,7 +72,7 @@ BasePage { } CheckBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Stop Internet Traffic") checked: firewallConf.stopInetTraffic onToggled: { @@ -85,7 +85,7 @@ BasePage { CheckBox { enabled: firewallConf.logStat - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Ignore TCP RST-packets") checked: firewallConf.ignoreTcpRst onToggled: { @@ -100,7 +100,7 @@ BasePage { CheckBox { id: cbPassword - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Password:") checked: firewallConf.hasPassword onToggled: { @@ -120,7 +120,7 @@ BasePage { echoMode: TextInput.Password passwordMaskDelay: 300 readOnly: firewallConf.hasPassword || !cbPassword.checked - placeholderText: translationManager.dummyBool + placeholderText: translationManager.trTrigger && (firewallConf.hasPassword ? qsTranslate("qml", "Installed") : qsTranslate("qml", "Not Installed")) @@ -132,7 +132,7 @@ BasePage { Label { anchors.verticalCenter: parent.verticalCenter - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Language:") } ComboBox { @@ -150,7 +150,7 @@ BasePage { RowLayout { LinkButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Logs") tipText: path onClicked: Qt.openUrlExternally("file:///" + path) @@ -160,7 +160,7 @@ BasePage { VSeparator {} LinkButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Profile") tipText: path onClicked: Qt.openUrlExternally("file:///" + path) @@ -170,7 +170,7 @@ BasePage { VSeparator {} LinkButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Statistics") tipText: path onClicked: Qt.openUrlExternally("file:///" + path) @@ -180,7 +180,7 @@ BasePage { VSeparator {} LinkButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Releases") tipText: link onClicked: Qt.openUrlExternally(link) diff --git a/src/ui/qml/pages/SchedulePage.qml b/src/ui/qml/pages/SchedulePage.qml index 289a2582..2b88bad4 100644 --- a/src/ui/qml/pages/SchedulePage.qml +++ b/src/ui/qml/pages/SchedulePage.qml @@ -26,7 +26,7 @@ BasePage { ] readonly property var taskIntervalNames: - translationManager.dummyBool + translationManager.trTrigger && [ qsTranslate("qml", "Custom"), qsTranslate("qml", "Hourly"), @@ -61,24 +61,24 @@ BasePage { } Label { width: taskCellWidths[1] - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Name") } Label { width: taskCellWidths[2] - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Interval, hours") } Label { width: taskCellWidths[3] horizontalAlignment: Text.AlignHCenter - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Last Run") } Label { width: taskCellWidths[4] horizontalAlignment: Text.AlignHCenter - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Last Success") } Item { diff --git a/src/ui/qml/pages/StatisticsPage.qml b/src/ui/qml/pages/StatisticsPage.qml index 351036e1..d261c977 100644 --- a/src/ui/qml/pages/StatisticsPage.qml +++ b/src/ui/qml/pages/StatisticsPage.qml @@ -25,7 +25,7 @@ BasePage { ] readonly property var trafUnitNames: - translationManager.dummyBool + translationManager.trTrigger && [ qsTranslate("qml", "Adaptive"), qsTranslate("qml", "Bytes"), @@ -43,7 +43,7 @@ BasePage { RoundButtonTip { enabled: appListView.count icon.source: "qrc:/images/arrow_refresh.png" - tipText: translationManager.dummyBool + tipText: translationManager.trTrigger && qsTranslate("qml", "Refresh") onClicked: trafListModel.refresh() } @@ -51,23 +51,23 @@ BasePage { ButtonMenu { enabled: appListView.count icon.source: "qrc:/images/bin_empty.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Clear…") MenuItem { enabled: appListView.currentIndex > 0 - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Remove Application") onTriggered: appStatModel.remove( appListView.currentIndex) } MenuItem { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Reset Total") onTriggered: trafListModel.resetAppTotals() } MenuItem { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Clear All") onTriggered: { appListView.currentIndex = 0; @@ -88,7 +88,7 @@ BasePage { Label { anchors.verticalCenter: parent.verticalCenter - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Units:") } @@ -118,7 +118,7 @@ BasePage { Switch { id: cbShowBlockedApps font.weight: Font.DemiBold - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Collect Traffic Statistics") checked: firewallConf.logStat onToggled: { @@ -149,7 +149,7 @@ BasePage { model: appStatModel - emptyText: translationManager.dummyBool + emptyText: translationManager.trTrigger && qsTranslate("qml", "All") emptyIcon: "qrc:/images/application_double.png" } @@ -166,19 +166,19 @@ BasePage { Layout.fillWidth: true TabButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Hourly", "Stat") } TabButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Daily", "Stat") } TabButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Monthly", "Stat") } TabButton { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Total", "Stat") } } @@ -189,22 +189,22 @@ BasePage { Label { width: trafCellWidths[0] - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Date") } Label { width: trafCellWidths[1] - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Download") } Label { width: trafCellWidths[2] - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Upload") } Label { width: trafCellWidths[3] - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Sum") } } diff --git a/src/ui/qml/pages/addresses/AddressGroupRow.qml b/src/ui/qml/pages/addresses/AddressGroupRow.qml index 3fba9391..3542b7c0 100644 --- a/src/ui/qml/pages/addresses/AddressGroupRow.qml +++ b/src/ui/qml/pages/addresses/AddressGroupRow.qml @@ -13,13 +13,13 @@ RowLayout { id: includeAddresses title { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Include") } checkBoxAll { enabled: !excludeAddresses.checkBoxAll.checked || checkBoxAll.checked - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Include All") } @@ -38,13 +38,13 @@ RowLayout { id: excludeAddresses title { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Exclude") } checkBoxAll { enabled: !includeAddresses.checkBoxAll.checked || checkBoxAll.checked - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Exclude All") } diff --git a/src/ui/qml/pages/apps/AppsColumn.qml b/src/ui/qml/pages/apps/AppsColumn.qml index 8c2487f8..9f708e27 100644 --- a/src/ui/qml/pages/apps/AppsColumn.qml +++ b/src/ui/qml/pages/apps/AppsColumn.qml @@ -12,19 +12,19 @@ ColumnLayout { RowLayout { RoundButtonTip { icon.source: "qrc:/images/application_delete.png" - tipText: translationManager.dummyBool + tipText: translationManager.trTrigger && qsTranslate("qml", "Remove Group") onClicked: removeAppGroup(index) } RoundButtonTip { icon.source: "qrc:/images/resultset_previous.png" - tipText: translationManager.dummyBool + tipText: translationManager.trTrigger && qsTranslate("qml", "Move left") onClicked: moveAppGroup(index, -1) } RoundButtonTip { icon.source: "qrc:/images/resultset_next.png" - tipText: translationManager.dummyBool + tipText: translationManager.trTrigger && qsTranslate("qml", "Move right") onClicked: moveAppGroup(index, 1) } @@ -42,7 +42,7 @@ ColumnLayout { } CheckBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Enabled") checked: appGroup.enabled onToggled: { @@ -60,7 +60,7 @@ ColumnLayout { AppsTextColumn { title { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Block") } @@ -80,7 +80,7 @@ ColumnLayout { AppsTextColumn { title { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Allow") } diff --git a/src/ui/qml/pages/apps/SpeedLimitButton.qml b/src/ui/qml/pages/apps/SpeedLimitButton.qml index 4a22570f..14320898 100644 --- a/src/ui/qml/pages/apps/SpeedLimitButton.qml +++ b/src/ui/qml/pages/apps/SpeedLimitButton.qml @@ -10,7 +10,7 @@ ButtonPopup { || (appGroup.limitOutEnabled && appGroup.speedLimitOut)) ? "qrc:/images/flag_green.png" : "qrc:/images/flag_yellow.png" - text: (translationManager.dummyBool + text: (translationManager.trTrigger && qsTranslate("qml", "Speed Limit: ")) + speedLimitsText @@ -21,7 +21,7 @@ ButtonPopup { ] readonly property var speedLimitNames: { - var list = translationManager.dummyBool + var list = translationManager.trTrigger && [qsTranslate("qml", "Custom"), qsTranslate("qml", "Disabled")]; @@ -64,7 +64,7 @@ ButtonPopup { names: speedLimitNames values: speedLimitValues checkBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Download speed limit, KiB/s:") checked: appGroup.limitInEnabled onCheckedChanged: { @@ -97,7 +97,7 @@ ButtonPopup { names: speedLimitNames values: speedLimitValues checkBox { - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Upload speed limit, KiB/s:") checked: appGroup.limitOutEnabled onCheckedChanged: { diff --git a/src/ui/qml/pages/log/IpListView.qml b/src/ui/qml/pages/log/IpListView.qml index d5f824a3..3936e35d 100644 --- a/src/ui/qml/pages/log/IpListView.qml +++ b/src/ui/qml/pages/log/IpListView.qml @@ -12,7 +12,7 @@ ListViewControl { width: ipListView.width elide: Text.ElideRight text: (firewallConf.resolveAddress - && hostInfoCache.dummyBool + && hostInfoCache.hostTrigger && hostInfoCache.hostName(displayText)) || displayText readonly property string displayText: display diff --git a/src/ui/qml/pages/log/TrafOptionsButton.qml b/src/ui/qml/pages/log/TrafOptionsButton.qml index ff8a58de..ce329700 100644 --- a/src/ui/qml/pages/log/TrafOptionsButton.qml +++ b/src/ui/qml/pages/log/TrafOptionsButton.qml @@ -7,7 +7,7 @@ import com.fortfirewall 1.0 ButtonPopup { icon.source: "qrc:/images/database_save.png" - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Options…") readonly property var trafKeepDayValues: [ @@ -15,7 +15,7 @@ ButtonPopup { ] readonly property var trafKeepDayNames: - translationManager.dummyBool + translationManager.trTrigger && [ qsTranslate("qml", "Custom"), qsTranslate("qml", "Forever"), @@ -30,7 +30,7 @@ ButtonPopup { ] readonly property var trafKeepMonthNames: - translationManager.dummyBool + translationManager.trTrigger && [ qsTranslate("qml", "Custom"), qsTranslate("qml", "Forever"), @@ -46,7 +46,7 @@ ButtonPopup { ] readonly property var quotaNames: { - var list = translationManager.dummyBool + var list = translationManager.trTrigger && [qsTranslate("qml", "Custom"), qsTranslate("qml", "Disabled")]; @@ -72,7 +72,7 @@ ButtonPopup { } checkBox { indicator: null - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Month starts on:") } field { @@ -98,7 +98,7 @@ ButtonPopup { values: trafKeepDayValues checkBox { indicator: null - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Keep days for 'Hourly':") } field { @@ -121,7 +121,7 @@ ButtonPopup { values: trafKeepDayValues checkBox { indicator: null - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Keep days for 'Daily':") } field { @@ -144,7 +144,7 @@ ButtonPopup { values: trafKeepMonthValues checkBox { indicator: null - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Keep months for 'Monthly':") } field { @@ -169,7 +169,7 @@ ButtonPopup { values: quotaValues checkBox { indicator: null - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Day's Quota:") } field { @@ -193,7 +193,7 @@ ButtonPopup { values: quotaValues checkBox { indicator: null - text: translationManager.dummyBool + text: translationManager.trTrigger && qsTranslate("qml", "Month's Quota:") } field { diff --git a/src/ui/qml/pages/log/TrafRow.qml b/src/ui/qml/pages/log/TrafRow.qml index 3a845c7d..e110911d 100644 --- a/src/ui/qml/pages/log/TrafRow.qml +++ b/src/ui/qml/pages/log/TrafRow.qml @@ -8,28 +8,28 @@ Row { Label { width: trafCellWidths[0] fontSizeMode: Text.Fit - text: translationManager.dummyBool + text: translationManager.trTrigger && dateTime } Label { width: trafCellWidths[1] fontSizeMode: Text.Fit - text: translationManager.dummyBool + text: translationManager.trTrigger && download } Label { width: trafCellWidths[3] fontSizeMode: Text.Fit - text: translationManager.dummyBool + text: translationManager.trTrigger && upload } Label { width: trafCellWidths[4] fontSizeMode: Text.Fit - text: translationManager.dummyBool + text: translationManager.trTrigger && sum } } diff --git a/src/ui/qml/pages/schedule/TaskRow.qml b/src/ui/qml/pages/schedule/TaskRow.qml index b58cbdcf..5b967d47 100644 --- a/src/ui/qml/pages/schedule/TaskRow.qml +++ b/src/ui/qml/pages/schedule/TaskRow.qml @@ -35,7 +35,7 @@ Row { verticalAlignment: Text.AlignVCenter wrapMode: Text.WordWrap fontSizeMode: Text.Fit - text: translationManager.dummyBool + text: translationManager.trTrigger && taskInfo.title } diff --git a/src/ui/translationmanager.cpp b/src/ui/translationmanager.cpp index 09e3e07e..7f53a057 100644 --- a/src/ui/translationmanager.cpp +++ b/src/ui/translationmanager.cpp @@ -144,7 +144,7 @@ QTranslator *TranslationManager::loadTranslator(int language, const QLocale &loc void TranslationManager::refreshTranslations() { - emit dummyBoolChanged(); + emit trTriggerChanged(); } QString TranslationManager::i18nDir() diff --git a/src/ui/translationmanager.h b/src/ui/translationmanager.h index ea14dad0..434fb902 100644 --- a/src/ui/translationmanager.h +++ b/src/ui/translationmanager.h @@ -11,7 +11,7 @@ QT_FORWARD_DECLARE_CLASS(QTranslator) class TranslationManager : public QObject { Q_OBJECT - Q_PROPERTY(bool dummyBool READ dummyBool NOTIFY dummyBoolChanged) + Q_PROPERTY(bool trTrigger READ trTrigger NOTIFY trTriggerChanged) Q_PROPERTY(int language READ language WRITE switchLanguage NOTIFY languageChanged) Q_PROPERTY(QStringList naturalLabels READ naturalLabels CONSTANT) @@ -22,7 +22,7 @@ protected: public: static TranslationManager *instance(); - bool dummyBool() const { return true; } + bool trTrigger() const { return true; } int language() const { return m_language; } QString localeName() const { return m_locale.name(); } @@ -32,7 +32,7 @@ public: int getLanguageByName(const QString &localeName) const; signals: - void dummyBoolChanged(); + void trTriggerChanged(); void languageChanged(int language); public slots: diff --git a/src/ui/util/net/hostinfocache.h b/src/ui/util/net/hostinfocache.h index 3d336f98..f2a1d0b7 100644 --- a/src/ui/util/net/hostinfocache.h +++ b/src/ui/util/net/hostinfocache.h @@ -9,12 +9,12 @@ QT_FORWARD_DECLARE_CLASS(HostInfo) class HostInfoCache : public QObject { Q_OBJECT - Q_PROPERTY(bool dummyBool READ dummyBool NOTIFY cacheChanged) + Q_PROPERTY(bool hostTrigger READ hostTrigger NOTIFY cacheChanged) public: explicit HostInfoCache(QObject *parent = nullptr); - bool dummyBool() const { return true; } + bool hostTrigger() const { return true; } signals: void cacheChanged();