feat: show a crossed-out camera when another app uses it

This commit is contained in:
Felitendo committed 2026-09-28 14:34:40 +02:00
1 parent ac38638dd4
commit 5eb9ea7438
29 files changed
+1940 -1235

No files matched your search

+116 -86
View File
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: face-unlock 1.0.1\n"
"Report-Msgid-Bugs-To: https://github.com/LoonixTools/face-unlock/issues\n"
"POT-Creation-Date: 2026-09-26 20:28+0200\n"
"POT-Creation-Date: 2026-09-28 14:32+0200\n"
"PO-Revision-Date: 2026-09-24 12:00+0200\n"
"Last-Translator: Felitendo\n"
"Language-Team: Chinese (simplified)\n"
@@ -53,9 +53,9 @@ msgstr "没有添加人脸。"
msgid "First, set up your face."
msgstr "请先设置你的人脸。"
#: src/face-unlock:100 src/face-unlock:145 src/lib/menu.sh:527
#: src/face-unlock:100 src/face-unlock:150 src/lib/menu.sh:527
#: src/lib/menu.sh:531 src/lib/menu.sh:537 src/lib/menu.sh:539
#: src/lib/system.sh:399 src/lib/system.sh:405
#: src/lib/system.sh:409 src/lib/system.sh:415
msgid "Could not save the setting."
msgstr "无法保存设置。"
@@ -75,15 +75,15 @@ msgstr "无法启用显示气泡的 GNOME 扩展。"
msgid "Log out and back in once: then GNOME shows the bubble too."
msgstr "请注销并重新登录一次:之后 GNOME 也会显示气泡。"
#: src/face-unlock:131
#: src/face-unlock:135
msgid "Pick your lock screen in the window."
msgstr "请在窗口中选择锁屏。"
#: src/face-unlock:132
#: src/face-unlock:136
msgid "No lock screen picked. You can do it later under Settings."
msgstr "未选择锁屏。之后可以在设置中选择。"
#: src/face-unlock:135
#: src/face-unlock:140
#, sh-printf-format
msgid ""
"The lock screen (%s) takes your face too. If it does not scan when you come "
@@ -91,104 +91,104 @@ msgid ""
msgstr ""
"锁屏(%s)也接受你的人脸。如果你回来时它没有扫描,请在空的密码框中按 Enter。"
#: src/face-unlock:138
#: src/face-unlock:143
msgid "Face unlock is on. Lock the screen and look at it to try."
msgstr "人脸解锁已开启。锁定屏幕并看着它来试试。"
#: src/face-unlock:140
#: src/face-unlock:145
msgid "It can do sudo and admin prompts too. See Settings."
msgstr "它也可以用于 sudo 和管理员授权。见“设置”。"
#: src/face-unlock:156
#: src/face-unlock:161
msgid "Face unlock is off. Your faces are kept; delete them under Faces."
msgstr "人脸解锁已关闭。你的人脸会保留;可在“人脸”中删除。"
#: src/face-unlock:170 src/lib/daemon.sh:109
#: src/face-unlock:175 src/lib/daemon.sh:109
msgid "No face is set up yet."
msgstr "尚未设置任何人脸。"
#: src/face-unlock:174 src/lib/menu.sh:180 src/lib/menu.sh:695
#: src/face-unlock:179 src/lib/menu.sh:180 src/lib/menu.sh:701
msgid "on"
msgstr "开"
#: src/face-unlock:174 src/lib/menu.sh:182 src/lib/menu.sh:192
#: src/lib/menu.sh:696
#: src/face-unlock:179 src/lib/menu.sh:182 src/lib/menu.sh:192
#: src/lib/menu.sh:702
msgid "off"
msgstr "关"
#: src/face-unlock:176 src/lib/menu.sh:713
#: src/face-unlock:181 src/lib/menu.sh:719
#, sh-printf-format
msgid "%s samples, %s learned"
msgstr "%s 个样本,已学习 %s 个"
#: src/face-unlock:182
#: src/face-unlock:187
#, sh-printf-format
msgid "Which face? See `%s faces` for the ids."
msgstr "哪张人脸?用 `%s faces` 查看 ID。"
#: src/face-unlock:186
#: src/face-unlock:191
msgid "Deleted."
msgstr "已删除。"
#: src/face-unlock:197
#: src/face-unlock:202
msgid "Usage: face-unlock [command]"
msgstr "用法:face-unlock [命令]"
#: src/face-unlock:199
#: src/face-unlock:204
msgid "Commands:"
msgstr "命令:"
#: src/face-unlock:200
#: src/face-unlock:205
msgid "Turn face unlock on"
msgstr "开启人脸解锁"
#: src/face-unlock:201
#: src/face-unlock:206
msgid "Turn it off (faces are kept)"
msgstr "关闭(保留人脸)"
#: src/face-unlock:202 src/lib/menu.sh:779
#: src/face-unlock:207 src/lib/menu.sh:787
msgid "Add a face"
msgstr "添加人脸"
#: src/face-unlock:203
#: src/face-unlock:208
msgid "List the faces"
msgstr "列出人脸"
#: src/face-unlock:204
#: src/face-unlock:209
msgid "Delete a face"
msgstr "删除人脸"
#: src/face-unlock:205
#: src/face-unlock:210
msgid "Look at the camera and see what it sees"
msgstr "看着摄像头,查看它看到的画面"
#: src/face-unlock:206
#: src/face-unlock:211
msgid "Lock the screen"
msgstr "锁定屏幕"
#: src/face-unlock:207
#: src/face-unlock:212
msgid "Show what is on"
msgstr "显示已开启的功能"
#: src/face-unlock:208
#: src/face-unlock:213
msgid "Show this help"
msgstr "显示此帮助"
#: src/face-unlock:209
#: src/face-unlock:214
msgid "Show the version"
msgstr "显示版本"
#: src/face-unlock:211
#: src/face-unlock:216
msgid "Without a command an interactive menu is shown."
msgstr "不带命令时显示交互式菜单。"
#: src/face-unlock:230
#: src/face-unlock:235
msgid ""
"Run this as your own user, not as root. It asks for your password when it "
"needs to."
msgstr "请以你自己的用户运行,不要用 root。需要时会询问你的密码。"
#: src/face-unlock:253 src/lib/system.sh:105
#: src/face-unlock:258 src/lib/system.sh:105
#, sh-printf-format
msgid "Unknown command: %s"
msgstr "未知命令:%s"
@@ -261,102 +261,106 @@ msgstr "尝试次数过多,人脸解锁已暂停。请用密码解锁一次。
msgid "The camera could not be used."
msgstr "无法使用摄像头。"
#: src/lib/daemon.sh:111 src/lib/menu.sh:273
#: src/lib/daemon.sh:111
msgid "Another app is using the camera."
msgstr "另一个应用正在使用摄像头。"
#: src/lib/daemon.sh:112 src/lib/menu.sh:273
msgid "The recognition models are missing. Reinstall the package."
msgstr "缺少识别模型。请重新安装软件包。"
#: src/lib/daemon.sh:112
#: src/lib/daemon.sh:113
msgid "The lid is closed."
msgstr "笔记本盖子已合上。"
#: src/lib/daemon.sh:113
#: src/lib/daemon.sh:114
msgid "The camera is busy with another scan."
msgstr "摄像头正忙于另一次扫描。"
#: src/lib/daemon.sh:114
#: src/lib/daemon.sh:115
msgid "The face unlock service is not running."
msgstr "人脸解锁服务未运行。"
#: src/lib/daemon.sh:116
#: src/lib/daemon.sh:117
msgid "Not allowed."
msgstr "不允许。"
#: src/lib/daemon.sh:120
#: src/lib/daemon.sh:121
msgid "No password window? Start a polkit agent, for example hyprpolkitagent."
msgstr "没有出现密码窗口?请启动一个 polkit 代理,例如 hyprpolkitagent。"
#: src/lib/daemon.sh:123
#: src/lib/daemon.sh:124
#, sh-printf-format
msgid "Something went wrong (%s)."
msgstr "出错了(%s)。"
#: src/lib/daemon.sh:134
#: src/lib/daemon.sh:135
msgid "Look at the camera. Blink once, or turn your head a little."
msgstr "看着摄像头。眨一下眼,或稍微转一下头。"
#: src/lib/daemon.sh:144
#: src/lib/daemon.sh:145
msgid "Face found."
msgstr "找到人脸。"
#: src/lib/daemon.sh:148
#: src/lib/daemon.sh:149
msgid "Recognised. Now blink once, or turn your head a little."
msgstr "已识别。现在眨一下眼,或稍微转一下头。"
#: src/lib/daemon.sh:149
#: src/lib/daemon.sh:150
msgid "Look at the screen."
msgstr "请看屏幕。"
#: src/lib/daemon.sh:150
#: src/lib/daemon.sh:151
msgid "Move closer to the camera."
msgstr "请靠近摄像头。"
#: src/lib/daemon.sh:151
#: src/lib/daemon.sh:152
msgid "It is too dark to see your face."
msgstr "太暗了,看不清你的脸。"
#: src/lib/daemon.sh:160
#: src/lib/daemon.sh:161
msgid "match"
msgstr "匹配度"
#: src/lib/daemon.sh:160
#: src/lib/daemon.sh:161
msgid "turn"
msgstr "转动"
#: src/lib/daemon.sh:161
#: src/lib/daemon.sh:162
msgid "eyes"
msgstr "眼睛"
#: src/lib/daemon.sh:162
#: src/lib/daemon.sh:163
msgid "depth"
msgstr "深度"
#: src/lib/daemon.sh:162 src/lib/daemon.sh:171
#: src/lib/daemon.sh:163 src/lib/daemon.sh:172
msgid "blink"
msgstr "眨眼"
#: src/lib/daemon.sh:163
#: src/lib/daemon.sh:164
msgid "glare"
msgstr "反光"
#: src/lib/daemon.sh:163
#: src/lib/daemon.sh:164
msgid "edge"
msgstr "边缘"
#: src/lib/daemon.sh:172
#: src/lib/daemon.sh:173
msgid "head turn"
msgstr "转头"
#: src/lib/daemon.sh:174
#: src/lib/daemon.sh:175
#, sh-printf-format
msgid "Recognised as %s (match %s) in %s ms."
msgstr "识别为 %s(匹配度 %s),用时 %s 毫秒。"
#: src/lib/daemon.sh:175
#: src/lib/daemon.sh:176
#, sh-printf-format
msgid "Sign of life: %s"
msgstr "活体迹象:%s"
#: src/lib/daemon.sh:180
#: src/lib/daemon.sh:181
msgid ""
"That was too many tries. Face unlock is paused until you unlock with your "
"password."
@@ -428,7 +432,8 @@ msgstr "你自己的"
msgid ""
"No polkit agent is running, so no password window can open. Adding a face "
"and the admin prompts need one."
msgstr "没有运行 polkit 代理,所以无法打开密码窗口。添加人脸和管理员授权都需要它。"
msgstr ""
"没有运行 polkit 代理,所以无法打开密码窗口。添加人脸和管理员授权都需要它。"
#: src/lib/menu.sh:226
msgid "Face unlock"
@@ -446,8 +451,8 @@ msgstr "未运行"
msgid "Turning face unlock on again starts it."
msgstr "重新开启人脸解锁即可启动它。"
#: src/lib/menu.sh:244 src/lib/menu.sh:246 src/lib/menu.sh:691
#: src/lib/menu.sh:780
#: src/lib/menu.sh:244 src/lib/menu.sh:246 src/lib/menu.sh:697
#: src/lib/menu.sh:788
msgid "Faces"
msgstr "人脸"
@@ -688,7 +693,7 @@ msgstr "图片或文件夹:"
msgid "Not found: %s"
msgstr "未找到:%s"
#: src/lib/menu.sh:590 src/lib/menu.sh:781
#: src/lib/menu.sh:590 src/lib/menu.sh:789
msgid "Settings"
msgstr "设置"
@@ -701,36 +706,36 @@ msgid "for all users, asks for your password"
msgstr "对所有用户生效,需要你的密码"
#. TRANSLATORS: keep the letters, they are the keys.
#: src/lib/menu.sh:693
#: src/lib/menu.sh:699
msgid "Up/Down: select, Space: on/off, r: rename, d: delete, a: add, q: back"
msgstr "上/下:选择,空格:开/关,r:重命名,d:删除,a:添加,q:返回"
#: src/lib/menu.sh:694
#: src/lib/menu.sh:700
msgid "No face is set up yet. Press a to add one."
msgstr "尚未设置任何人脸。按 a 添加。"
#: src/lib/menu.sh:740
#: src/lib/menu.sh:748
msgid "New name:"
msgstr "新名称:"
#: src/lib/menu.sh:747
#: src/lib/menu.sh:755
#, sh-printf-format
msgid "Delete \"%s\"?"
msgstr "删除“%s”?"
#: src/lib/menu.sh:778
#: src/lib/menu.sh:786
msgid "Turn face unlock on or off"
msgstr "开启或关闭人脸解锁"
#: src/lib/menu.sh:782
#: src/lib/menu.sh:790
msgid "Try it"
msgstr "试一试"
#: src/lib/menu.sh:784
#: src/lib/menu.sh:792
msgid "Install a polkit agent"
msgstr "安装 polkit 代理"
#: src/lib/menu.sh:786
#: src/lib/menu.sh:794
msgid "Quit"
msgstr "退出"
@@ -800,43 +805,43 @@ msgstr "polkit 代理没有启动。请查看:systemctl --user status %s"
msgid "The polkit agent is running. Password windows open now."
msgstr "polkit 代理正在运行。现在可以打开密码窗口了。"
#: src/lib/system.sh:376 src/lib/system.sh:379
#: src/lib/system.sh:386 src/lib/system.sh:389
#, sh-printf-format
msgid "To lock with it, add this to %s, and set %s in %s:"
msgstr "要用它锁屏,请把这行加入 %s,并把 %s 写进 %s:"
#: src/lib/system.sh:384
#: src/lib/system.sh:394
#, sh-printf-format
msgid "To lock with it, add this to the binds in %s, and use %s in swayidle:"
msgstr "要用它锁屏,请把这行加入 %s 的 binds,并在 swayidle 中使用 %s:"
#: src/lib/system.sh:388
#: src/lib/system.sh:398
#, sh-printf-format
msgid "To lock with it, run %s where your lock screen is started now."
msgstr "要用它锁屏,请在现在启动锁屏的地方运行 %s。"
#: src/lib/system.sh:401
#: src/lib/system.sh:411
msgid "You lock with face-unlock's lock screen now."
msgstr "现在用 face-unlock 的锁屏锁定。"
#: src/lib/system.sh:408
#: src/lib/system.sh:418
msgid ""
"hyprlock shows what face unlock is doing at the top, from the next time it "
"locks."
msgstr "从下次锁屏起,hyprlock 会在顶部显示 face unlock 正在做什么。"
#: src/lib/system.sh:409
#: src/lib/system.sh:419
#, sh-printf-format
msgid "Could not add the line to %s."
msgstr "无法把这行加入 %s。"
#: src/lib/system.sh:410
#: src/lib/system.sh:420
msgid ""
"Your lock screen stays as it is. Press Enter on the empty password field to "
"scan."
msgstr "你的锁屏保持不变。在空密码框中按 Enter 即可扫描。"
#: src/lib/system.sh:411
#: src/lib/system.sh:421
#, sh-printf-format
msgid "hyprlock has no %s, so it cannot show the text."
msgstr "hyprlock 没有 %s,所以无法显示文字。"
@@ -933,19 +938,23 @@ msgstr "靠近一点"
msgid "Too dark"
msgstr "太暗了"
#: src/agent/bubblecontroller.cpp:124
#: src/agent/bubblecontroller.cpp:127
msgid "Camera in use"
msgstr "摄像头被占用"
#: src/agent/bubblecontroller.cpp:136
msgid "Use your password"
msgstr "请使用密码"
#: src/agent/bubblecontroller.cpp:130
#: src/agent/bubblecontroller.cpp:142
msgid "Not recognized"
msgstr "未识别"
#: src/agent/bubblecontroller.cpp:132
#: src/agent/bubblecontroller.cpp:144
msgid "Try again and blink"
msgstr "再试一次并眨眼"
#: src/agent/bubblecontroller.cpp:134
#: src/agent/bubblecontroller.cpp:146
msgid "Camera unavailable"
msgstr "摄像头不可用"
@@ -1034,31 +1043,31 @@ msgstr "密码错误"
msgid "Face recognized"
msgstr "已识别面容"
#: src/agent/main.cpp:244
#: src/agent/main.cpp:250
msgid "Face unlock for the lock screen, sudo and admin prompts"
msgstr "用于锁屏、sudo 和管理员授权的人脸解锁"
#: src/agent/main.cpp:247
#: src/agent/main.cpp:253
msgid "Set up a face."
msgstr "设置一张人脸。"
#: src/agent/main.cpp:248
#: src/agent/main.cpp:254
msgid "What to call the new face."
msgstr "新人脸的名称。"
#: src/agent/main.cpp:249
#: src/agent/main.cpp:255
msgid "Lock the screen."
msgstr "锁定屏幕。"
#: src/agent/main.cpp:250
#: src/agent/main.cpp:256
msgid "Play the bubble's animations once."
msgstr "播放一次气泡动画。"
#: src/agent/main.cpp:252
#: src/agent/main.cpp:258
msgid "Bubble style for the demo: full or minimal."
msgstr "演示用的气泡样式:full 或 minimal。"
#: src/agent/main.cpp:253
#: src/agent/main.cpp:259
msgid "Ask which lock screen to use, and print the answer."
msgstr "询问使用哪个锁屏,并输出答案。"
@@ -1197,3 +1206,24 @@ msgstr "看向摄像头或输入密码"
#: src/agent/qml/LockScreen.qml:195
msgid "Type your password"
msgstr "输入密码"
#~ msgid ""
#~ "sudo in an SSH session takes your face too, if you sit at this computer. "
#~ "Off by default: the person at the camera may not be the one typing."
#~ msgstr ""
#~ "如果你坐在这台电脑前,SSH 会话中的 sudo 也用你的脸。默认关闭:摄像头前的人"
#~ "不一定是正在输入的人。"
#~ msgid ""
#~ "When another app uses the camera, for example in a video call, no bubble "
#~ "shows and you type your password as usual. Off: the bubble shows a camera "
#~ "with a line through it."
#~ msgstr ""
#~ "其他应用正在使用摄像头时(例如视频通话),不显示气泡,你照常输入密码。关"
#~ "闭:气泡显示一个被划掉的摄像头。"
#~ msgid "In SSH sessions"
#~ msgstr "SSH 会话中也可用"
#~ msgid "Quiet while the camera is in use"
#~ msgstr "摄像头被占用时不显示"