fix(phone-connect): zh-Hans locale, aliasMap, box padding, volume, config data loss, interval, dead settings, slider, UI issues (#199)
* fix(phone-connect): zh-Hans locale, switcher aliasMap, box padding - Rename zh_hans -> zh-Hans (plugin.toml value, en.json key) and add the missing translations/zh-Hans.json. The zh_hans tag does not match BCP 47, so the framework's materialize step dropped the Chinese translation file and t() returned raw dot keys in the UI. - Add missing aliasMap definition in switcher() so the multi-device panel no longer errors on aliasMap[id]. Fixes #176. - Replace ui.box({padding=...}) with ui.row({padding=...}); box does not support the padding prop, causing ui-tree warnings on open. Supersedes #190 (which covers only the aliasMap fix). * fix(phone-connect): volume quoting, config data loss, interval, dead settings, slider, UI issues 1. media_set_volume: shellQuote the <int32> variant arg (was unquoted, shell treated < as redirect; same fix as media_seek). 2. onConfigChanged: track last-applied custom_image/device_alias values so unrelated config edits (e.g. language switch) no longer wipe a device's image/alias. Seed trackers at init so reload is safe too. 3. state_update_interval=0: return 3600000ms + guard in update() to skip auto-refresh, matching the '0 disables' description. 4. Remove 4 dead settings (show_ongoing_media, show_device_placeholder, scan_subdirectories, max_recent_images) declared but never read, plus orphan recent_images translation keys. 5. Media slider: freeze value during drag via per-device dragState so the 1s service refresh doesn't yank the slider back. Also fixes onDragEnd seeking to a stale seekPos. 6. Minor: runCli reports cli_failed not no_backend; browse uses runAsync not runInTerminal; charging color priority over low-battery; device name falls back to d.name; fix comment mismatches. * chore: bump version to 0.1.1 * fix: use lowercase zh-hans translation key to pass CI validation CI rejects uppercase in translation keys (zh-Hans). The translation key and label_key are now lowercase zh-hans, while the file name stays zh-Hans.json (required by the framework's materialize step) and the select value stays zh-Hans (used to build the file path).
This commit is contained in:
@@ -1,118 +1,101 @@
|
||||
{
|
||||
"action": {
|
||||
"accept": "Accept",
|
||||
"browse": "Browse",
|
||||
"clipboard": "Clipboard",
|
||||
"pair": "Pair",
|
||||
"ping": "Ping",
|
||||
"refresh": "Refresh",
|
||||
"reject": "Reject",
|
||||
"ring": "Ring",
|
||||
"share": "Share",
|
||||
"sms": "SMS",
|
||||
"switch": "Switch device",
|
||||
"unpair": "Unpair"
|
||||
"settings": {
|
||||
"state_update_interval": {
|
||||
"label": "State Update Interval",
|
||||
"description": "Seconds between automatic device state refreshes. 0 disables auto-refresh."
|
||||
},
|
||||
"enable_charging_animation": {
|
||||
"label": "Show Charging Fill",
|
||||
"description": "Highlight the bar widget when the device is charging."
|
||||
},
|
||||
"custom_image": {
|
||||
"label": "Device Image",
|
||||
"description": "Set a custom image for the selected device. Leave empty for default icon."
|
||||
},
|
||||
"device_alias": {
|
||||
"label": "Device Alias",
|
||||
"description": "Custom display name for the selected device."
|
||||
},
|
||||
"language": {
|
||||
"label": "Language",
|
||||
"description": "Display language",
|
||||
"en": "English",
|
||||
"zh-hans": "简体中文"
|
||||
},
|
||||
"enable_clipboard_action": {
|
||||
"label": "Show Clipboard Action",
|
||||
"description": "Show a quick action to send the clipboard to the device."
|
||||
},
|
||||
"panel_placement": {
|
||||
"label": "Panel Placement",
|
||||
"description": "How the details panel opens: attached to the bar, or floating.",
|
||||
"attached": "Attached to bar",
|
||||
"floating": "Floating (center)",
|
||||
"widget": "Below widget (floating)"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"accept_failed": "Failed to accept pairing",
|
||||
"browse_failed": "Failed to browse device",
|
||||
"clipboard_failed": "Failed to send clipboard",
|
||||
"no_backend": "No backend",
|
||||
"pairing_failed": "Pairing failed",
|
||||
"ping_failed": "Failed to send ping",
|
||||
"reject_failed": "Failed to reject pairing",
|
||||
"ring_failed": "Failed to ring device",
|
||||
"share_failed": "Failed to share",
|
||||
"unpair_failed": "Unpair failed"
|
||||
"status": {
|
||||
"unavailable": "Unavailable",
|
||||
"no_devices": "No devices",
|
||||
"offline": "Offline",
|
||||
"connected": "Connected",
|
||||
"not_paired": "Not paired",
|
||||
"no_backend": "KDE Connect not running"
|
||||
},
|
||||
"action": {
|
||||
"ring": "Ring",
|
||||
"ping": "Ping",
|
||||
"clipboard": "Clipboard",
|
||||
"share": "Share",
|
||||
"browse": "Browse",
|
||||
"sms": "SMS",
|
||||
"pair": "Pair",
|
||||
"accept": "Accept",
|
||||
"reject": "Reject",
|
||||
"unpair": "Unpair",
|
||||
"refresh": "Refresh",
|
||||
"switch": "Switch device"
|
||||
},
|
||||
"notify": {
|
||||
"clipboard_sent": "Clipboard sent",
|
||||
"opening_browser": "Opening file browser...",
|
||||
"paired": "Device paired",
|
||||
"pairing_sent": "Pairing request sent",
|
||||
"ping_sent": "Ping sent to {name}",
|
||||
"ringing": "Ringing {name}...",
|
||||
"sms_sent": "SMS sent",
|
||||
"unpaired": "Device unpaired"
|
||||
"ping_sent": "Ping sent to {name}",
|
||||
"clipboard_sent": "Clipboard sent",
|
||||
"pairing_sent": "Pairing request sent",
|
||||
"paired": "Device paired",
|
||||
"unpaired": "Device unpaired",
|
||||
"opening_browser": "Opening file browser...",
|
||||
"sms_sent": "SMS sent"
|
||||
},
|
||||
"error": {
|
||||
"ring_failed": "Failed to ring device",
|
||||
"ping_failed": "Failed to send ping",
|
||||
"clipboard_failed": "Failed to send clipboard",
|
||||
"share_failed": "Failed to share",
|
||||
"browse_failed": "Failed to browse device",
|
||||
"pairing_failed": "Pairing failed",
|
||||
"accept_failed": "Failed to accept pairing",
|
||||
"reject_failed": "Failed to reject pairing",
|
||||
"unpair_failed": "Unpair failed",
|
||||
"no_backend": "No backend",
|
||||
"cli_failed": "Command failed"
|
||||
},
|
||||
"panel": {
|
||||
"battery": "Battery",
|
||||
"devices_connected": "{connected} connected • {paired} paired",
|
||||
"title": "Phone Connect",
|
||||
"empty": "No devices found. Pair a device in KDE Connect.",
|
||||
"image_path": "Custom Image",
|
||||
"network": "Network",
|
||||
"no_media": "No media playing",
|
||||
"no_recent_images": "No recent images found",
|
||||
"devices_connected": "{connected} connected • {paired} paired",
|
||||
"now_playing": "Now Playing",
|
||||
"paired": "Paired",
|
||||
"pairing": "Pairing",
|
||||
"recent_images": "Recent Images",
|
||||
"no_media": "No media playing",
|
||||
"image_path": "Custom Image",
|
||||
"sms": "Send SMS",
|
||||
"sms_dest": "Phone number",
|
||||
"sms_msg": "Message",
|
||||
"sms_send": "Send",
|
||||
"title": "Phone Connect",
|
||||
"battery": "Battery",
|
||||
"network": "Network",
|
||||
"pairing": "Pairing",
|
||||
"type": "Type",
|
||||
"unknown": "unknown",
|
||||
"unpaired": "Unpaired"
|
||||
},
|
||||
"settings": {
|
||||
"custom_image": {
|
||||
"description": "Set a custom image for the selected device. Leave empty for default icon.",
|
||||
"label": "Device Image"
|
||||
},
|
||||
"device_alias": {
|
||||
"description": "Custom display name for the selected device.",
|
||||
"label": "Device Alias"
|
||||
},
|
||||
"enable_charging_animation": {
|
||||
"description": "Highlight the bar widget when the device is charging.",
|
||||
"label": "Show Charging Fill"
|
||||
},
|
||||
"enable_clipboard_action": {
|
||||
"description": "Show a quick action to send the clipboard to the device.",
|
||||
"label": "Show Clipboard Action"
|
||||
},
|
||||
"language": {
|
||||
"description": "Display language",
|
||||
"en": "English",
|
||||
"label": "Language",
|
||||
"zh_hans": "简体中文"
|
||||
},
|
||||
"max_recent_images": {
|
||||
"description": "Number of recent images to display.",
|
||||
"label": "Max Recent Images"
|
||||
},
|
||||
"panel_placement": {
|
||||
"attached": "Attached to bar",
|
||||
"description": "How the details panel opens: attached to the bar, or floating.",
|
||||
"floating": "Floating (center)",
|
||||
"label": "Panel Placement",
|
||||
"widget": "Below widget (floating)"
|
||||
},
|
||||
"scan_subdirectories": {
|
||||
"description": "Recursively scan subdirectories of the recent images path.",
|
||||
"label": "Scan Subdirectories"
|
||||
},
|
||||
"show_device_placeholder": {
|
||||
"description": "Show the device graphic in the details panel.",
|
||||
"label": "Show Device Placeholder"
|
||||
},
|
||||
"show_ongoing_media": {
|
||||
"description": "Show media currently playing on the phone.",
|
||||
"label": "Show Ongoing Media"
|
||||
},
|
||||
"state_update_interval": {
|
||||
"description": "Seconds between automatic device state refreshes. 0 disables auto-refresh.",
|
||||
"label": "State Update Interval"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"connected": "Connected",
|
||||
"no_backend": "KDE Connect not running",
|
||||
"no_devices": "No devices",
|
||||
"not_paired": "Not paired",
|
||||
"offline": "Offline",
|
||||
"unavailable": "Unavailable"
|
||||
"paired": "Paired",
|
||||
"unpaired": "Unpaired",
|
||||
"unknown": "unknown"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"settings": {
|
||||
"state_update_interval": {
|
||||
"label": "状态刷新间隔",
|
||||
"description": "自动刷新设备状态的间隔秒数。0 表示禁用。"
|
||||
},
|
||||
"enable_charging_animation": {
|
||||
"label": "充电高亮",
|
||||
"description": "设备充电时高亮显示栏部件。"
|
||||
},
|
||||
"custom_image": {
|
||||
"label": "设备头像",
|
||||
"description": "选中设备后在此设置自定义头像图片。留空恢复默认图标。"
|
||||
},
|
||||
"device_alias": {
|
||||
"label": "设备别名",
|
||||
"description": "当前选中设备的自定义显示名称。"
|
||||
},
|
||||
"language": {
|
||||
"label": "界面语言",
|
||||
"description": "显示语言。",
|
||||
"en": "English",
|
||||
"zh-hans": "简体中文"
|
||||
},
|
||||
"enable_clipboard_action": {
|
||||
"label": "显示剪贴板操作",
|
||||
"description": "显示一键发送剪贴板到设备的快捷操作。"
|
||||
},
|
||||
"panel_placement": {
|
||||
"label": "面板弹出方式",
|
||||
"description": "详情面板的弹出方式。",
|
||||
"attached": "贴合栏",
|
||||
"floating": "悬浮居中",
|
||||
"widget": "部件下方悬浮"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"unavailable": "不可用",
|
||||
"no_devices": "无设备",
|
||||
"offline": "离线",
|
||||
"connected": "已连接",
|
||||
"not_paired": "未配对",
|
||||
"no_backend": "KDE Connect 未运行"
|
||||
},
|
||||
"action": {
|
||||
"ring": "响铃",
|
||||
"ping": "Ping",
|
||||
"clipboard": "剪贴板",
|
||||
"share": "分享",
|
||||
"browse": "浏览",
|
||||
"sms": "短信",
|
||||
"pair": "配对",
|
||||
"accept": "接受",
|
||||
"reject": "拒绝",
|
||||
"unpair": "取消配对",
|
||||
"refresh": "刷新",
|
||||
"switch": "切换设备"
|
||||
},
|
||||
"notify": {
|
||||
"ringing": "正在响铃 {name}...",
|
||||
"ping_sent": "已向 {name} 发送 Ping",
|
||||
"clipboard_sent": "剪贴板已发送",
|
||||
"pairing_sent": "已发送配对请求",
|
||||
"paired": "设备已配对",
|
||||
"unpaired": "设备已取消配对",
|
||||
"opening_browser": "正在打开文件浏览器...",
|
||||
"sms_sent": "短信已发送"
|
||||
},
|
||||
"error": {
|
||||
"ring_failed": "响铃失败",
|
||||
"ping_failed": "发送 Ping 失败",
|
||||
"clipboard_failed": "发送剪贴板失败",
|
||||
"share_failed": "分享失败",
|
||||
"browse_failed": "浏览设备失败",
|
||||
"pairing_failed": "配对失败",
|
||||
"accept_failed": "接受配对失败",
|
||||
"reject_failed": "拒绝配对失败",
|
||||
"unpair_failed": "取消配对失败",
|
||||
"no_backend": "无后端",
|
||||
"cli_failed": "命令失败"
|
||||
},
|
||||
"panel": {
|
||||
"title": "手机连接",
|
||||
"empty": "未找到设备。请在 KDE Connect 中配对设备。",
|
||||
"devices_connected": "已连接 {connected} · 已配对 {paired}",
|
||||
"now_playing": "正在播放",
|
||||
"no_media": "无媒体播放",
|
||||
"image_path": "自定义图片",
|
||||
"sms": "发送短信",
|
||||
"sms_dest": "手机号码",
|
||||
"sms_msg": "短信内容",
|
||||
"sms_send": "发送",
|
||||
"battery": "电量",
|
||||
"network": "网络",
|
||||
"pairing": "配对",
|
||||
"type": "类型",
|
||||
"paired": "已配对",
|
||||
"unpaired": "未配对",
|
||||
"unknown": "未知"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user