forked from Shinonome/dots-hyprland
mfking chore: add qsTr() to strings for translations
This commit is contained in:
@@ -2,6 +2,7 @@ import "root:/"
|
||||
import "root:/services"
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import "./quickToggles/"
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
@@ -102,7 +103,7 @@ Scope {
|
||||
StyledText {
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.colors.colOnLayer0
|
||||
text: `Uptime: ${DateTime.uptime}`
|
||||
text: StringUtils.format(qsTr("Uptime: {0}"), DateTime.uptime)
|
||||
textFormat: Text.MarkdownText
|
||||
}
|
||||
|
||||
@@ -197,7 +198,7 @@ Scope {
|
||||
|
||||
GlobalShortcut {
|
||||
name: "sidebarRightToggle"
|
||||
description: "Toggles right sidebar on press"
|
||||
description: qsTr("Toggles right sidebar on press")
|
||||
|
||||
onPressed: {
|
||||
sidebarLoader.active = !sidebarLoader.active;
|
||||
@@ -206,7 +207,7 @@ Scope {
|
||||
}
|
||||
GlobalShortcut {
|
||||
name: "sidebarRightOpen"
|
||||
description: "Opens right sidebar on press"
|
||||
description: qsTr("Opens right sidebar on press")
|
||||
|
||||
onPressed: {
|
||||
sidebarLoader.active = true;
|
||||
@@ -215,7 +216,7 @@ Scope {
|
||||
}
|
||||
GlobalShortcut {
|
||||
name: "sidebarRightClose"
|
||||
description: "Closes right sidebar on press"
|
||||
description: qsTr("Closes right sidebar on press")
|
||||
|
||||
onPressed: {
|
||||
sidebarLoader.active = false;
|
||||
|
||||
@@ -2,6 +2,7 @@ import "../"
|
||||
import "root:/services"
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
@@ -37,8 +38,9 @@ QuickToggleButton {
|
||||
}
|
||||
}
|
||||
StyledToolTip {
|
||||
content: `${(Bluetooth.bluetoothEnabled && Bluetooth.bluetoothDeviceName.length > 0) ?
|
||||
Bluetooth.bluetoothDeviceName : "Bluetooth"} | ${qsTr("Right-click to configure")}`
|
||||
content: StringUtils.format(qsTr("{0} | Right-click to configure"),
|
||||
(Bluetooth.bluetoothEnabled && Bluetooth.bluetoothDeviceName.length > 0) ?
|
||||
Bluetooth.bluetoothDeviceName : qsTr("Bluetooth"))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import "root:/services"
|
||||
import "root:/modules/common"
|
||||
import "root:/modules/common/widgets"
|
||||
import "root:/services"
|
||||
import "root:/modules/common/functions/string_utils.js" as StringUtils
|
||||
import "../"
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
@@ -42,6 +43,6 @@ QuickToggleButton {
|
||||
}
|
||||
}
|
||||
StyledToolTip {
|
||||
content: `${Network.networkName} | Right-click to configure`
|
||||
content: StringUtils.format(qsTr("{0} | Right-click to configure"), Network.networkName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user