mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
use qsTr (for translations later)
This commit is contained in:
parent
84f031573e
commit
8dd82baf26
19 changed files with 41 additions and 41 deletions
|
|
@ -27,7 +27,7 @@ Item {
|
|||
color: Appearance.colors.colSubtext
|
||||
Layout.preferredWidth: preferredWidth
|
||||
elide: Text.ElideRight
|
||||
text: activeWindow?.activated ? activeWindow?.appId : "Desktop"
|
||||
text: activeWindow?.activated ? activeWindow?.appId : qsTr("Desktop")
|
||||
}
|
||||
|
||||
StyledText {
|
||||
|
|
@ -35,7 +35,7 @@ Item {
|
|||
color: Appearance.colors.colOnLayer0
|
||||
Layout.preferredWidth: preferredWidth
|
||||
elide: Text.ElideRight
|
||||
text: activeWindow?.activated ? activeWindow?.title : `Workspace ${monitor.activeWorkspace?.id}`
|
||||
text: activeWindow?.activated ? activeWindow?.title : `${qsTr("Workspace")} ${monitor.activeWorkspace?.id}`
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Quickshell.Services.Mpris
|
|||
|
||||
Item {
|
||||
readonly property MprisPlayer activePlayer: MprisController.activePlayer
|
||||
readonly property string cleanedTitle: activePlayer?.trackTitle.replace(/【[^】]*】/, "") || "No media"
|
||||
readonly property string cleanedTitle: activePlayer?.trackTitle.replace(/【[^】]*】/, "") || qsTr("No media")
|
||||
|
||||
Layout.fillHeight: true
|
||||
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
|
||||
|
|
|
|||
|
|
@ -562,7 +562,7 @@ Item {
|
|||
|
||||
NotificationActionButton {
|
||||
Layout.fillWidth: true
|
||||
buttonText: "Close"
|
||||
buttonText: qsTr("Close")
|
||||
urgency: notificationObject.urgency
|
||||
implicitWidth: (notificationObject.actions.length == 0) ? (actionsFlickable.width / 2) :
|
||||
(contentItem.implicitWidth + leftPadding + rightPadding)
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ Scope {
|
|||
anchors.centerIn: parent
|
||||
value: Brightness.value
|
||||
icon: "light_mode"
|
||||
name: "Brightness"
|
||||
name: qsTr("Brightness")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ Scope {
|
|||
anchors.centerIn: parent
|
||||
value: Audio.sink?.audio.volume
|
||||
icon: "volume_up"
|
||||
name: "Volume"
|
||||
name: qsTr("Volume")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ Scope {
|
|||
padding: 15
|
||||
color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant
|
||||
selectedTextColor: Appearance.m3colors.m3onSurface
|
||||
placeholderText: "Search, calculate or run"
|
||||
placeholderText: qsTr("Search")
|
||||
placeholderTextColor: Appearance.m3colors.m3outline
|
||||
focus: root.visible
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ Scope {
|
|||
font.family: Appearance.font.family.title
|
||||
font.pixelSize: Appearance.font.pixelSize.title
|
||||
font.weight: Font.DemiBold
|
||||
text: "Session"
|
||||
text: qsTr("Session")
|
||||
}
|
||||
|
||||
StyledText { // Small instruction
|
||||
|
|
@ -100,7 +100,7 @@ Scope {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: Appearance.font.family.title
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
text: "Arrow keys to navigate, Enter to select\nEsc or click anywhere to cancel"
|
||||
text: qsTr("Arrow keys to navigate, Enter to select\nEsc or click anywhere to cancel")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -110,7 +110,7 @@ Scope {
|
|||
id: sessionLock
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "lock"
|
||||
buttonText: "Lock"
|
||||
buttonText: qsTr("Lock")
|
||||
onClicked: { lock.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.right: sessionSleep
|
||||
|
|
@ -120,7 +120,7 @@ Scope {
|
|||
id: sessionSleep
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "dark_mode"
|
||||
buttonText: "Sleep"
|
||||
buttonText: qsTr("Sleep")
|
||||
onClicked: { sleep.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.left: sessionLock
|
||||
|
|
@ -131,7 +131,7 @@ Scope {
|
|||
id: sessionLogout
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "logout"
|
||||
buttonText: "Logout"
|
||||
buttonText: qsTr("Logout")
|
||||
onClicked: { logout.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.left: sessionSleep
|
||||
|
|
@ -142,7 +142,7 @@ Scope {
|
|||
id: sessionTaskManager
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "browse_activity"
|
||||
buttonText: "Task Manager"
|
||||
buttonText: qsTr("Task Manager")
|
||||
onClicked: { taskManager.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.left: sessionLogout
|
||||
|
|
@ -156,7 +156,7 @@ Scope {
|
|||
id: sessionHibernate
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "downloading"
|
||||
buttonText: "Hibernate"
|
||||
buttonText: qsTr("Hibernate")
|
||||
onClicked: { hibernate.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.up: sessionLock
|
||||
|
|
@ -166,7 +166,7 @@ Scope {
|
|||
id: sessionShutdown
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "power_settings_new"
|
||||
buttonText: "Shutdown"
|
||||
buttonText: qsTr("Shutdown")
|
||||
onClicked: { shutdown.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.left: sessionHibernate
|
||||
|
|
@ -177,7 +177,7 @@ Scope {
|
|||
id: sessionReboot
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "restart_alt"
|
||||
buttonText: "Reboot"
|
||||
buttonText: qsTr("Reboot")
|
||||
onClicked: { reboot.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.left: sessionShutdown
|
||||
|
|
@ -188,7 +188,7 @@ Scope {
|
|||
id: sessionFirmwareReboot
|
||||
focus: sessionRoot.visible
|
||||
buttonIcon: "settings_applications"
|
||||
buttonText: "Reboot to firmware settings"
|
||||
buttonText: qsTr("Reboot to firmware settings")
|
||||
onClicked: { firmwareReboot.running = true; sessionRoot.visible = false }
|
||||
onFocusChanged: { if (focus) sessionRoot.subtitle = buttonText }
|
||||
KeyNavigation.up: sessionTaskManager
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Rectangle {
|
|||
color: Appearance.colors.colLayer1
|
||||
|
||||
property int currentTab: 0
|
||||
property var tabButtonList: [{"icon": "notifications", "name": "Notifications"}, {"icon": "volume_up", "name": "Volume mixer"}]
|
||||
property var tabButtonList: [{"icon": "notifications", "name": qsTr("Notifications")}, {"icon": "volume_up", "name": qsTr("Volume mixer")}]
|
||||
|
||||
Keys.onPressed: (event) => {
|
||||
if (event.key === Qt.Key_PageDown || event.key === Qt.Key_PageUp) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ Scope {
|
|||
command: ["qs", "ipc", "call", "session", "open"]
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Session"
|
||||
content: qsTr("Session")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Item {
|
|||
CalendarHeaderButton {
|
||||
clip: true
|
||||
buttonText: `${monthShift != 0 ? "• " : ""}${viewingDate.toLocaleDateString(Qt.locale(), "MMMM yyyy")}`
|
||||
tooltipText: (monthShift === 0) ? "" : "Jump to current month"
|
||||
tooltipText: (monthShift === 0) ? "" : qsTr("Jump to current month")
|
||||
onClicked: {
|
||||
monthShift = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ Item {
|
|||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.m3colors.m3outline
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: "No notifications"
|
||||
text: qsTr("No notifications")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -155,7 +155,7 @@ Item {
|
|||
Layout.margins: 5
|
||||
Layout.topMargin: 10
|
||||
buttonIcon: "clear_all"
|
||||
buttonText: "Clear"
|
||||
buttonText: qsTr("Clear")
|
||||
onClicked: () => {
|
||||
Notifications.discardAllNotifications()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ QuickToggleButton {
|
|||
}
|
||||
StyledToolTip {
|
||||
content: `${(Bluetooth.bluetoothEnabled && Bluetooth.bluetoothDeviceName.length > 0) ?
|
||||
Bluetooth.bluetoothDeviceName : "Bluetooth"} | Right-click to configure`
|
||||
Bluetooth.bluetoothDeviceName : "Bluetooth"} | ${qsTr("Right-click to configure")}`
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,6 @@ QuickToggleButton {
|
|||
command: ['bash', '-c', `hyprctl reload`]
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Game mode"
|
||||
content: qsTr("Game mode")
|
||||
}
|
||||
}
|
||||
|
|
@ -15,6 +15,6 @@ QuickToggleButton {
|
|||
command: ["bash", "-c", "${XDG_CONFIG_HOME:-$HOME/.config}/quickshell/scripts/wayland-idle-inhibitor.py"]
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Keep system awake"
|
||||
content: qsTr("Keep system awake")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ QuickToggleButton {
|
|||
}
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Night Light"
|
||||
content: qsTr("Night Light")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import Qt5Compat.GraphicalEffects
|
|||
Item {
|
||||
id: root
|
||||
property int currentTab: 0
|
||||
property var tabButtonList: [{"icon": "checklist", "name": "Unfinished"}, {"name": "Done", "icon": "check_circle"}]
|
||||
property var tabButtonList: [{"icon": "checklist", "name": qsTr("Unfinished")}, {"name": qsTr("Done"), "icon": "check_circle"}]
|
||||
property bool showAddDialog: false
|
||||
property int dialogMargins: 20
|
||||
property int fabSize: 48
|
||||
|
|
@ -126,7 +126,7 @@ Item {
|
|||
TaskList {
|
||||
listBottomPadding: root.fabSize + root.fabMargins * 2
|
||||
emptyPlaceholderIcon: "check_circle"
|
||||
emptyPlaceholderText: "Nothing here!"
|
||||
emptyPlaceholderText: qsTr("Nothing here!")
|
||||
taskList: Todo.list
|
||||
.map(function(item, i) { return Object.assign({}, item, {originalIndex: i}); })
|
||||
.filter(function(item) { return !item.done; })
|
||||
|
|
@ -134,7 +134,7 @@ Item {
|
|||
TaskList {
|
||||
listBottomPadding: root.fabSize + root.fabMargins * 2
|
||||
emptyPlaceholderIcon: "checklist"
|
||||
emptyPlaceholderText: "Finished tasks will go here"
|
||||
emptyPlaceholderText: qsTr("Finished tasks will go here")
|
||||
taskList: Todo.list
|
||||
.map(function(item, i) { return Object.assign({}, item, {originalIndex: i}); })
|
||||
.filter(function(item) { return item.done; })
|
||||
|
|
@ -263,7 +263,7 @@ Item {
|
|||
Layout.alignment: Qt.AlignLeft
|
||||
color: Appearance.m3colors.m3onSurface
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
text: "Add task"
|
||||
text: qsTr("Add task")
|
||||
}
|
||||
|
||||
TextField {
|
||||
|
|
@ -274,7 +274,7 @@ Item {
|
|||
padding: 10
|
||||
color: activeFocus ? Appearance.m3colors.m3onSurface : Appearance.m3colors.m3onSurfaceVariant
|
||||
selectedTextColor: Appearance.m3colors.m3onSurface
|
||||
placeholderText: "Task description"
|
||||
placeholderText: qsTr("Task description")
|
||||
placeholderTextColor: Appearance.m3colors.m3outline
|
||||
focus: root.showAddDialog
|
||||
onAccepted: dialog.addTask()
|
||||
|
|
@ -302,11 +302,11 @@ Item {
|
|||
spacing: 5
|
||||
|
||||
DialogButton {
|
||||
buttonText: "Cancel"
|
||||
buttonText: qsTr("Cancel")
|
||||
onClicked: root.showAddDialog = false
|
||||
}
|
||||
DialogButton {
|
||||
buttonText: "Add"
|
||||
buttonText: qsTr("Add")
|
||||
enabled: todoInput.text.length > 0
|
||||
onClicked: dialog.addTask()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,14 +50,14 @@ Button {
|
|||
Layout.fillWidth: true
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
text: input ? "Input" : "Output"
|
||||
text: input ? qsTr("Input") : qsTr("Output")
|
||||
color: Appearance.colors.colOnLayer2
|
||||
}
|
||||
StyledText {
|
||||
Layout.fillWidth: true
|
||||
elide: Text.ElideRight
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
text: (input ? Pipewire.defaultAudioSource?.description : Pipewire.defaultAudioSink?.description) ?? "Unknown"
|
||||
text: (input ? Pipewire.defaultAudioSource?.description : Pipewire.defaultAudioSink?.description) ?? qsTr("Unknown")
|
||||
color: Appearance.m3colors.m3outline
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ Item {
|
|||
font.pixelSize: Appearance.font.pixelSize.normal
|
||||
color: Appearance.m3colors.m3outline
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
text: "No audio source"
|
||||
text: qsTr("No audio source")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -341,13 +341,13 @@ Item {
|
|||
Layout.alignment: Qt.AlignRight
|
||||
|
||||
DialogButton {
|
||||
buttonText: "Cancel"
|
||||
buttonText: qsTr("Cancel")
|
||||
onClicked: {
|
||||
root.showDeviceSelector = false
|
||||
}
|
||||
}
|
||||
DialogButton {
|
||||
buttonText: "OK"
|
||||
buttonText: qsTr("OK")
|
||||
onClicked: {
|
||||
root.showDeviceSelector = false
|
||||
if (root.selectedDevice) {
|
||||
|
|
|
|||
|
|
@ -79,9 +79,9 @@ Singleton {
|
|||
this.activeTrack = {
|
||||
uniqueId: this.activePlayer?.uniqueId ?? 0,
|
||||
artUrl: this.activePlayer?.trackArtUrl ?? "",
|
||||
title: this.activePlayer?.trackTitle || "Unknown Title",
|
||||
artist: this.activePlayer?.trackArtist || "Unknown Artist",
|
||||
album: this.activePlayer?.trackAlbum || "Unknown Album",
|
||||
title: this.activePlayer?.trackTitle || qsTr("Unknown Title"),
|
||||
artist: this.activePlayer?.trackArtist || qsTr("Unknown Artist"),
|
||||
album: this.activePlayer?.trackAlbum || qsTr("Unknown Album"),
|
||||
};
|
||||
|
||||
this.trackChanged(__reverse);
|
||||
|
|
|
|||
Loading…
Reference in a new issue