The installer asks for the language before the keyboard, and Setup > Language (omarchy language en|zh) switches it later. Under zh_CN the menu reads its labels from omarchy-menu.zh-cn.jsonc, the shell from I18nZh.js through I18n.tr, and notifications are worded by their sender through omarchy-text, which reads the same table. User text is never translated.
22 lines
509 B
QML
22 lines
509 B
QML
import QtQuick
|
|
import qs.Commons
|
|
import qs.Ui
|
|
|
|
BarIndicator {
|
|
id: root
|
|
|
|
readonly property var idleService: bar?.shell?.firstPartyServiceFor("omarchy.idle")
|
|
|
|
active: idleService ? idleService.stayAwake : false
|
|
activeText: ""
|
|
inactiveText: ""
|
|
activeTooltipText: I18n.tr("Allow Idle Lock & Screensaver")
|
|
inactiveTooltipText: I18n.tr("Stay Awake")
|
|
|
|
function toggle() {
|
|
if (root.idleService) root.idleService.setIdleEnabled(root.active)
|
|
}
|
|
|
|
onPressed: function() { root.toggle() }
|
|
}
|