From 2a23b6afddad2bdb3ebdd0a89ae63182656af70b Mon Sep 17 00:00:00 2001 From: Ly-sec Date: Wed, 24 Sep 2025 14:12:12 +0200 Subject: [PATCH] i18n: WAY more i18n conversion --- Assets/Translations/en.json | 123 ++++++++++++++++++ Modules/Bar/Bluetooth/BluetoothPanel.qml | 6 +- Modules/Bar/Calendar/CalendarPanel.qml | 4 +- Modules/Bar/WiFi/WiFiPanel.qml | 6 +- Modules/Bar/Widgets/Bluetooth.qml | 2 +- Modules/Bar/Widgets/ControlCenter.qml | 2 +- Modules/Bar/Widgets/DarkMode.qml | 2 +- Modules/Bar/Widgets/KeepAwake.qml | 2 +- Modules/Bar/Widgets/Microphone.qml | 2 +- Modules/Bar/Widgets/NightLight.qml | 2 +- Modules/Bar/Widgets/NotificationHistory.qml | 2 +- Modules/Bar/Widgets/ScreenRecorder.qml | 2 +- Modules/Bar/Widgets/SessionMenu.qml | 2 +- Modules/Bar/Widgets/Volume.qml | 2 +- Modules/Bar/Widgets/WallpaperSelector.qml | 2 +- Modules/Bar/Widgets/WiFi.qml | 2 +- Modules/ControlCenter/Cards/MediaCard.qml | 6 +- .../ControlCenter/Cards/PowerProfilesCard.qml | 6 +- Modules/ControlCenter/Cards/ProfileCard.qml | 6 +- Modules/ControlCenter/Cards/UtilitiesCard.qml | 6 +- Modules/Launcher/Launcher.qml | 2 +- .../Launcher/Plugins/ApplicationsPlugin.qml | 2 +- Modules/Launcher/Plugins/CalculatorPlugin.qml | 2 +- Modules/Launcher/Plugins/ClipboardPlugin.qml | 2 +- Modules/Notification/Notification.qml | 2 +- .../Notification/NotificationHistoryPanel.qml | 8 +- Modules/SessionMenu/SessionMenu.qml | 2 +- Modules/Settings/Bar/BarSectionEditor.qml | 6 +- .../Bar/WidgetSettings/BatterySettings.qml | 26 ++-- .../Bar/WidgetSettings/BrightnessSettings.qml | 26 ++-- .../Bar/WidgetSettings/ClockSettings.qml | 4 +- .../WidgetSettings/CustomButtonSettings.qml | 8 +- .../WidgetSettings/KeyboardLayoutSettings.qml | 26 ++-- .../Bar/WidgetSettings/MediaMiniSettings.qml | 26 ++-- .../Bar/WidgetSettings/MicrophoneSettings.qml | 26 ++-- .../Bar/WidgetSettings/SpacerSettings.qml | 2 +- .../Bar/WidgetSettings/VolumeSettings.qml | 26 ++-- .../Bar/WidgetSettings/WorkspaceSettings.qml | 26 ++-- Modules/Settings/SettingsPanel.qml | 2 +- Modules/Settings/Tabs/AudioTab.qml | 92 ++++++------- Modules/Settings/Tabs/GeneralTab.qml | 2 +- Modules/Settings/Tabs/ScreenRecorderTab.qml | 18 +-- Modules/Wallpaper/WallpaperPanel.qml | 6 +- Widgets/NIconPicker.qml | 2 +- 44 files changed, 327 insertions(+), 204 deletions(-) diff --git a/Assets/Translations/en.json b/Assets/Translations/en.json index 3f880aee..004d5278 100644 --- a/Assets/Translations/en.json +++ b/Assets/Translations/en.json @@ -925,6 +925,53 @@ "week": "Week" } }, + "tooltips": { + "refresh": "Refresh", + "close": "Close", + "refresh-wallpaper-list": "Refresh wallpaper list", + "refresh-devices": "Refresh devices", + "forget-network": "Forget network", + "clear-history": "Clear history", + "delete-notification": "Delete notification", + "previous-month": "Previous month", + "next-month": "Next month", + "add-widget": "Add widget", + "widget-settings": "Widget settings", + "remove-widget": "Remove widget", + "open-settings": "Open settings", + "session-menu": "Session Menu", + "close-side-panel": "Close side panel", + "cancel-timer": "Cancel timer", + "start-screen-recording": "Start screen recording", + "stop-screen-recording": "Stop screen recording", + "screen-recorder-not-installed": "Screen recorder is not installed", + "enable-keep-awake": "Enable keep awake", + "disable-keep-awake": "Disable keep awake", + "wallpaper-selector": "Left click: Open wallpaper selector.\nRight click: Set random wallpaper.", + "do-not-disturb-enabled": "'Do not disturb' enabled", + "do-not-disturb-disabled": "'Do not disturb' disabled", + "connect-disconnect-devices": "Left click to connect. Right click to forget.", + "set-power-profile": "Set \"{profile}\" power profile", + "switch-to-light-mode": "Switch to light mode", + "switch-to-dark-mode": "Switch to dark mode", + "night-light-disabled": "Night light is disabled.\nLeft click to cycle mode.\nRight click to access settings.", + "night-light-enabled": "Night light is enabled.\nLeft click to cycle mode.\nRight click to access settings.", + "night-light-forced": "Night light is forced.\nLeft click to cycle mode.\nRight click to access settings.", + "click-to-start-recording": "Click to start recording", + "click-to-stop-recording": "Click to stop recording", + "open-side-panel": "Open side panel", + "volume-at": "Volume at {volume}%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume.", + "microphone-volume-at": "Microphone volume at {volume}%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume.", + "manage-wifi": "Manage Wi-Fi", + "bluetooth-devices": "Bluetooth devices", + "open-notification-history-enable-dnd": "Open notification history\nRight-click to enable \"Do not disturb\".", + "open-notification-history-disable-dnd": "Open notification history\nRight-click to disable \"Do not disturb\".", + "open-wallpaper-selector": "Open wallpaper selector", + "previous-media": "Previous media", + "pause": "Pause", + "play": "Play", + "next-media": "Next media" + }, "clock": { "tooltip": "Open calendar" }, @@ -936,6 +983,82 @@ "close": "Close" } }, + "placeholders": { + "search-icons": "e.g., noctalia, niri, battery, cloud", + "profile-picture-path": "/home/user/.face", + "enter-width-pixels": "Enter width in pixels", + "enter-command": "Enter command to execute (app or custom script)", + "command-example": "echo \"Hello World\"", + "clock-horizontal": "HH:mm ddd, MMM dd", + "clock-vertical": "HH mm dd MM", + "search-wallpapers": "Type to filter wallpapers...", + "search-launcher": "Search entries... or use > for commands" + }, + "options": { + "display-mode": { + "on-hover": "On hover", + "always-show": "Always show", + "always-hide": "Always hide", + "force-open": "Force Open" + }, + "workspace-labels": { + "none": "None", + "index": "Index", + "name": "Name" + }, + "visualizer-types": { + "none": "None", + "linear": "Linear", + "mirrored": "Mirrored", + "wave": "Wave" + }, + "frame-rates": { + "30-fps": "30 FPS", + "60-fps": "60 FPS", + "100-fps": "100 FPS", + "120-fps": "120 FPS", + "144-fps": "144 FPS", + "165-fps": "165 FPS", + "240-fps": "240 FPS" + }, + "screen-recording": { + "sources": { + "portal": "Portal", + "screen": "Screen" + }, + "quality": { + "medium": "Medium", + "high": "High", + "very-high": "Very high", + "ultra": "Ultra" + }, + "codecs": { + "h264": "H264", + "hevc": "HEVC", + "av1": "AV1", + "vp8": "VP8", + "vp9": "VP9" + }, + "color-range": { + "limited": "Limited", + "full": "Full" + }, + "audio-sources": { + "system-output": "System output", + "microphone-input": "Microphone input", + "both": "System output + microphone input" + }, + "audio-codecs": { + "opus": "Opus", + "aac": "AAC" + } + } + }, + "plugins": { + "applications": "Applications", + "clipboard": "Clipboard history", + "calculator": "Calculator" + }, "lock-screen": { "secure-terminal": "SECURE TERMINAL", "unlock-command": "sudo unlock-session", diff --git a/Modules/Bar/Bluetooth/BluetoothPanel.qml b/Modules/Bar/Bluetooth/BluetoothPanel.qml index 73706d91..3f4773ab 100644 --- a/Modules/Bar/Bluetooth/BluetoothPanel.qml +++ b/Modules/Bar/Bluetooth/BluetoothPanel.qml @@ -52,7 +52,7 @@ NPanel { NIconButton { enabled: Settings.data.network.bluetoothEnabled icon: BluetoothService.adapter && BluetoothService.adapter.discovering ? "stop" : "refresh" - tooltipText: "Refresh devices" + tooltipText: I18n.tr("tooltips.refresh-devices") baseSize: Style.baseWidgetSize * 0.8 onClicked: { if (BluetoothService.adapter) { @@ -63,7 +63,7 @@ NPanel { NIconButton { icon: "close" - tooltipText: "Close" + tooltipText: I18n.tr("tooltips.close") baseSize: Style.baseWidgetSize * 0.8 onClicked: { root.close() @@ -139,7 +139,7 @@ NPanel { // Known devices BluetoothDevicesList { label: I18n.tr("bluetooth.panel.known-devices") - tooltipText: "Left click to connect. Right click to forget." + tooltipText: I18n.tr("tooltips.connect-disconnect-devices") property var items: { if (!BluetoothService.adapter || !Bluetooth.devices) return [] diff --git a/Modules/Bar/Calendar/CalendarPanel.qml b/Modules/Bar/Calendar/CalendarPanel.qml index 4789f767..6fc5f136 100644 --- a/Modules/Bar/Calendar/CalendarPanel.qml +++ b/Modules/Bar/Calendar/CalendarPanel.qml @@ -31,7 +31,7 @@ NPanel { NIconButton { icon: "chevron-left" - tooltipText: "Previous month" + tooltipText: I18n.tr("tooltips.previous-month") onClicked: { let newDate = new Date(grid.year, grid.month - 1, 1) grid.year = newDate.getFullYear() @@ -50,7 +50,7 @@ NPanel { NIconButton { icon: "chevron-right" - tooltipText: "Next month" + tooltipText: I18n.tr("tooltips.next-month") onClicked: { let newDate = new Date(grid.year, grid.month + 1, 1) grid.year = newDate.getFullYear() diff --git a/Modules/Bar/WiFi/WiFiPanel.qml b/Modules/Bar/WiFi/WiFiPanel.qml index a0ca5053..0590c795 100644 --- a/Modules/Bar/WiFi/WiFiPanel.qml +++ b/Modules/Bar/WiFi/WiFiPanel.qml @@ -56,7 +56,7 @@ NPanel { NIconButton { icon: "refresh" - tooltipText: "Refresh" + tooltipText: I18n.tr("tooltips.refresh") baseSize: Style.baseWidgetSize * 0.8 enabled: Settings.data.network.wifiEnabled && !NetworkService.scanning onClicked: NetworkService.scan() @@ -64,7 +64,7 @@ NPanel { NIconButton { icon: "close" - tooltipText: "Close" + tooltipText: I18n.tr("tooltips.close") baseSize: Style.baseWidgetSize * 0.8 onClicked: root.close() } @@ -367,7 +367,7 @@ NPanel { NIconButton { visible: (modelData.existing || modelData.cached) && !modelData.connected && NetworkService.connectingTo !== modelData.ssid && NetworkService.forgettingNetwork !== modelData.ssid && NetworkService.disconnectingFrom !== modelData.ssid icon: "trash" - tooltipText: "Forget network" + tooltipText: I18n.tr("tooltips.forget-network") baseSize: Style.baseWidgetSize * 0.8 onClicked: expandedSsid = expandedSsid === modelData.ssid ? "" : modelData.ssid } diff --git a/Modules/Bar/Widgets/Bluetooth.qml b/Modules/Bar/Widgets/Bluetooth.qml index a5a0d1c7..04f2757d 100644 --- a/Modules/Bar/Widgets/Bluetooth.qml +++ b/Modules/Bar/Widgets/Bluetooth.qml @@ -21,7 +21,7 @@ NIconButton { colorBorderHover: Color.transparent icon: Settings.data.network.bluetoothEnabled ? "bluetooth" : "bluetooth-off" - tooltipText: "Bluetooth devices" + tooltipText: I18n.tr("tooltips.bluetooth-devices") onClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this) onRightClicked: PanelService.getPanel("bluetoothPanel")?.toggle(this) } diff --git a/Modules/Bar/Widgets/ControlCenter.qml b/Modules/Bar/Widgets/ControlCenter.qml index c1d348f7..51492b98 100644 --- a/Modules/Bar/Widgets/ControlCenter.qml +++ b/Modules/Bar/Widgets/ControlCenter.qml @@ -35,7 +35,7 @@ NIconButton { // If we have a custom path or distro logo, don't use the theme icon. icon: (customIconPath === "" && !useDistroLogo) ? customIcon : "" - tooltipText: "Open side panel" + tooltipText: I18n.tr("tooltips.open-side-panel") baseSize: Style.capsuleHeight compact: (Settings.data.bar.density === "compact") colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) diff --git a/Modules/Bar/Widgets/DarkMode.qml b/Modules/Bar/Widgets/DarkMode.qml index f9c4e4aa..1043b225 100644 --- a/Modules/Bar/Widgets/DarkMode.qml +++ b/Modules/Bar/Widgets/DarkMode.qml @@ -10,7 +10,7 @@ NIconButton { property real scaling: 1.0 icon: "dark-mode" - tooltipText: `Switch to ${Settings.data.colorSchemes.darkMode ? "light" : "dark"} mode` + tooltipText: Settings.data.colorSchemes.darkMode ? I18n.tr("tooltips.switch-to-light-mode") : I18n.tr("tooltips.switch-to-dark-mode") compact: (Settings.data.bar.density === "compact") baseSize: Style.capsuleHeight colorBg: Settings.data.colorSchemes.darkMode ? (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) : Color.mPrimary diff --git a/Modules/Bar/Widgets/KeepAwake.qml b/Modules/Bar/Widgets/KeepAwake.qml index a6d2b0f7..91ca6af2 100644 --- a/Modules/Bar/Widgets/KeepAwake.qml +++ b/Modules/Bar/Widgets/KeepAwake.qml @@ -14,7 +14,7 @@ NIconButton { baseSize: Style.capsuleHeight compact: (Settings.data.bar.density === "compact") icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off" - tooltipText: IdleInhibitorService.isInhibited ? "Disable keep awake" : "Enable keep awake" + tooltipText: IdleInhibitorService.isInhibited ? I18n.tr("tooltips.disable-keep-awake") : I18n.tr("tooltips.enable-keep-awake") colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mOnSurface colorBorder: Color.transparent diff --git a/Modules/Bar/Widgets/Microphone.qml b/Modules/Bar/Widgets/Microphone.qml index 41e5dbff..71b756d6 100644 --- a/Modules/Bar/Widgets/Microphone.qml +++ b/Modules/Bar/Widgets/Microphone.qml @@ -97,7 +97,7 @@ Item { suffix: "%" forceOpen: displayMode === "alwaysShow" forceClose: displayMode === "alwaysHide" - tooltipText: "Microphone volume at " + Math.round(AudioService.inputVolume * 100) + "%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume." + tooltipText: I18n.tr("tooltips.microphone-volume-at", {"volume": Math.round(AudioService.inputVolume * 100)}) onWheel: function (delta) { wheelAccumulator += delta diff --git a/Modules/Bar/Widgets/NightLight.qml b/Modules/Bar/Widgets/NightLight.qml index b1801dd5..3be8cf53 100644 --- a/Modules/Bar/Widgets/NightLight.qml +++ b/Modules/Bar/Widgets/NightLight.qml @@ -22,7 +22,7 @@ NIconButton { colorBorderHover: Color.transparent icon: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "nightlight-forced" : "nightlight-on") : "nightlight-off" - tooltipText: `Night light is ${Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? "forced." : "enabled.") : "disabled."}\nLeft click to cycle mode.\nRight click to access settings.` + tooltipText: Settings.data.nightLight.enabled ? (Settings.data.nightLight.forced ? I18n.tr("tooltips.night-light-forced") : I18n.tr("tooltips.night-light-enabled")) : I18n.tr("tooltips.night-light-disabled") onClicked: { if (!Settings.data.nightLight.enabled) { Settings.data.nightLight.enabled = true diff --git a/Modules/Bar/Widgets/NotificationHistory.qml b/Modules/Bar/Widgets/NotificationHistory.qml index 6b2d69f2..d33f3116 100644 --- a/Modules/Bar/Widgets/NotificationHistory.qml +++ b/Modules/Bar/Widgets/NotificationHistory.qml @@ -52,7 +52,7 @@ NIconButton { baseSize: Style.capsuleHeight compact: (Settings.data.bar.density === "compact") icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell" - tooltipText: `Open notification history\nRight-click to ${Settings.data.notifications.doNotDisturb ? "disable" : "enable"} "Do not disturb".` + tooltipText: Settings.data.notifications.doNotDisturb ? I18n.tr("tooltips.open-notification-history-disable-dnd") : I18n.tr("tooltips.open-notification-history-enable-dnd") colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) colorFg: Color.mOnSurface colorBorder: Color.transparent diff --git a/Modules/Bar/Widgets/ScreenRecorder.qml b/Modules/Bar/Widgets/ScreenRecorder.qml index e0b09256..28b5e7c2 100644 --- a/Modules/Bar/Widgets/ScreenRecorder.qml +++ b/Modules/Bar/Widgets/ScreenRecorder.qml @@ -11,7 +11,7 @@ NIconButton { property real scaling: 1.0 icon: "camera-video" - tooltipText: ScreenRecorderService.isRecording ? "Click to stop recording" : "Click to start recording" + tooltipText: ScreenRecorderService.isRecording ? I18n.tr("tooltips.click-to-stop-recording") : I18n.tr("tooltips.click-to-start-recording") compact: (Settings.data.bar.density === "compact") baseSize: Style.capsuleHeight colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) diff --git a/Modules/Bar/Widgets/SessionMenu.qml b/Modules/Bar/Widgets/SessionMenu.qml index 38ee93dd..8aea7785 100644 --- a/Modules/Bar/Widgets/SessionMenu.qml +++ b/Modules/Bar/Widgets/SessionMenu.qml @@ -14,7 +14,7 @@ NIconButton { compact: (Settings.data.bar.density === "compact") baseSize: Style.capsuleHeight icon: "power" - tooltipText: "Session menu" + tooltipText: I18n.tr("tooltips.session-menu") colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) colorFg: Color.mError colorBorder: Color.transparent diff --git a/Modules/Bar/Widgets/Volume.qml b/Modules/Bar/Widgets/Volume.qml index 03ac13c9..0d65b4b2 100644 --- a/Modules/Bar/Widgets/Volume.qml +++ b/Modules/Bar/Widgets/Volume.qml @@ -83,7 +83,7 @@ Item { suffix: "%" forceOpen: displayMode === "alwaysShow" forceClose: displayMode === "alwaysHide" - tooltipText: "Volume at " + Math.round(AudioService.volume * 100) + "%\nLeft click to toggle mute. Right click for settings.\nScroll to modify volume." + tooltipText: I18n.tr("tooltips.volume-at", {"volume": Math.round(AudioService.volume * 100)}) onWheel: function (delta) { wheelAccumulator += delta diff --git a/Modules/Bar/Widgets/WallpaperSelector.qml b/Modules/Bar/Widgets/WallpaperSelector.qml index 05163d2f..341df6df 100644 --- a/Modules/Bar/Widgets/WallpaperSelector.qml +++ b/Modules/Bar/Widgets/WallpaperSelector.qml @@ -14,7 +14,7 @@ NIconButton { baseSize: Style.capsuleHeight compact: (Settings.data.bar.density === "compact") icon: "wallpaper-selector" - tooltipText: "Open wallpaper selector" + tooltipText: I18n.tr("tooltips.open-wallpaper-selector") colorBg: (Settings.data.bar.showCapsule ? Color.mSurfaceVariant : Color.transparent) colorFg: Color.mOnSurface colorBorder: Color.transparent diff --git a/Modules/Bar/Widgets/WiFi.qml b/Modules/Bar/Widgets/WiFi.qml index 0991e33b..0e8d3f9b 100644 --- a/Modules/Bar/Widgets/WiFi.qml +++ b/Modules/Bar/Widgets/WiFi.qml @@ -40,7 +40,7 @@ NIconButton { return "signal_wifi_bad" } } - tooltipText: "Manage Wi-Fi" + tooltipText: I18n.tr("tooltips.manage-wifi") onClicked: PanelService.getPanel("wifiPanel")?.toggle(this) onRightClicked: PanelService.getPanel("wifiPanel")?.toggle(this) } diff --git a/Modules/ControlCenter/Cards/MediaCard.qml b/Modules/ControlCenter/Cards/MediaCard.qml index 5e4ad4f8..bed4ce83 100644 --- a/Modules/ControlCenter/Cards/MediaCard.qml +++ b/Modules/ControlCenter/Cards/MediaCard.qml @@ -280,7 +280,7 @@ NBox { // Previous button NIconButton { icon: "media-prev" - tooltipText: "Previous media" + tooltipText: I18n.tr("tooltips.previous-media") visible: MediaService.canGoPrevious onClicked: MediaService.canGoPrevious ? MediaService.previous() : {} } @@ -288,7 +288,7 @@ NBox { // Play/Pause button NIconButton { icon: MediaService.isPlaying ? "media-pause" : "media-play" - tooltipText: MediaService.isPlaying ? "Pause" : "Play" + tooltipText: MediaService.isPlaying ? I18n.tr("tooltips.pause") : I18n.tr("tooltips.play") visible: (MediaService.canPlay || MediaService.canPause) onClicked: (MediaService.canPlay || MediaService.canPause) ? MediaService.playPause() : {} } @@ -296,7 +296,7 @@ NBox { // Next button NIconButton { icon: "media-next" - tooltipText: "Next media" + tooltipText: I18n.tr("tooltips.next-media") visible: MediaService.canGoNext onClicked: MediaService.canGoNext ? MediaService.next() : {} } diff --git a/Modules/ControlCenter/Cards/PowerProfilesCard.qml b/Modules/ControlCenter/Cards/PowerProfilesCard.qml index 5ab7f7df..09cfe286 100644 --- a/Modules/ControlCenter/Cards/PowerProfilesCard.qml +++ b/Modules/ControlCenter/Cards/PowerProfilesCard.qml @@ -26,7 +26,7 @@ NBox { // Performance NIconButton { icon: PowerProfileService.getIcon(PowerProfile.Performance) - tooltipText: `Set "${PowerProfileService.getName(PowerProfile.Performance)}" power profile` + tooltipText: I18n.tr("tooltips.set-power-profile", {"profile": PowerProfileService.getName(PowerProfile.Performance)}) enabled: hasPP opacity: enabled ? Style.opacityFull : Style.opacityMedium colorBg: (enabled && PowerProfileService.profile === PowerProfile.Performance) ? Color.mPrimary : Color.mSurfaceVariant @@ -36,7 +36,7 @@ NBox { // Balanced NIconButton { icon: PowerProfileService.getIcon(PowerProfile.Balanced) - tooltipText: `Set "${PowerProfileService.getName(PowerProfile.Balanced)}" power profile` + tooltipText: I18n.tr("tooltips.set-power-profile", {"profile": PowerProfileService.getName(PowerProfile.Balanced)}) enabled: hasPP opacity: enabled ? Style.opacityFull : Style.opacityMedium colorBg: (enabled && PowerProfileService.profile === PowerProfile.Balanced) ? Color.mPrimary : Color.mSurfaceVariant @@ -46,7 +46,7 @@ NBox { // Eco NIconButton { icon: PowerProfileService.getIcon(PowerProfile.PowerSaver) - tooltipText: `Set "${PowerProfileService.getName(PowerProfile.PowerSaver)}" power profile` + tooltipText: I18n.tr("tooltips.set-power-profile", {"profile": PowerProfileService.getName(PowerProfile.PowerSaver)}) enabled: hasPP opacity: enabled ? Style.opacityFull : Style.opacityMedium colorBg: (enabled && PowerProfileService.profile === PowerProfile.PowerSaver) ? Color.mPrimary : Color.mSurfaceVariant diff --git a/Modules/ControlCenter/Cards/ProfileCard.qml b/Modules/ControlCenter/Cards/ProfileCard.qml index d7aa4a4e..1d3e35d0 100644 --- a/Modules/ControlCenter/Cards/ProfileCard.qml +++ b/Modules/ControlCenter/Cards/ProfileCard.qml @@ -56,7 +56,7 @@ NBox { } NIconButton { icon: "settings" - tooltipText: "Open settings" + tooltipText: I18n.tr("tooltips.open-settings") onClicked: { settingsPanel.requestedTab = SettingsPanel.Tab.General settingsPanel.open() @@ -66,7 +66,7 @@ NBox { NIconButton { id: powerButton icon: "power" - tooltipText: "Session Menu" + tooltipText: I18n.tr("tooltips.session-menu") onClicked: { sessionMenuPanel.open() controlCenterPanel.close() @@ -76,7 +76,7 @@ NBox { NIconButton { id: closeButton icon: "close" - tooltipText: "Close side panel" + tooltipText: I18n.tr("tooltips.close-side-panel") onClicked: { controlCenterPanel.close() } diff --git a/Modules/ControlCenter/Cards/UtilitiesCard.qml b/Modules/ControlCenter/Cards/UtilitiesCard.qml index 9bfae591..decd9659 100644 --- a/Modules/ControlCenter/Cards/UtilitiesCard.qml +++ b/Modules/ControlCenter/Cards/UtilitiesCard.qml @@ -24,7 +24,7 @@ NBox { NIconButton { icon: "camera-video" enabled: ScreenRecorderService.isAvailable - tooltipText: ScreenRecorderService.isAvailable ? (ScreenRecorderService.isRecording ? "Stop screen recording" : "Start screen recording") : "Screen recorder is not installed" + tooltipText: ScreenRecorderService.isAvailable ? (ScreenRecorderService.isRecording ? I18n.tr("tooltips.stop-screen-recording") : I18n.tr("tooltips.start-screen-recording")) : I18n.tr("tooltips.screen-recorder-not-installed") colorBg: ScreenRecorderService.isRecording ? Color.mPrimary : Color.mSurfaceVariant colorFg: ScreenRecorderService.isRecording ? Color.mOnPrimary : Color.mPrimary onClicked: { @@ -42,7 +42,7 @@ NBox { // Idle Inhibitor NIconButton { icon: IdleInhibitorService.isInhibited ? "keep-awake-on" : "keep-awake-off" - tooltipText: `${IdleInhibitorService.isInhibited ? "Disable" : "Enable"} keep awake` + tooltipText: IdleInhibitorService.isInhibited ? I18n.tr("tooltips.disable-keep-awake") : I18n.tr("tooltips.enable-keep-awake") colorBg: IdleInhibitorService.isInhibited ? Color.mPrimary : Color.mSurfaceVariant colorFg: IdleInhibitorService.isInhibited ? Color.mOnPrimary : Color.mPrimary onClicked: { @@ -54,7 +54,7 @@ NBox { NIconButton { visible: Settings.data.wallpaper.enabled icon: "wallpaper-selector" - tooltipText: "Left click: Open wallpaper selector.\nRight click: Set random wallpaper." + tooltipText: I18n.tr("tooltips.wallpaper-selector") onClicked: PanelService.getPanel("wallpaperPanel")?.toggle(this) onRightClicked: WallpaperService.setRandomWallpaper() } diff --git a/Modules/Launcher/Launcher.qml b/Modules/Launcher/Launcher.qml index ba1855e3..0714530f 100644 --- a/Modules/Launcher/Launcher.qml +++ b/Modules/Launcher/Launcher.qml @@ -245,7 +245,7 @@ NPanel { fontWeight: Style.fontWeightSemiBold text: searchText - placeholderText: "Search entries... or use > for commands" + placeholderText: I18n.tr("placeholders.search-launcher") onTextChanged: searchText = text diff --git a/Modules/Launcher/Plugins/ApplicationsPlugin.qml b/Modules/Launcher/Plugins/ApplicationsPlugin.qml index 0754bd66..46d83094 100644 --- a/Modules/Launcher/Plugins/ApplicationsPlugin.qml +++ b/Modules/Launcher/Plugins/ApplicationsPlugin.qml @@ -7,7 +7,7 @@ import "../../../Helpers/FuzzySort.js" as Fuzzysort Item { property var launcher: null - property string name: "Applications" + property string name: I18n.tr("plugins.applications") property bool handleSearch: true property var entries: [] diff --git a/Modules/Launcher/Plugins/CalculatorPlugin.qml b/Modules/Launcher/Plugins/CalculatorPlugin.qml index 20298703..3f0b1a03 100644 --- a/Modules/Launcher/Plugins/CalculatorPlugin.qml +++ b/Modules/Launcher/Plugins/CalculatorPlugin.qml @@ -4,7 +4,7 @@ import "../../../Helpers/AdvancedMath.js" as AdvancedMath Item { property var launcher: null - property string name: "Calculator" + property string name: I18n.tr("plugins.calculator") function handleCommand(query) { // Handle >calc command or direct math expressions after > diff --git a/Modules/Launcher/Plugins/ClipboardPlugin.qml b/Modules/Launcher/Plugins/ClipboardPlugin.qml index 9de69903..271f7823 100644 --- a/Modules/Launcher/Plugins/ClipboardPlugin.qml +++ b/Modules/Launcher/Plugins/ClipboardPlugin.qml @@ -7,7 +7,7 @@ Item { id: root // Plugin metadata - property string name: "Clipboard history" + property string name: I18n.tr("plugins.clipboard") property var launcher: null // Plugin capabilities diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 48bfe37a..12405c96 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -374,7 +374,7 @@ Variants { // Close button positioned absolutely NIconButton { icon: "close" - tooltipText: "Close" + tooltipText: I18n.tr("tooltips.close") baseSize: Style.baseWidgetSize * 0.6 anchors.top: parent.top anchors.topMargin: Style.marginM * scaling diff --git a/Modules/Notification/NotificationHistoryPanel.qml b/Modules/Notification/NotificationHistoryPanel.qml index 220b26f4..cdc1bcfa 100644 --- a/Modules/Notification/NotificationHistoryPanel.qml +++ b/Modules/Notification/NotificationHistoryPanel.qml @@ -46,14 +46,14 @@ NPanel { NIconButton { icon: Settings.data.notifications.doNotDisturb ? "bell-off" : "bell" - tooltipText: `'Do not disturb' ${Settings.data.notifications.doNotDisturb ? "enabled" : "disabled"}` + tooltipText: Settings.data.notifications.doNotDisturb ? I18n.tr("tooltips.do-not-disturb-enabled") : I18n.tr("tooltips.do-not-disturb-disabled") baseSize: Style.baseWidgetSize * 0.8 onClicked: Settings.data.notifications.doNotDisturb = !Settings.data.notifications.doNotDisturb } NIconButton { icon: "trash" - tooltipText: "Clear history" + tooltipText: I18n.tr("tooltips.clear-history") baseSize: Style.baseWidgetSize * 0.8 onClicked: { NotificationService.clearHistory() @@ -64,7 +64,7 @@ NPanel { NIconButton { icon: "close" - tooltipText: "Close" + tooltipText: I18n.tr("tooltips.close") baseSize: Style.baseWidgetSize * 0.8 onClicked: root.close() } @@ -244,7 +244,7 @@ NPanel { // Delete button NIconButton { icon: "trash" - tooltipText: "Delete notification" + tooltipText: I18n.tr("tooltips.delete-notification") baseSize: Style.baseWidgetSize * 0.7 Layout.alignment: Qt.AlignTop diff --git a/Modules/SessionMenu/SessionMenu.qml b/Modules/SessionMenu/SessionMenu.qml index c3de9a59..b3a1b1a2 100644 --- a/Modules/SessionMenu/SessionMenu.qml +++ b/Modules/SessionMenu/SessionMenu.qml @@ -277,7 +277,7 @@ NPanel { NIconButton { icon: timerActive ? "stop" : "close" - tooltipText: timerActive ? "Cancel timer" : "Close" + tooltipText: timerActive ? I18n.tr("tooltips.cancel-timer") : I18n.tr("tooltips.close") Layout.alignment: Qt.AlignVCenter colorBg: timerActive ? Qt.alpha(Color.mError, 0.08) : Color.transparent colorFg: timerActive ? Color.mError : Color.mOnSurface diff --git a/Modules/Settings/Bar/BarSectionEditor.qml b/Modules/Settings/Bar/BarSectionEditor.qml index 1e6d1d46..86b5e72f 100644 --- a/Modules/Settings/Bar/BarSectionEditor.qml +++ b/Modules/Settings/Bar/BarSectionEditor.qml @@ -99,7 +99,7 @@ NBox { colorBgHover: Color.mSecondary colorFgHover: Color.mOnSecondary enabled: comboBox.currentKey !== "" - tooltipText: "Add widget" + tooltipText: I18n.tr("tooltips.add-widget") Layout.alignment: Qt.AlignVCenter Layout.leftMargin: Style.marginS * scaling onClicked: { @@ -227,7 +227,7 @@ NBox { active: BarWidgetRegistry.widgetHasUserSettings(modelData.id) sourceComponent: NIconButton { icon: "settings" - tooltipText: "Widget settings" + tooltipText: I18n.tr("tooltips.widget-settings") baseSize: miniButtonSize colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight) colorBg: Color.mOnSurface @@ -268,7 +268,7 @@ NBox { NIconButton { icon: "close" - tooltipText: "Remove widget" + tooltipText: I18n.tr("tooltips.remove-widget") baseSize: miniButtonSize colorBorder: Qt.alpha(Color.mOutline, Style.opacityLight) colorBg: Color.mOnSurface diff --git a/Modules/Settings/Bar/WidgetSettings/BatterySettings.qml b/Modules/Settings/Bar/WidgetSettings/BatterySettings.qml index 977e49e5..acb14169 100644 --- a/Modules/Settings/Bar/WidgetSettings/BatterySettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/BatterySettings.qml @@ -28,20 +28,20 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.battery.display-mode.label") description: I18n.tr("bar.widget-settings.battery.display-mode.description") minimumWidth: 134 * scaling - model: ListModel { - ListElement { - key: "onhover" - name: "On hover" + model: [ + { + key: "onhover", + name: I18n.tr("options.display-mode.on-hover") + }, + { + key: "alwaysShow", + name: I18n.tr("options.display-mode.always-show") + }, + { + key: "alwaysHide", + name: I18n.tr("options.display-mode.always-hide") } - ListElement { - key: "alwaysShow" - name: "Always show" - } - ListElement { - key: "alwaysHide" - name: "Always hide" - } - } + ] currentKey: root.valueDisplayMode onSelected: key => root.valueDisplayMode = key } diff --git a/Modules/Settings/Bar/WidgetSettings/BrightnessSettings.qml b/Modules/Settings/Bar/WidgetSettings/BrightnessSettings.qml index c54ca3ac..9d5070e3 100644 --- a/Modules/Settings/Bar/WidgetSettings/BrightnessSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/BrightnessSettings.qml @@ -26,20 +26,20 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.brightness.display-mode.label") description: I18n.tr("bar.widget-settings.brightness.display-mode.description") minimumWidth: 134 * scaling - model: ListModel { - ListElement { - key: "onhover" - name: "On hover" + model: [ + { + key: "onhover", + name: I18n.tr("options.display-mode.on-hover") + }, + { + key: "alwaysShow", + name: I18n.tr("options.display-mode.always-show") + }, + { + key: "alwaysHide", + name: I18n.tr("options.display-mode.always-hide") } - ListElement { - key: "alwaysShow" - name: "Always show" - } - ListElement { - key: "alwaysHide" - name: "Always hide" - } - } + ] currentKey: valueDisplayMode onSelected: key => valueDisplayMode = key } diff --git a/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml b/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml index ca6c300d..099c5ff1 100644 --- a/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/ClockSettings.qml @@ -106,7 +106,7 @@ ColumnLayout { Layout.fillWidth: true label: I18n.tr("bar.widget-settings.clock.horizontal-bar.label") description: I18n.tr("bar.widget-settings.clock.horizontal-bar.description") - placeholderText: "HH:mm ddd, MMM dd" + placeholderText: I18n.tr("placeholders.clock-horizontal") text: valueFormatHorizontal onTextChanged: valueFormatHorizontal = text Component.onCompleted: { @@ -129,7 +129,7 @@ ColumnLayout { Layout.fillWidth: true label: I18n.tr("bar.widget-settings.clock.vertical-bar.label") description: I18n.tr("bar.widget-settings.clock.vertical-bar.description") - placeholderText: "HH mm dd MM" + placeholderText: I18n.tr("placeholders.clock-vertical") text: valueFormatVertical onTextChanged: valueFormatVertical = text Component.onCompleted: { diff --git a/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml b/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml index 34964e44..0733091a 100644 --- a/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/CustomButtonSettings.qml @@ -59,7 +59,7 @@ ColumnLayout { id: leftClickExecInput Layout.fillWidth: true label: I18n.tr("bar.widget-settings.custom-button.left-click") - placeholderText: "Enter command to execute (app or custom script)" + placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.leftClickExec || widgetMetadata.leftClickExec } @@ -67,7 +67,7 @@ ColumnLayout { id: rightClickExecInput Layout.fillWidth: true label: I18n.tr("bar.widget-settings.custom-button.right-click") - placeholderText: "Enter command to execute (app or custom script)" + placeholderText: I18n.tr("placeholders.enter-command") text: widgetData?.rightClickExec || widgetMetadata.rightClickExec } @@ -75,7 +75,7 @@ ColumnLayout { id: middleClickExecInput Layout.fillWidth: true label: I18n.tr("bar.widget-settings.custom-button.middle-click") - placeholderText: "Enter command to execute (app or custom script)" + placeholderText: I18n.tr("placeholders.enter-command") text: widgetData.middleClickExec || widgetMetadata.middleClickExec } @@ -92,7 +92,7 @@ ColumnLayout { Layout.fillWidth: true label: I18n.tr("bar.widget-settings.custom-button.display-command-output.label") description: I18n.tr("bar.widget-settings.custom-button.display-command-output.description") - placeholderText: "echo \"Hello World\"" + placeholderText: I18n.tr("placeholders.command-example") text: widgetData?.textCommand || widgetMetadata.textCommand } diff --git a/Modules/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml b/Modules/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml index 36ad8042..9350e9b7 100644 --- a/Modules/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/KeyboardLayoutSettings.qml @@ -26,20 +26,20 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.keyboard-layout.display-mode.label") description: I18n.tr("bar.widget-settings.keyboard-layout.display-mode.description") minimumWidth: 134 * scaling - model: ListModel { - ListElement { - key: "onhover" - name: "On hover" + model: [ + { + key: "onhover", + name: I18n.tr("options.display-mode.on-hover") + }, + { + key: "forceOpen", + name: I18n.tr("options.display-mode.force-open") + }, + { + key: "alwaysHide", + name: I18n.tr("options.display-mode.always-hide") } - ListElement { - key: "forceOpen" - name: "Force Open" - } - ListElement { - key: "alwaysHide" - name: "Always hide" - } - } + ] currentKey: valueDisplayMode onSelected: key => valueDisplayMode = key } diff --git a/Modules/Settings/Bar/WidgetSettings/MediaMiniSettings.qml b/Modules/Settings/Bar/WidgetSettings/MediaMiniSettings.qml index a82187c1..daeaf5a6 100644 --- a/Modules/Settings/Bar/WidgetSettings/MediaMiniSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/MediaMiniSettings.qml @@ -41,20 +41,20 @@ ColumnLayout { NComboBox { visible: valueShowVisualizer label: I18n.tr("bar.widget-settings.media-mini.visualizer-type") - model: ListModel { - ListElement { - key: "linear" - name: "Linear" + model: [ + { + key: "linear", + name: I18n.tr("options.visualizer-types.linear") + }, + { + key: "mirrored", + name: I18n.tr("options.visualizer-types.mirrored") + }, + { + key: "wave", + name: I18n.tr("options.visualizer-types.wave") } - ListElement { - key: "mirrored" - name: "Mirrored" - } - ListElement { - key: "wave" - name: "Wave" - } - } + ] currentKey: valueVisualizerType onSelected: key => valueVisualizerType = key minimumWidth: 200 * scaling diff --git a/Modules/Settings/Bar/WidgetSettings/MicrophoneSettings.qml b/Modules/Settings/Bar/WidgetSettings/MicrophoneSettings.qml index d832b0d6..d7071022 100644 --- a/Modules/Settings/Bar/WidgetSettings/MicrophoneSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/MicrophoneSettings.qml @@ -26,20 +26,20 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.microphone.display-mode.label") description: I18n.tr("bar.widget-settings.microphone.display-mode.description") minimumWidth: 134 * scaling - model: ListModel { - ListElement { - key: "onhover" - name: "On hover" + model: [ + { + key: "onhover", + name: I18n.tr("options.display-mode.on-hover") + }, + { + key: "alwaysShow", + name: I18n.tr("options.display-mode.always-show") + }, + { + key: "alwaysHide", + name: I18n.tr("options.display-mode.always-hide") } - ListElement { - key: "alwaysShow" - name: "Always show" - } - ListElement { - key: "alwaysHide" - name: "Always hide" - } - } + ] currentKey: valueDisplayMode onSelected: key => valueDisplayMode = key } diff --git a/Modules/Settings/Bar/WidgetSettings/SpacerSettings.qml b/Modules/Settings/Bar/WidgetSettings/SpacerSettings.qml index 1ecd2740..7c6b8b17 100644 --- a/Modules/Settings/Bar/WidgetSettings/SpacerSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/SpacerSettings.qml @@ -25,6 +25,6 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.spacer.width.label") description: I18n.tr("bar.widget-settings.spacer.width.description") text: widgetData.width || widgetMetadata.width - placeholderText: "Enter width in pixels" + placeholderText: I18n.tr("placeholders.enter-width-pixels") } } diff --git a/Modules/Settings/Bar/WidgetSettings/VolumeSettings.qml b/Modules/Settings/Bar/WidgetSettings/VolumeSettings.qml index 00d63083..987bedbb 100644 --- a/Modules/Settings/Bar/WidgetSettings/VolumeSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/VolumeSettings.qml @@ -26,20 +26,20 @@ ColumnLayout { label: I18n.tr("bar.widget-settings.volume.display-mode.label") description: I18n.tr("bar.widget-settings.volume.display-mode.description") minimumWidth: 134 * scaling - model: ListModel { - ListElement { - key: "onhover" - name: "On hover" + model: [ + { + key: "onhover", + name: I18n.tr("options.display-mode.on-hover") + }, + { + key: "alwaysShow", + name: I18n.tr("options.display-mode.always-show") + }, + { + key: "alwaysHide", + name: I18n.tr("options.display-mode.always-hide") } - ListElement { - key: "alwaysShow" - name: "Always show" - } - ListElement { - key: "alwaysHide" - name: "Always hide" - } - } + ] currentKey: valueDisplayMode onSelected: key => valueDisplayMode = key } diff --git a/Modules/Settings/Bar/WidgetSettings/WorkspaceSettings.qml b/Modules/Settings/Bar/WidgetSettings/WorkspaceSettings.qml index 47854470..3c8ce794 100644 --- a/Modules/Settings/Bar/WidgetSettings/WorkspaceSettings.qml +++ b/Modules/Settings/Bar/WidgetSettings/WorkspaceSettings.qml @@ -24,20 +24,20 @@ ColumnLayout { id: labelModeCombo label: I18n.tr("bar.widget-settings.workspace.label-mode") - model: ListModel { - ListElement { - key: "none" - name: "None" + model: [ + { + key: "none", + name: I18n.tr("options.workspace-labels.none") + }, + { + key: "index", + name: I18n.tr("options.workspace-labels.index") + }, + { + key: "name", + name: I18n.tr("options.workspace-labels.name") } - ListElement { - key: "index" - name: "Index" - } - ListElement { - key: "name" - name: "Name" - } - } + ] currentKey: widgetData.labelMode || widgetMetadata.labelMode onSelected: key => labelModeCombo.currentKey = key minimumWidth: 200 * scaling diff --git a/Modules/Settings/SettingsPanel.qml b/Modules/Settings/SettingsPanel.qml index fbef5378..0513033f 100644 --- a/Modules/Settings/SettingsPanel.qml +++ b/Modules/Settings/SettingsPanel.qml @@ -462,7 +462,7 @@ NPanel { // Close button NIconButton { icon: "close" - tooltipText: "Close" + tooltipText: I18n.tr("tooltips.close") Layout.alignment: Qt.AlignVCenter onClicked: root.close() } diff --git a/Modules/Settings/Tabs/AudioTab.qml b/Modules/Settings/Tabs/AudioTab.qml index d8bf87c2..bd02fbd2 100644 --- a/Modules/Settings/Tabs/AudioTab.qml +++ b/Modules/Settings/Tabs/AudioTab.qml @@ -326,24 +326,24 @@ ColumnLayout { id: audioVisualizerCombo label: I18n.tr("settings.audio.media.visualizer-type.label") description: I18n.tr("settings.audio.media.visualizer-type.description") - model: ListModel { - ListElement { - key: "none" - name: "None" + model: [ + { + key: "none", + name: I18n.tr("options.visualizer-types.none") + }, + { + key: "linear", + name: I18n.tr("options.visualizer-types.linear") + }, + { + key: "mirrored", + name: I18n.tr("options.visualizer-types.mirrored") + }, + { + key: "wave", + name: I18n.tr("options.visualizer-types.wave") } - ListElement { - key: "linear" - name: "Linear" - } - ListElement { - key: "mirrored" - name: "Mirrored" - } - ListElement { - key: "wave" - name: "Wave" - } - } + ] currentKey: Settings.data.audio.visualizerType onSelected: key => Settings.data.audio.visualizerType = key } @@ -351,36 +351,36 @@ ColumnLayout { NComboBox { label: I18n.tr("settings.audio.media.frame-rate.label") description: I18n.tr("settings.audio.media.frame-rate.description") - model: ListModel { - ListElement { - key: "30" - name: "30 FPS" + model: [ + { + key: "30", + name: I18n.tr("options.frame-rates.30-fps") + }, + { + key: "60", + name: I18n.tr("options.frame-rates.60-fps") + }, + { + key: "100", + name: I18n.tr("options.frame-rates.100-fps") + }, + { + key: "120", + name: I18n.tr("options.frame-rates.120-fps") + }, + { + key: "144", + name: I18n.tr("options.frame-rates.144-fps") + }, + { + key: "165", + name: I18n.tr("options.frame-rates.165-fps") + }, + { + key: "240", + name: I18n.tr("options.frame-rates.240-fps") } - ListElement { - key: "60" - name: "60 FPS" - } - ListElement { - key: "100" - name: "100 FPS" - } - ListElement { - key: "120" - name: "120 FPS" - } - ListElement { - key: "144" - name: "144 FPS" - } - ListElement { - key: "165" - name: "165 FPS" - } - ListElement { - key: "240" - name: "240 FPS" - } - } + ] currentKey: Settings.data.audio.cavaFrameRate onSelected: key => Settings.data.audio.cavaFrameRate = key } diff --git a/Modules/Settings/Tabs/GeneralTab.qml b/Modules/Settings/Tabs/GeneralTab.qml index 0d748a97..edd0fc67 100644 --- a/Modules/Settings/Tabs/GeneralTab.qml +++ b/Modules/Settings/Tabs/GeneralTab.qml @@ -36,7 +36,7 @@ ColumnLayout { }) description: I18n.tr("settings.general.profile.picture.description") text: Settings.data.general.avatarImage - placeholderText: "/home/user/.face" + placeholderText: I18n.tr("placeholders.profile-picture-path") buttonIcon: "photo" buttonTooltip: "Browse for avatar image" onInputEditingFinished: Settings.data.general.avatarImage = text diff --git a/Modules/Settings/Tabs/ScreenRecorderTab.qml b/Modules/Settings/Tabs/ScreenRecorderTab.qml index ba4bbdac..3d464439 100644 --- a/Modules/Settings/Tabs/ScreenRecorderTab.qml +++ b/Modules/Settings/Tabs/ScreenRecorderTab.qml @@ -61,16 +61,16 @@ ColumnLayout { NComboBox { label: I18n.tr("settings.screen-recorder.video.video-source.label") description: I18n.tr("settings.screen-recorder.video.video-source.description") - model: ListModel { - ListElement { - key: "portal" - name: "Portal" + model: [ + { + key: "portal", + name: I18n.tr("options.screen-recording.sources.portal") + }, + { + key: "screen", + name: I18n.tr("options.screen-recording.sources.screen") } - ListElement { - key: "screen" - name: "Screen" - } - } + ] currentKey: Settings.data.screenRecorder.videoSource onSelected: key => Settings.data.screenRecorder.videoSource = key } diff --git a/Modules/Wallpaper/WallpaperPanel.qml b/Modules/Wallpaper/WallpaperPanel.qml index 2b6b8fb6..95ad2f49 100644 --- a/Modules/Wallpaper/WallpaperPanel.qml +++ b/Modules/Wallpaper/WallpaperPanel.qml @@ -65,14 +65,14 @@ NPanel { NIconButton { icon: "refresh" - tooltipText: "Refresh wallpaper list" + tooltipText: I18n.tr("tooltips.refresh-wallpaper-list") baseSize: Style.baseWidgetSize * 0.8 onClicked: WallpaperService.refreshWallpapersList() } NIconButton { icon: "close" - tooltipText: "Close" + tooltipText: I18n.tr("tooltips.close") baseSize: Style.baseWidgetSize * 0.8 onClicked: root.close() } @@ -183,7 +183,7 @@ NPanel { NTextInput { id: searchInput - placeholderText: "Type to filter wallpapers..." + placeholderText: I18n.tr("placeholders.search-wallpapers") Layout.fillWidth: true onTextChanged: { diff --git a/Widgets/NIconPicker.qml b/Widgets/NIconPicker.qml index 4aecf9cb..86ea50a4 100644 --- a/Widgets/NIconPicker.qml +++ b/Widgets/NIconPicker.qml @@ -86,7 +86,7 @@ Popup { id: searchInput Layout.fillWidth: true label: I18n.tr("widgets.icon-picker.search.label") - placeholderText: "e.g., noctalia, niri, battery, cloud" + placeholderText: I18n.tr("placeholders.search-icons") text: root.query onTextChanged: root.query = text.trim().toLowerCase() }