feat: take the face in the lock screens of hyprland and niri

This commit is contained in:
Felitendo committed 2026-09-26 19:35:04 +02:00
1 parent 2a9b0d3f91
commit c693ca216c
27 files changed
+1850 -1219

No files matched your search

+111 -83
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 19:33+0200\n"
"POT-Creation-Date: 2026-09-26 19:34+0200\n"
"PO-Revision-Date: 2026-09-24 12:00+0200\n"
"Last-Translator: Felitendo\n"
"Language-Team: Chinese (simplified)\n"
@@ -53,8 +53,8 @@ msgstr "没有添加人脸。"
msgid "First, set up your face."
msgstr "请先设置你的人脸。"
#: src/face-unlock:100 src/face-unlock:131 src/lib/menu.sh:447
#: src/lib/menu.sh:451 src/lib/menu.sh:457 src/lib/menu.sh:459
#: src/face-unlock:100 src/face-unlock:139 src/lib/menu.sh:466
#: src/lib/menu.sh:470 src/lib/menu.sh:476 src/lib/menu.sh:478
msgid "Could not save the setting."
msgstr "无法保存设置。"
@@ -66,108 +66,116 @@ msgstr "无法启动锁屏代理。"
msgid "No systemd user session, so the lock screen agent was not started."
msgstr "没有 systemd 用户会话,因此未启动锁屏代理。"
#: src/face-unlock:118
#: src/face-unlock:123
msgid "Could not switch on the GNOME extension that shows the bubble."
msgstr "无法启用显示气泡的 GNOME 扩展。"
#: src/face-unlock:119
#: src/face-unlock:124
msgid "Log out and back in once: then GNOME shows the bubble too."
msgstr "请注销并重新登录一次:之后 GNOME 也会显示气泡。"
#: src/face-unlock:124
#: src/face-unlock:129
#, sh-printf-format
msgid ""
"The lock screen (%s) takes your face too. If it does not scan when you come "
"back, press Enter on the empty password field."
msgstr ""
"锁屏(%s)也接受你的人脸。如果你回来时它没有扫描,请在空的密码框中按 Enter。"
#: src/face-unlock:132
msgid "Face unlock is on. Lock the screen and look at it to try."
msgstr "人脸解锁已开启。锁定屏幕并看着它来试试。"
#: src/face-unlock:126
#: src/face-unlock:134
msgid "It can do sudo and admin prompts too. See Settings."
msgstr "它也可以用于 sudo 和管理员授权。见“设置”。"
#: src/face-unlock:142
#: src/face-unlock:150
msgid "Face unlock is off. Your faces are kept; delete them under Faces."
msgstr "人脸解锁已关闭。你的人脸会保留;可在“人脸”中删除。"
#: src/face-unlock:156 src/lib/daemon.sh:109
#: src/face-unlock:164 src/lib/daemon.sh:109
msgid "No face is set up yet."
msgstr "尚未设置任何人脸。"
#: src/face-unlock:160 src/lib/menu.sh:180 src/lib/menu.sh:607
#: src/face-unlock:168 src/lib/menu.sh:180 src/lib/menu.sh:628
msgid "on"
msgstr "开"
#: src/face-unlock:160 src/lib/menu.sh:182 src/lib/menu.sh:192
#: src/lib/menu.sh:608
#: src/face-unlock:168 src/lib/menu.sh:182 src/lib/menu.sh:192
#: src/lib/menu.sh:629
msgid "off"
msgstr "关"
#: src/face-unlock:162 src/lib/menu.sh:625
#: src/face-unlock:170 src/lib/menu.sh:646
#, sh-printf-format
msgid "%s samples, %s learned"
msgstr "%s 个样本,已学习 %s 个"
#: src/face-unlock:168
#: src/face-unlock:176
#, sh-printf-format
msgid "Which face? See `%s faces` for the ids."
msgstr "哪张人脸?用 `%s faces` 查看 ID。"
#: src/face-unlock:172
#: src/face-unlock:180
msgid "Deleted."
msgstr "已删除。"
#: src/face-unlock:183
#: src/face-unlock:191
msgid "Usage: face-unlock [command]"
msgstr "用法:face-unlock [命令]"
#: src/face-unlock:185
#: src/face-unlock:193
msgid "Commands:"
msgstr "命令:"
#: src/face-unlock:186
#: src/face-unlock:194
msgid "Turn face unlock on"
msgstr "开启人脸解锁"
#: src/face-unlock:187
#: src/face-unlock:195
msgid "Turn it off (faces are kept)"
msgstr "关闭(保留人脸)"
#: src/face-unlock:188 src/lib/menu.sh:691
#: src/face-unlock:196 src/lib/menu.sh:712
msgid "Add a face"
msgstr "添加人脸"
#: src/face-unlock:189
#: src/face-unlock:197
msgid "List the faces"
msgstr "列出人脸"
#: src/face-unlock:190
#: src/face-unlock:198
msgid "Delete a face"
msgstr "删除人脸"
#: src/face-unlock:191
#: src/face-unlock:199
msgid "Look at the camera and see what it sees"
msgstr "看着摄像头,查看它看到的画面"
#: src/face-unlock:192
#: src/face-unlock:200
msgid "Show what is on"
msgstr "显示已开启的功能"
#: src/face-unlock:193
#: src/face-unlock:201
msgid "Show this help"
msgstr "显示此帮助"
#: src/face-unlock:194
#: src/face-unlock:202
msgid "Show the version"
msgstr "显示版本"
#: src/face-unlock:196
#: src/face-unlock:204
msgid "Without a command an interactive menu is shown."
msgstr "不带命令时显示交互式菜单。"
#: src/face-unlock:215
#: src/face-unlock:223
msgid ""
"Run this as your own user, not as root. It asks for your password when it "
"needs to."
msgstr "请以你自己的用户运行,不要用 root。需要时会询问你的密码。"
#: src/face-unlock:237 src/lib/system.sh:93
#: src/face-unlock:245 src/lib/system.sh:101
#, sh-printf-format
msgid "Unknown command: %s"
msgstr "未知命令:%s"
@@ -240,7 +248,7 @@ msgstr "尝试次数过多,人脸解锁已暂停。请用密码解锁一次。
msgid "The camera could not be used."
msgstr "无法使用摄像头。"
#: src/lib/daemon.sh:111 src/lib/menu.sh:262
#: src/lib/daemon.sh:111 src/lib/menu.sh:265
msgid "The recognition models are missing. Reinstall the package."
msgstr "缺少识别模型。请重新安装软件包。"
@@ -342,11 +350,11 @@ msgstr "尝试次数过多。人脸解锁已暂停,直到你用密码解锁。
msgid "[y/N]"
msgstr "[y/N]"
#: src/lib/menu.sh:172 src/lib/menu.sh:510
#: src/lib/menu.sh:172 src/lib/menu.sh:531
msgid "ON"
msgstr "开启"
#: src/lib/menu.sh:174 src/lib/menu.sh:511
#: src/lib/menu.sh:174 src/lib/menu.sh:532
msgid "OFF"
msgstr "关闭"
@@ -387,7 +395,7 @@ msgstr "慢"
msgid "%s seconds"
msgstr "%s 秒"
#: src/lib/menu.sh:202 src/lib/menu.sh:422
#: src/lib/menu.sh:202 src/lib/menu.sh:441
msgid "automatic"
msgstr "自动"
@@ -407,8 +415,8 @@ msgstr "未运行"
msgid "Turning face unlock on again starts it."
msgstr "重新开启人脸解锁即可启动它。"
#: src/lib/menu.sh:236 src/lib/menu.sh:238 src/lib/menu.sh:603
#: src/lib/menu.sh:692
#: src/lib/menu.sh:236 src/lib/menu.sh:238 src/lib/menu.sh:624
#: src/lib/menu.sh:713
msgid "Faces"
msgstr "人脸"
@@ -440,99 +448,119 @@ msgstr "sudo"
msgid "Admin prompts"
msgstr "管理员授权"
#: src/lib/menu.sh:254 src/lib/menu.sh
#: src/lib/menu.sh:255 src/lib/menu.sh
msgid "Lock screens"
msgstr "锁屏"
#: src/lib/menu.sh:257 src/lib/menu.sh
msgid "Photo check"
msgstr "照片检测"
#: src/lib/menu.sh:257
#: src/lib/menu.sh:260
msgid "Paused"
msgstr "已暂停"
#: src/lib/menu.sh:257
#: src/lib/menu.sh:260
#, sh-printf-format
msgid "for %d more minutes, or until the password is used"
msgstr "还有 %d 分钟,或直到使用密码"
#: src/lib/menu.sh:259
#: src/lib/menu.sh:262
msgid "Last unlock"
msgstr "上次解锁"
#: src/lib/menu.sh:265
#: src/lib/menu.sh:268
msgid "The lock screen agent is not running."
msgstr "锁屏代理没有运行。"
#: src/lib/menu.sh:308
#: src/lib/menu.sh:314
msgid ""
"On GNOME a small GNOME extension shows the bubble. Turning face unlock on "
"switches it on."
msgstr ""
"在 GNOME 上,由一个小的 GNOME 扩展显示气泡。开启人脸解锁时会一并开启它。"
#: src/lib/menu.sh:313
#: src/lib/menu.sh:318
msgid ""
"Scans when you come back to hyprlock or swaylock and opens them. Any other "
"lock screen scans when you press Enter on the empty password field."
msgstr ""
"回到 hyprlock 或 swaylock 时会扫描并打开它们。其他锁屏在空的密码框中按 Enter "
"时扫描。"
#: src/lib/menu.sh:323
msgid ""
"Unlocks the lock screen when it sees your face. Off: only your password "
"works there."
msgstr "看到你的脸时解锁锁屏。关闭:锁屏只能用密码。"
#: src/lib/menu.sh:314
#: src/lib/menu.sh:324
msgid ""
"Scans when you press a key or move the mouse on the lock screen, and when "
"the computer wakes up."
msgstr "在锁屏上按键或移动鼠标时,以及电脑唤醒时扫描。"
#: src/lib/menu.sh:315
#: src/lib/menu.sh:325
msgid ""
"Scans as soon as the screen locks. Off by default: if you lock it yourself, "
"it would unlock again right away."
msgstr "屏幕一锁定就扫描。默认关闭:如果是你自己锁的屏,它会马上又解锁。"
#: src/lib/menu.sh:316
#: src/lib/menu.sh:326
msgid ""
"sudo takes your face instead of the password. No match: you type the "
"password as usual."
msgstr "sudo 用你的脸代替密码。不匹配时,照常输入密码。"
#: src/lib/menu.sh:317
#: src/lib/menu.sh:327
#, sh-printf-format
msgid ""
"The lock screen takes your face in its password check. Press Enter on the "
"empty field to scan. Found here: %s."
msgstr ""
"锁屏在检查密码时也接受你的人脸。在空白框中按 Enter 即可扫描。此处找到:%s。"
#: src/lib/menu.sh:328
msgid ""
"The password windows of your desktop and apps, for example when you install "
"software. No match: you type the password."
msgstr "桌面和应用的密码窗口,例如安装软件时。不匹配时,输入密码即可。"
#: src/lib/menu.sh:318
#: src/lib/menu.sh:329
msgid ""
"You have to blink or turn your head a little. This also stops printed photos."
msgstr "你需要眨眼或稍微转头。这也能挡住打印的照片。"
#: src/lib/menu.sh:319
#: src/lib/menu.sh:330
msgid "No check at all. Only for trying out a camera."
msgstr "完全不检测。仅用于试用摄像头。"
#: src/lib/menu.sh:320
#: src/lib/menu.sh:331
msgid ""
"Stops photos on a phone, a tablet or glossy paper. You do not have to blink. "
"A matte printed photo can get through."
msgstr "挡住手机、平板或光面纸上的照片。无需眨眼。哑光纸打印的照片可能会通过。"
#: src/lib/menu.sh:321
#: src/lib/menu.sh:332
msgid ""
"Fewer wrong matches, but it may not know you with glasses or in bad light."
msgstr "误认更少,但戴眼镜或光线不好时可能认不出你。"
#: src/lib/menu.sh:322
#: src/lib/menu.sh:333
msgid "Knows you more easily, but also somebody who looks a lot like you."
msgstr "更容易认出你,但也更容易认出和你长得很像的人。"
#: src/lib/menu.sh:323
#: src/lib/menu.sh:334
msgid "The default. Right for most people."
msgstr "默认值。适合大多数人。"
#: src/lib/menu.sh:324
#: src/lib/menu.sh:335
msgid ""
"Your eyes have to be open and on the screen. So it does not unlock while you "
"look away or sleep."
msgstr "你的眼睛必须睁开并看着屏幕。这样你看向别处或睡着时不会解锁。"
#: src/lib/menu.sh:325
#: src/lib/menu.sh:336
msgid ""
"Automatic takes the first normal camera. After a change, set up your face "
"again. An infrared camera needs its light on (linux-enable-ir-emitter)."
@@ -540,94 +568,94 @@ msgstr ""
"“自动”会使用第一个普通摄像头。更换后请重新设置人脸。红外摄像头需要打开它的补"
"光灯(linux-enable-ir-emitter)。"
#: src/lib/menu.sh:326
#: src/lib/menu.sh:337
msgid "How long the camera looks for your face before it gives up."
msgstr "摄像头寻找你的脸多久后放弃。"
#: src/lib/menu.sh:327
#: src/lib/menu.sh:338
msgid ""
"After a sure match it keeps how you look now. So a new haircut or glasses "
"need no new setup."
msgstr "确定匹配后,会记住你现在的样子。所以换了发型或戴上眼镜也无需重新设置。"
#: src/lib/menu.sh:328
#: src/lib/menu.sh:339
msgid ""
"No scan while the laptop is closed, for example at a desk with an external "
"screen."
msgstr "笔记本合上时不扫描,例如在接了外接显示器的桌前。"
#: src/lib/menu.sh:329
#: src/lib/menu.sh:340
msgid "The bubble at the top of the screen shows what the camera is doing."
msgstr "屏幕顶部的气泡显示摄像头正在做什么。"
#: src/lib/menu.sh:330
#: src/lib/menu.sh:341
msgid "A small pill with a lock that opens."
msgstr "一个带锁的小药丸,锁会打开。"
#: src/lib/menu.sh:331
#: src/lib/menu.sh:342
msgid "An island with a face that looks around, then rings and a tick."
msgstr "一个岛,里面有一张四处张望的脸,然后是圆环和一个对勾。"
#: src/lib/menu.sh:332
#: src/lib/menu.sh:343
msgid "How fast the bubble moves."
msgstr "气泡移动的速度。"
#: src/lib/menu.sh:333
#: src/lib/menu.sh:344
msgid "Shows the bubble when sudo or an admin prompt scans your face, too."
msgstr "sudo 或管理员授权扫描你的脸时也显示气泡。"
#: src/lib/menu.sh:418
#: src/lib/menu.sh:437
#, sh-printf-format
msgid "automatic (%s)"
msgstr "自动(%s)"
#: src/lib/menu.sh:428
#: src/lib/menu.sh:447
msgid "(infrared)"
msgstr "(红外)"
#: src/lib/menu.sh:432
#: src/lib/menu.sh:451
msgid "(not connected)"
msgstr "(未连接)"
#: src/lib/menu.sh:507 src/lib/menu.sh:693
#: src/lib/menu.sh:528 src/lib/menu.sh:714
msgid "Settings"
msgstr "设置"
#: src/lib/menu.sh:508
#: src/lib/menu.sh:529
msgid "↑↓ select ←→ or Space: change q: back"
msgstr "↑↓ 选择 ←→ 或空格:更改 q:返回"
#: src/lib/menu.sh:509
#: src/lib/menu.sh:530
msgid "for all users, asks for your password"
msgstr "对所有用户生效,需要你的密码"
#. TRANSLATORS: keep the letters, they are the keys.
#: src/lib/menu.sh:605
#: src/lib/menu.sh:626
msgid "Up/Down: select, Space: on/off, r: rename, d: delete, a: add, q: back"
msgstr "上/下:选择,空格:开/关,r:重命名,d:删除,a:添加,q:返回"
#: src/lib/menu.sh:606
#: src/lib/menu.sh:627
msgid "No face is set up yet. Press a to add one."
msgstr "尚未设置任何人脸。按 a 添加。"
#: src/lib/menu.sh:652
#: src/lib/menu.sh:673
msgid "New name:"
msgstr "新名称:"
#: src/lib/menu.sh:659
#: src/lib/menu.sh:680
#, sh-printf-format
msgid "Delete \"%s\"?"
msgstr "删除“%s”?"
#: src/lib/menu.sh:690
#: src/lib/menu.sh:711
msgid "Turn face unlock on or off"
msgstr "开启或关闭人脸解锁"
#: src/lib/menu.sh:694
#: src/lib/menu.sh:715
msgid "Try it"
msgstr "试一试"
#: src/lib/menu.sh:695
#: src/lib/menu.sh:716
msgid "Quit"
msgstr "退出"
@@ -637,12 +665,12 @@ msgid ""
"password."
msgstr "正在从 plasma-face-unlock 迁移你的人脸和设置。这需要你的密码。"
#: src/lib/pam.sh:132
#: src/lib/pam.sh:191
#, sh-printf-format
msgid "The PAM module is not installed at %s."
msgstr "PAM 模块未安装在 %s。"
#: src/lib/pam.sh:140
#: src/lib/pam.sh:199
#, sh-printf-format
msgid "There is no PAM configuration for %s on this system."
msgstr "此系统上没有 %s 的 PAM 配置。"
@@ -660,12 +688,12 @@ msgstr "此命令必须以 root 运行。"
msgid "Not a valid setting: %s=%s"
msgstr "无效的设置:%s=%s"
#: src/lib/system.sh:76
#: src/lib/system.sh:81
#, sh-printf-format
msgid "Not a service this can be used for: %s"
msgstr "不能用于此服务:%s"
#: src/lib/system.sh:138 src/lib/system.sh:143
#: src/lib/system.sh:146 src/lib/system.sh:151
#, sh-printf-format
msgid ""
"Hyprland does not start the lock screen agent by itself. Add this to %s:"
@@ -859,19 +887,19 @@ msgstr "播放一次气泡动画。"
msgid "Bubble style for the demo: full or minimal."
msgstr "演示用的气泡样式:full 或 minimal。"
#: src/pam/pam_face_unlock.c:311
#: src/pam/pam_face_unlock.c:356
msgid "Look at the camera to unlock."
msgstr "看着摄像头来解锁。"
#: src/pam/pam_face_unlock.c:314
#: src/pam/pam_face_unlock.c:359
msgid "Blink, or turn your head a little."
msgstr "眨眼,或稍微转一下头。"
#: src/pam/pam_face_unlock.c:330
#: src/pam/pam_face_unlock.c:375
msgid "Face unlock is paused after too many tries. Use your password."
msgstr "尝试次数过多,人脸解锁已暂停。请使用密码。"
#: src/pam/pam_face_unlock.c:334
#: src/pam/pam_face_unlock.c:379
msgid "Face not recognised."
msgstr "未识别出人脸。"