diff --git a/doc/plasma-face-unlock.1.scd b/doc/plasma-face-unlock.1.scd index ba71e58..106518d 100644 --- a/doc/plasma-face-unlock.1.scd +++ b/doc/plasma-face-unlock.1.scd @@ -100,7 +100,7 @@ threshold count, so the samples cannot drift towards somebody else one borderline unlock at a time. A match has to hold for two frames. The face has to look at the screen with -its eyes open (*Only while looking at the screen*), and it has to be the same +its eyes open (*Only when you look at the screen*), and it has to be the same face that shows the sign of life: a face that jumps in the picture, disappears or stops matching starts the whole check again. @@ -180,7 +180,7 @@ scans when somebody comes back: field is a key like any other. This works while a video or an app keeps the screen on, too (ext_idle_notifier_v1, input notification); - when the machine wakes from sleep; -- right after locking, if *Look right after the screen locks* is on. Off by +- right after locking, if *Scan right after locking* is on. Off by default: whoever locks their screen on purpose is usually still in front of it. @@ -228,7 +228,7 @@ emitter has to be switched on with a tool such as linux-enable-ir-emitter. In infrared a phone screen shows up black, which makes the photo check's job easier. A face set up with one camera should be set up again for another. -A laptop with its lid shut is not scanned (*Not while the lid is closed*). +A laptop with its lid shut is not scanned (*Not when the lid is closed*). # FILES diff --git a/po/de.po b/po/de.po index ea32429..4f1f575 100644 --- a/po/de.po +++ b/po/de.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: plasma-face-unlock 1.0.0\n" "Report-Msgid-Bugs-To: https://github.com/LoonixTools/plasma-face-unlock/" "issues\n" -"POT-Creation-Date: 2026-09-22 18:45+0200\n" -"PO-Revision-Date: 2026-09-22 18:45+0200\n" +"POT-Creation-Date: 2026-09-23 22:32+0200\n" +"PO-Revision-Date: 2026-09-23 22:32+0200\n" "Last-Translator: Felitendo\n" "Language-Team: German\n" "Language: de\n" @@ -20,7 +20,9 @@ msgstr "" msgid "" "Face unlock's service has to be switched on once for this computer. That " "needs your password." -msgstr "Der Dienst für die Gesichtsentsperrung muss auf diesem Computer einmal eingeschaltet werden. Dafür wird dein Passwort gebraucht." +msgstr "" +"Der Dienst für die Gesichtsentsperrung muss auf diesem Computer einmal " +"eingeschaltet werden. Dafür wird dein Passwort gebraucht." #: src/plasma-face-unlock:57 #, sh-printf-format @@ -31,7 +33,9 @@ msgstr "Prüfen mit: systemctl status %s" msgid "" "Setting up a face needs the camera picture on screen. Run this inside your " "Plasma session." -msgstr "Zum Einrichten eines Gesichts muss das Kamerabild auf dem Bildschirm zu sehen sein. Starte das in deiner Plasma-Sitzung." +msgstr "" +"Zum Einrichten eines Gesichts muss das Kamerabild auf dem Bildschirm zu " +"sehen sein. Starte das in deiner Plasma-Sitzung." #: src/plasma-face-unlock:71 msgid "The setup window is open. Follow it there." @@ -44,7 +48,9 @@ msgstr "Das Gesicht ist eingerichtet." #: src/plasma-face-unlock:83 #, sh-printf-format msgid "Face unlock is still off. Turn it on with [1] or `%s enable`." -msgstr "Die Gesichtsentsperrung ist noch aus. Schalte sie mit [1] oder `%s enable` ein." +msgstr "" +"Die Gesichtsentsperrung ist noch aus. Schalte sie mit [1] oder `%s enable` " +"ein." #: src/plasma-face-unlock:87 msgid "No face was added." @@ -54,7 +60,8 @@ msgstr "Es wurde kein Gesicht hinzugefügt." msgid "First, set up your face." msgstr "Richte zuerst dein Gesicht ein." -#: src/plasma-face-unlock:100 src/plasma-face-unlock:120 src/lib/menu.sh:338 +#: src/plasma-face-unlock:100 src/plasma-face-unlock:120 src/lib/menu.sh:406 +#: src/lib/menu.sh:410 src/lib/menu.sh:416 src/lib/menu.sh:418 msgid "Could not save the setting." msgstr "Einstellung konnte nicht gespeichert werden." @@ -64,11 +71,15 @@ msgstr "Der Sperrbildschirm-Dienst konnte nicht gestartet werden." #: src/plasma-face-unlock:106 msgid "No systemd user session, so the lock screen agent was not started." -msgstr "Keine systemd-Benutzersitzung, daher wurde der Sperrbildschirm-Dienst nicht gestartet." +msgstr "" +"Keine systemd-Benutzersitzung, daher wurde der Sperrbildschirm-Dienst nicht " +"gestartet." #: src/plasma-face-unlock:113 msgid "Face unlock is on. Lock the screen and look at it to try." -msgstr "Die Gesichtsentsperrung ist an. Sperre den Bildschirm und schau ihn an, um es auszuprobieren." +msgstr "" +"Die Gesichtsentsperrung ist an. Sperre den Bildschirm und schau ihn an, um " +"es auszuprobieren." #: src/plasma-face-unlock:115 msgid "It can do sudo and admin prompts too. See Settings." @@ -76,22 +87,24 @@ msgstr "Sie kann auch sudo und Admin-Abfragen übernehmen. Siehe Einstellungen." #: src/plasma-face-unlock:130 msgid "Face unlock is off. Your faces are kept; delete them under Faces." -msgstr "Die Gesichtsentsperrung ist aus. Deine Gesichter bleiben erhalten; löschen kannst du sie unter Gesichter." +msgstr "" +"Die Gesichtsentsperrung ist aus. Deine Gesichter bleiben erhalten; löschen " +"kannst du sie unter Gesichter." #: src/plasma-face-unlock:144 src/lib/daemon.sh:109 msgid "No face is set up yet." msgstr "Es ist noch kein Gesicht eingerichtet." -#: src/plasma-face-unlock:148 src/lib/menu.sh:157 src/lib/menu.sh:460 +#: src/plasma-face-unlock:148 src/lib/menu.sh:167 src/lib/menu.sh:563 msgid "on" msgstr "an" -#: src/plasma-face-unlock:148 src/lib/menu.sh:159 src/lib/menu.sh:169 -#: src/lib/menu.sh:461 +#: src/plasma-face-unlock:148 src/lib/menu.sh:169 src/lib/menu.sh:179 +#: src/lib/menu.sh:564 msgid "off" msgstr "aus" -#: src/plasma-face-unlock:150 src/lib/menu.sh:478 +#: src/plasma-face-unlock:150 src/lib/menu.sh:581 #, sh-printf-format msgid "%s samples, %s learned" msgstr "%s Aufnahmen, %s dazugelernt" @@ -121,7 +134,7 @@ msgstr "Gesichtsentsperrung einschalten" msgid "Turn it off (faces are kept)" msgstr "Ausschalten (Gesichter bleiben erhalten)" -#: src/plasma-face-unlock:176 src/lib/menu.sh:540 +#: src/plasma-face-unlock:176 src/lib/menu.sh:646 msgid "Add a face" msgstr "Gesicht hinzufügen" @@ -157,7 +170,9 @@ msgstr "Ohne Befehl wird ein interaktives Menü angezeigt." msgid "" "Run this as your own user, not as root. It asks for your password when it " "needs to." -msgstr "Starte das als dein eigener Benutzer, nicht als root. Wenn nötig, wird nach deinem Passwort gefragt." +msgstr "" +"Starte das als dein eigener Benutzer, nicht als root. Wenn nötig, wird nach " +"deinem Passwort gefragt." #: src/plasma-face-unlock:221 src/lib/system.sh:89 #, sh-printf-format @@ -214,13 +229,15 @@ msgstr "Kein Gesicht zu sehen." #: src/lib/daemon.sh:108 msgid "" "Face unlock is paused after too many tries. Unlock once with your password." -msgstr "Die Gesichtsentsperrung ist nach zu vielen Versuchen pausiert. Entsperre einmal mit deinem Passwort." +msgstr "" +"Die Gesichtsentsperrung ist nach zu vielen Versuchen pausiert. Entsperre " +"einmal mit deinem Passwort." #: src/lib/daemon.sh:110 msgid "The camera could not be used." msgstr "Die Kamera konnte nicht benutzt werden." -#: src/lib/daemon.sh:111 src/lib/menu.sh:233 +#: src/lib/daemon.sh:111 src/lib/menu.sh:246 msgid "The recognition models are missing. Reinstall the package." msgstr "Die Erkennungsmodelle fehlen. Installiere das Paket neu." @@ -315,175 +332,315 @@ msgstr "Lebenszeichen: %s" msgid "" "That was too many tries. Face unlock is paused until you unlock with your " "password." -msgstr "Das waren zu viele Versuche. Die Gesichtsentsperrung ist pausiert, bis du mit deinem Passwort entsperrst." +msgstr "" +"Das waren zu viele Versuche. Die Gesichtsentsperrung ist pausiert, bis du " +"mit deinem Passwort entsperrst." - -#: src/lib/menu.sh:130 +#: src/lib/menu.sh:140 msgid "[y/N]" msgstr "[j/N]" -#: src/lib/menu.sh:149 src/lib/menu.sh:382 +#: src/lib/menu.sh:159 src/lib/menu.sh:467 msgid "ON" msgstr "AN" -#: src/lib/menu.sh:151 src/lib/menu.sh:383 +#: src/lib/menu.sh:161 src/lib/menu.sh:468 msgid "OFF" msgstr "AUS" -#: src/lib/menu.sh:167 -msgid "strict (blink or turn your head)" -msgstr "streng (blinzeln oder Kopf drehen)" - -#: src/lib/menu.sh:168 -msgid "basic (screens and phone edges)" -msgstr "einfach (Bildschirme und Handyränder)" - -#: src/lib/menu.sh:170 -msgid "normal" -msgstr "normal" - -#: src/lib/menu.sh:171 +#: src/lib/menu.sh:177 src/lib/menu.sh:181 msgid "strict" msgstr "streng" -#: src/lib/menu.sh:172 +#: src/lib/menu.sh:178 +msgid "basic" +msgstr "einfach" + +#: src/lib/menu.sh:180 src/lib/menu.sh:185 +msgid "normal" +msgstr "normal" + +#: src/lib/menu.sh:182 msgid "relaxed" msgstr "locker" -#: src/lib/menu.sh:173 +#: src/lib/menu.sh:183 msgid "island with the face" msgstr "Insel mit Gesicht" -#: src/lib/menu.sh:174 +#: src/lib/menu.sh:184 msgid "small pill with a lock" msgstr "kleine Pille mit Schloss" -#: src/lib/menu.sh:175 +#: src/lib/menu.sh:186 +msgid "fast" +msgstr "schnell" + +#: src/lib/menu.sh:187 +msgid "slow" +msgstr "langsam" + +#: src/lib/menu.sh:188 #, sh-printf-format msgid "%s seconds" msgstr "%s Sekunden" -#: src/lib/menu.sh:176 src/lib/menu.sh:313 +#: src/lib/menu.sh:189 src/lib/menu.sh:381 msgid "automatic" msgstr "automatisch" -#: src/lib/menu.sh:193 +#: src/lib/menu.sh:206 msgid "Face unlock" msgstr "Gesichtsentsperrung" -#: src/lib/menu.sh:197 +#: src/lib/menu.sh:210 msgid "Service" msgstr "Dienst" -#: src/lib/menu.sh:197 +#: src/lib/menu.sh:210 msgid "not running" msgstr "läuft nicht" -#: src/lib/menu.sh:199 +#: src/lib/menu.sh:212 msgid "Turning face unlock on again starts it." msgstr "Die Gesichtsentsperrung erneut einzuschalten startet ihn." -#: src/lib/menu.sh:210 src/lib/menu.sh:212 src/lib/menu.sh:457 -#: src/lib/menu.sh:541 +#: src/lib/menu.sh:223 src/lib/menu.sh:225 src/lib/menu.sh:560 +#: src/lib/menu.sh:647 msgid "Faces" msgstr "Gesichter" -#: src/lib/menu.sh:210 +#: src/lib/menu.sh:223 msgid "none set up yet" msgstr "noch keins eingerichtet" -#: src/lib/menu.sh:212 +#: src/lib/menu.sh:225 msgid "all turned off" msgstr "alle ausgeschaltet" -#: src/lib/menu.sh:218 +#: src/lib/menu.sh:231 msgid "none found" msgstr "keine gefunden" -#: src/lib/menu.sh:220 /tmp/tmp.q9gMIu3Tjj/settings.sh:9 +#: src/lib/menu.sh:233 /tmp/tmp.jqZ9OxnSvo/settings.sh:12 msgid "Camera" msgstr "Kamera" -#: src/lib/menu.sh:222 +#: src/lib/menu.sh:235 /tmp/tmp.jqZ9OxnSvo/settings.sh:1 msgid "Lock screen" msgstr "Sperrbildschirm" -#: src/lib/menu.sh:223 +#: src/lib/menu.sh:236 msgid "sudo" msgstr "sudo" -#: src/lib/menu.sh:224 +#: src/lib/menu.sh:237 /tmp/tmp.jqZ9OxnSvo/settings.sh:7 msgid "Admin prompts" msgstr "Admin-Abfragen" -#: src/lib/menu.sh:225 /tmp/tmp.q9gMIu3Tjj/settings.sh:6 +#: src/lib/menu.sh:238 /tmp/tmp.jqZ9OxnSvo/settings.sh:9 msgid "Photo check" msgstr "Foto-Prüfung" -#: src/lib/menu.sh:228 +#: src/lib/menu.sh:241 msgid "Paused" msgstr "Pausiert" -#: src/lib/menu.sh:228 +#: src/lib/menu.sh:241 #, sh-printf-format msgid "for %d more minutes, or until the password is used" msgstr "noch %d Minuten, oder bis das Passwort benutzt wird" -#: src/lib/menu.sh:230 +#: src/lib/menu.sh:243 msgid "Last unlock" msgstr "Letzte Entsperrung" -#: src/lib/menu.sh:309 +#: src/lib/menu.sh:287 +msgid "" +"Unlocks the lock screen when it sees your face. Off: only your password " +"works there." +msgstr "" +"Entsperrt den Sperrbildschirm, wenn er dein Gesicht sieht. Aus: Dort geht " +"nur dein Passwort." + +#: src/lib/menu.sh:288 +msgid "" +"Scans when you press a key or move the mouse on the lock screen, and when " +"the computer wakes up." +msgstr "" +"Scannt, wenn du auf dem Sperrbildschirm eine Taste drückst oder die Maus " +"bewegst, und wenn der Computer aufwacht." + +#: src/lib/menu.sh:289 +msgid "" +"Scans as soon as the screen locks. Off by default: if you lock it yourself, " +"it would unlock again right away." +msgstr "" +"Scannt, sobald der Bildschirm gesperrt wird. Normalerweise aus: Sperrst du " +"selbst, würde er gleich wieder entsperren." + +#: src/lib/menu.sh:290 +msgid "" +"sudo takes your face instead of the password. No match: you type the " +"password as usual." +msgstr "" +"sudo nimmt dein Gesicht statt des Passworts. Passt es nicht, tippst du wie " +"gewohnt dein Passwort." + +#: src/lib/menu.sh:291 +msgid "" +"The password windows of Plasma and apps, for example when you install " +"software. No match: you type the password." +msgstr "" +"Die Passwort-Fenster von Plasma und Apps, zum Beispiel beim Installieren. " +"Passt das Gesicht nicht, tippst du dein Passwort." + +#: src/lib/menu.sh:292 +msgid "" +"You have to blink or turn your head a little. This also stops printed photos." +msgstr "" +"Du musst blinzeln oder den Kopf leicht drehen. Das hält auch ausgedruckte " +"Fotos auf." + +#: src/lib/menu.sh:293 +msgid "No check at all. Only for trying out a camera." +msgstr "Keine Prüfung. Nur zum Ausprobieren einer Kamera." + +#: src/lib/menu.sh:294 +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 "" +"Hält Fotos auf Handy, Tablet oder Hochglanzpapier auf. Blinzeln ist nicht " +"nötig. Ein matter Ausdruck kann durchkommen." + +#: src/lib/menu.sh:295 +msgid "" +"Fewer wrong matches, but it may not know you with glasses or in bad light." +msgstr "" +"Seltener Verwechslungen, aber mit Brille oder bei schlechtem Licht erkennt " +"es dich vielleicht nicht." + +#: src/lib/menu.sh:296 +msgid "Knows you more easily, but also somebody who looks a lot like you." +msgstr "Erkennt dich leichter, aber auch jemanden, der dir sehr ähnlich sieht." + +#: src/lib/menu.sh:297 +msgid "The default. Right for most people." +msgstr "Der Standard. Passt für die meisten." + +#: src/lib/menu.sh:298 +msgid "" +"Your eyes have to be open and on the screen. So it does not unlock while you " +"look away or sleep." +msgstr "" +"Deine Augen müssen offen sein und auf den Bildschirm schauen. So entsperrt " +"es nicht, wenn du wegschaust oder schläfst." + +#: src/lib/menu.sh:299 +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)." +msgstr "" +"Automatisch nimmt die erste normale Kamera. Nach einem Wechsel dein Gesicht " +"neu einrichten. Eine Infrarot-Kamera braucht ihr Licht (linux-enable-ir-" +"emitter)." + +#: src/lib/menu.sh:300 +msgid "How long the camera looks for your face before it gives up." +msgstr "Wie lange die Kamera nach deinem Gesicht sucht, bevor sie aufgibt." + +#: src/lib/menu.sh:301 +msgid "" +"After a sure match it keeps how you look now. So a new haircut or glasses " +"need no new setup." +msgstr "" +"Nach einem sicheren Treffer merkt es sich, wie du gerade aussiehst. So musst " +"du nach neuer Frisur oder Brille nichts neu einrichten." + +#: src/lib/menu.sh:302 +msgid "" +"No scan while the laptop is closed, for example at a desk with an external " +"screen." +msgstr "" +"Kein Scan bei zugeklapptem Laptop, zum Beispiel am Schreibtisch mit externem " +"Bildschirm." + +#: src/lib/menu.sh:303 +msgid "The bubble at the top of the screen shows what the camera is doing." +msgstr "Die Bubble oben am Bildschirm zeigt, was die Kamera gerade macht." + +#: src/lib/menu.sh:304 +msgid "A small pill with a lock that opens." +msgstr "Eine kleine Pille mit einem Schloss, das aufgeht." + +#: src/lib/menu.sh:305 +msgid "An island with a face that looks around, then rings and a tick." +msgstr "" +"Eine Insel mit einem Gesicht, das sich umschaut, danach Ringe und ein Haken." + +#: src/lib/menu.sh:306 +msgid "How fast the bubble moves." +msgstr "Wie schnell sich die Bubble bewegt." + +#: src/lib/menu.sh:307 +msgid "Shows the bubble when sudo or an admin prompt scans your face, too." +msgstr "" +"Zeigt die Bubble auch, wenn sudo oder eine Admin-Abfrage dein Gesicht scannt." + +#: src/lib/menu.sh:377 #, sh-printf-format msgid "automatic (%s)" msgstr "automatisch (%s)" -#: src/lib/menu.sh:319 +#: src/lib/menu.sh:387 msgid "(infrared)" msgstr "(Infrarot)" -#: src/lib/menu.sh:323 +#: src/lib/menu.sh:391 msgid "(not connected)" msgstr "(nicht angeschlossen)" -#: src/lib/menu.sh:379 src/lib/menu.sh:542 +#: src/lib/menu.sh:464 src/lib/menu.sh:648 msgid "Settings" msgstr "Einstellungen" -#: src/lib/menu.sh:380 -msgid "Up/Down: select, Space or Right: change, q: back" -msgstr "Hoch/Runter: wählen, Leertaste oder Rechts: ändern, q: zurück" +#: src/lib/menu.sh:465 +msgid "↑↓ select ←→ or Space: change q: back" +msgstr "↑↓ auswählen ←→ oder Leertaste: ändern q: zurück" -#: src/lib/menu.sh:381 -msgid "Settings marked * are for the whole computer and ask for your password." -msgstr "Mit * markierte Einstellungen gelten für den ganzen Computer und fragen nach deinem Passwort." +#: src/lib/menu.sh:466 +msgid "for all users, asks for your password" +msgstr "für alle Nutzer, fragt nach deinem Passwort" -#: src/lib/menu.sh:458 +#: src/lib/menu.sh:561 msgid "Up/Down: select, Space: on/off, r: rename, d: delete, a: add, q: back" -msgstr "Hoch/Runter: wählen, Leertaste: an/aus, r: umbenennen, d: löschen, a: hinzufügen, q: zurück" +msgstr "" +"Hoch/Runter: wählen, Leertaste: an/aus, r: umbenennen, d: löschen, a: " +"hinzufügen, q: zurück" -#: src/lib/menu.sh:459 +#: src/lib/menu.sh:562 msgid "No face is set up yet. Press a to add one." msgstr "Es ist noch kein Gesicht eingerichtet. Drück a, um eins hinzuzufügen." -#: src/lib/menu.sh:502 +#: src/lib/menu.sh:607 msgid "New name:" msgstr "Neuer Name:" -#: src/lib/menu.sh:509 +#: src/lib/menu.sh:614 #, sh-printf-format msgid "Delete \"%s\"?" msgstr "„%s“ löschen?" -#: src/lib/menu.sh:539 +#: src/lib/menu.sh:645 msgid "Turn face unlock on or off" msgstr "Gesichtsentsperrung ein- oder ausschalten" -#: src/lib/menu.sh:543 +#: src/lib/menu.sh:649 msgid "Try it" msgstr "Ausprobieren" -#: src/lib/menu.sh:544 +#: src/lib/menu.sh:650 msgid "Quit" msgstr "Beenden" @@ -499,7 +656,8 @@ msgstr "Auf diesem System gibt es keine PAM-Konfiguration für %s." #: src/lib/system.sh:47 msgid "This needs root, and neither sudo, run0 nor doas is installed." -msgstr "Dafür braucht es root, aber weder sudo noch run0 noch doas ist installiert." +msgstr "" +"Dafür braucht es root, aber weder sudo noch run0 noch doas ist installiert." #: src/lib/system.sh:56 msgid "This command has to run as root." @@ -516,86 +674,98 @@ msgid "Not a service this can be used for: %s" msgstr "Dafür kann es nicht verwendet werden: %s" #: src/lib/menu.sh -msgid "Unlock the lock screen" -msgstr "Sperrbildschirm entsperren" +msgid "Unlock with your face" +msgstr "Mit dem Gesicht entsperren" #: src/lib/menu.sh -msgid "Look when somebody comes back to the screen" -msgstr "Schauen, wenn jemand zum Bildschirm zurückkommt" +msgid "Scan when you come back" +msgstr "Scannen, wenn du zurückkommst" #: src/lib/menu.sh -msgid "Look right after the screen locks" -msgstr "Gleich nach dem Sperren schauen" +msgid "Scan right after locking" +msgstr "Gleich nach dem Sperren scannen" #: src/lib/menu.sh -msgid "Use for sudo in a terminal" -msgstr "Für sudo im Terminal verwenden" +msgid "Password prompts" +msgstr "Passwort-Abfragen" #: src/lib/menu.sh -msgid "Use for admin prompts" -msgstr "Für Admin-Abfragen verwenden" +msgid "sudo in a terminal" +msgstr "sudo im Terminal" #: src/lib/menu.sh -msgid "How closely a face has to match" -msgstr "Wie genau ein Gesicht passen muss" +msgid "Recognition" +msgstr "Erkennung" #: src/lib/menu.sh -msgid "Only while looking at the screen" -msgstr "Nur beim Blick auf den Bildschirm" +msgid "How closely the face has to match" +msgstr "Wie genau das Gesicht passen muss" #: src/lib/menu.sh -msgid "How long one look lasts" -msgstr "Wie lange ein Blick dauert" +msgid "Only when you look at the screen" +msgstr "Nur wenn du auf den Bildschirm schaust" + +#: src/lib/menu.sh +msgid "How long a scan lasts" +msgstr "Wie lange ein Scan dauert" #: src/lib/menu.sh msgid "Learn from every unlock" msgstr "Bei jeder Entsperrung dazulernen" #: src/lib/menu.sh -msgid "Not while the lid is closed" -msgstr "Nicht bei geschlossenem Deckel" +msgid "Not when the lid is closed" +msgstr "Nicht bei zugeklapptem Laptop" #: src/lib/menu.sh -msgid "Show the bubble at the top" -msgstr "Die Bubble oben anzeigen" +msgid "Bubble" +msgstr "Bubble" #: src/lib/menu.sh -msgid "Bubble style" -msgstr "Bubble-Stil" +msgid "Show the bubble" +msgstr "Bubble anzeigen" #: src/lib/menu.sh -msgid "Bubble for sudo and admin prompts too" -msgstr "Bubble auch für sudo und Admin-Abfragen" +msgid "Style" +msgstr "Stil" -#: src/agent/bubblecontroller.cpp:91 +#: src/lib/menu.sh +msgid "Animation speed" +msgstr "Animationsgeschwindigkeit" + +#: src/lib/menu.sh +msgid "Also for sudo and admin prompts" +msgstr "Auch bei sudo und Admin-Abfragen" + +#: src/agent/bubblecontroller.cpp:98 msgid "Blink once" msgstr "Einmal blinzeln" -#: src/agent/bubblecontroller.cpp:93 +#: src/agent/bubblecontroller.cpp:100 msgid "Look at the screen" msgstr "Auf den Bildschirm schauen" -#: src/agent/bubblecontroller.cpp:95 +#: src/agent/bubblecontroller.cpp:102 msgid "Move closer" msgstr "Näher kommen" -#: src/agent/bubblecontroller.cpp:97 +#: src/agent/bubblecontroller.cpp:104 msgid "Too dark" msgstr "Zu dunkel" -#: src/agent/bubblecontroller.cpp:117 +#: src/agent/bubblecontroller.cpp:124 msgid "Use your password" msgstr "Nutze dein Passwort" -#: src/agent/bubblecontroller.cpp:123 +#: src/agent/bubblecontroller.cpp:130 msgid "Not recognized" msgstr "Nicht erkannt" -#: src/agent/bubblecontroller.cpp:125 +#: src/agent/bubblecontroller.cpp:132 msgid "Try again and blink" msgstr "Nochmal, und blinzeln" -#: src/agent/bubblecontroller.cpp:127 +#: src/agent/bubblecontroller.cpp:134 msgid "Camera unavailable" msgstr "Kamera nicht verfügbar" @@ -653,7 +823,8 @@ msgstr "Die Kamera konnte nicht benutzt werden: %1" #: src/agent/enrollcontroller.cpp:197 msgid "The face recognition models are missing. Reinstall the package." -msgstr "Die Modelle für die Gesichtserkennung fehlen. Installiere das Paket neu." +msgstr "" +"Die Modelle für die Gesichtserkennung fehlen. Installiere das Paket neu." #: src/agent/enrollcontroller.cpp:199 msgid "That took too long. Try again, in good light." @@ -661,11 +832,15 @@ msgstr "Das hat zu lange gedauert. Versuch es nochmal, bei gutem Licht." #: src/agent/enrollcontroller.cpp:201 msgid "The face unlock service is not running. Turn face unlock on first." -msgstr "Der Dienst für die Gesichtsentsperrung läuft nicht. Schalte die Gesichtsentsperrung zuerst ein." +msgstr "" +"Der Dienst für die Gesichtsentsperrung läuft nicht. Schalte die " +"Gesichtsentsperrung zuerst ein." #: src/agent/enrollcontroller.cpp:203 msgid "The camera is busy with another scan. Try again in a moment." -msgstr "Die Kamera ist gerade mit einem anderen Scan beschäftigt. Versuch es gleich nochmal." +msgstr "" +"Die Kamera ist gerade mit einem anderen Scan beschäftigt. Versuch es gleich " +"nochmal." #: src/agent/enrollcontroller.cpp:205 msgid "The face could not be added (%1)." @@ -701,7 +876,9 @@ msgstr "Blinzle oder dreh den Kopf ein wenig." #: src/pam/pam_plasma_face_unlock.c:312 msgid "Face unlock is paused after too many tries. Use your password." -msgstr "Die Gesichtsentsperrung ist nach zu vielen Versuchen pausiert. Nutze dein Passwort." +msgstr "" +"Die Gesichtsentsperrung ist nach zu vielen Versuchen pausiert. Nutze dein " +"Passwort." #: src/pam/pam_plasma_face_unlock.c:316 msgid "Face not recognised." @@ -731,47 +908,38 @@ msgstr "Die Einrichtung wurde nicht abgeschlossen" msgid "" "Look at the camera, then move your head slowly in a circle. Your face is " "turned into numbers on this computer and never stored as a picture." -msgstr "Schau in die Kamera und beweg dann den Kopf langsam im Kreis. Dein Gesicht wird auf diesem Computer in Zahlen umgewandelt und nie als Bild gespeichert." +msgstr "" +"Schau in die Kamera und beweg dann den Kopf langsam im Kreis. Dein Gesicht " +"wird auf diesem Computer in Zahlen umgewandelt und nie als Bild gespeichert." #: src/agent/qml/Enroll.qml:123 msgid "" "Lock the screen and look at it to try it out. You can add a second look, " "with glasses for example, from the menu." -msgstr "Sperre den Bildschirm und schau ihn an, um es auszuprobieren. Einen zweiten Look, zum Beispiel mit Brille, kannst du im Menü hinzufügen." +msgstr "" +"Sperre den Bildschirm und schau ihn an, um es auszuprobieren. Einen zweiten " +"Look, zum Beispiel mit Brille, kannst du im Menü hinzufügen." -#: src/agent/qml/Enroll.qml:156 +#: src/agent/qml/Enroll.qml:157 msgid "Name (optional)" msgstr "Name (optional)" -#: src/agent/qml/Enroll.qml:171 +#: src/agent/qml/Enroll.qml:172 msgid "Cancel" msgstr "Abbrechen" -#: src/agent/qml/Enroll.qml:177 +#: src/agent/qml/Enroll.qml:178 msgid "Finish now" msgstr "Jetzt abschließen" -#: src/agent/qml/Enroll.qml:182 +#: src/agent/qml/Enroll.qml:183 msgid "Try again" msgstr "Nochmal versuchen" -#: src/agent/qml/Enroll.qml:182 +#: src/agent/qml/Enroll.qml:183 msgid "Get started" msgstr "Los geht's" -#: src/agent/qml/Enroll.qml:187 +#: src/agent/qml/Enroll.qml:188 msgid "Done" msgstr "Fertig" - - -#: src/lib/menu.sh -msgid "Animation speed" -msgstr "Animationsgeschwindigkeit" - -#: src/lib/menu.sh -msgid "fast" -msgstr "schnell" - -#: src/lib/menu.sh -msgid "slow" -msgstr "langsam" diff --git a/po/plasma-face-unlock.pot b/po/plasma-face-unlock.pot index f62768c..9b65a3d 100644 --- a/po/plasma-face-unlock.pot +++ b/po/plasma-face-unlock.pot @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: plasma-face-unlock 1.0.0\n" "Report-Msgid-Bugs-To: https://github.com/LoonixTools/plasma-face-unlock/" "issues\n" -"POT-Creation-Date: 2026-09-22 23:12+0200\n" +"POT-Creation-Date: 2026-09-23 22:32+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,8 +55,8 @@ msgstr "" msgid "First, set up your face." msgstr "" -#: src/plasma-face-unlock:100 src/plasma-face-unlock:120 src/lib/menu.sh:352 -#: src/lib/menu.sh:356 src/lib/menu.sh:362 src/lib/menu.sh:364 +#: src/plasma-face-unlock:100 src/plasma-face-unlock:120 src/lib/menu.sh:406 +#: src/lib/menu.sh:410 src/lib/menu.sh:416 src/lib/menu.sh:418 msgid "Could not save the setting." msgstr "" @@ -84,16 +84,16 @@ msgstr "" msgid "No face is set up yet." msgstr "" -#: src/plasma-face-unlock:148 src/lib/menu.sh:167 src/lib/menu.sh:476 +#: src/plasma-face-unlock:148 src/lib/menu.sh:167 src/lib/menu.sh:563 msgid "on" msgstr "" #: src/plasma-face-unlock:148 src/lib/menu.sh:169 src/lib/menu.sh:179 -#: src/lib/menu.sh:477 +#: src/lib/menu.sh:564 msgid "off" msgstr "" -#: src/plasma-face-unlock:150 src/lib/menu.sh:494 +#: src/plasma-face-unlock:150 src/lib/menu.sh:581 #, sh-printf-format msgid "%s samples, %s learned" msgstr "" @@ -123,7 +123,7 @@ msgstr "" msgid "Turn it off (faces are kept)" msgstr "" -#: src/plasma-face-unlock:176 src/lib/menu.sh:559 +#: src/plasma-face-unlock:176 src/lib/menu.sh:646 msgid "Add a face" msgstr "" @@ -323,30 +323,26 @@ msgstr "" msgid "[y/N]" msgstr "" -#: src/lib/menu.sh:159 src/lib/menu.sh:396 +#: src/lib/menu.sh:159 src/lib/menu.sh:467 msgid "ON" msgstr "" -#: src/lib/menu.sh:161 src/lib/menu.sh:397 +#: src/lib/menu.sh:161 src/lib/menu.sh:468 msgid "OFF" msgstr "" -#: src/lib/menu.sh:177 -msgid "strict (blink or turn your head)" +#: src/lib/menu.sh:177 src/lib/menu.sh:181 +msgid "strict" msgstr "" #: src/lib/menu.sh:178 -msgid "basic (screens and phone edges)" +msgid "basic" msgstr "" #: src/lib/menu.sh:180 src/lib/menu.sh:185 msgid "normal" msgstr "" -#: src/lib/menu.sh:181 -msgid "strict" -msgstr "" - #: src/lib/menu.sh:182 msgid "relaxed" msgstr "" @@ -372,7 +368,7 @@ msgstr "" msgid "%s seconds" msgstr "" -#: src/lib/menu.sh:189 src/lib/menu.sh:327 +#: src/lib/menu.sh:189 src/lib/menu.sh:381 msgid "automatic" msgstr "" @@ -392,8 +388,8 @@ msgstr "" msgid "Turning face unlock on again starts it." msgstr "" -#: src/lib/menu.sh:223 src/lib/menu.sh:225 src/lib/menu.sh:473 -#: src/lib/menu.sh:560 +#: src/lib/menu.sh:223 src/lib/menu.sh:225 src/lib/menu.sh:560 +#: src/lib/menu.sh:647 msgid "Faces" msgstr "" @@ -409,11 +405,11 @@ msgstr "" msgid "none found" msgstr "" -#: src/lib/menu.sh:233 /tmp/tmp.PgsbSPb4Sv/settings.sh:9 +#: src/lib/menu.sh:233 /tmp/tmp.jqZ9OxnSvo/settings.sh:12 msgid "Camera" msgstr "" -#: src/lib/menu.sh:235 +#: src/lib/menu.sh:235 /tmp/tmp.jqZ9OxnSvo/settings.sh:1 msgid "Lock screen" msgstr "" @@ -421,11 +417,11 @@ msgstr "" msgid "sudo" msgstr "" -#: src/lib/menu.sh:237 +#: src/lib/menu.sh:237 /tmp/tmp.jqZ9OxnSvo/settings.sh:7 msgid "Admin prompts" msgstr "" -#: src/lib/menu.sh:238 /tmp/tmp.PgsbSPb4Sv/settings.sh:6 +#: src/lib/menu.sh:238 /tmp/tmp.jqZ9OxnSvo/settings.sh:9 msgid "Photo check" msgstr "" @@ -442,57 +438,163 @@ msgstr "" msgid "Last unlock" msgstr "" -#: src/lib/menu.sh:323 +#: src/lib/menu.sh:287 +msgid "" +"Unlocks the lock screen when it sees your face. Off: only your password " +"works there." +msgstr "" + +#: src/lib/menu.sh:288 +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:289 +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:290 +msgid "" +"sudo takes your face instead of the password. No match: you type the " +"password as usual." +msgstr "" + +#: src/lib/menu.sh:291 +msgid "" +"The password windows of Plasma and apps, for example when you install " +"software. No match: you type the password." +msgstr "" + +#: src/lib/menu.sh:292 +msgid "" +"You have to blink or turn your head a little. This also stops printed photos." +msgstr "" + +#: src/lib/menu.sh:293 +msgid "No check at all. Only for trying out a camera." +msgstr "" + +#: src/lib/menu.sh:294 +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:295 +msgid "" +"Fewer wrong matches, but it may not know you with glasses or in bad light." +msgstr "" + +#: src/lib/menu.sh:296 +msgid "Knows you more easily, but also somebody who looks a lot like you." +msgstr "" + +#: src/lib/menu.sh:297 +msgid "The default. Right for most people." +msgstr "" + +#: src/lib/menu.sh:298 +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:299 +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)." +msgstr "" + +#: src/lib/menu.sh:300 +msgid "How long the camera looks for your face before it gives up." +msgstr "" + +#: src/lib/menu.sh:301 +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:302 +msgid "" +"No scan while the laptop is closed, for example at a desk with an external " +"screen." +msgstr "" + +#: src/lib/menu.sh:303 +msgid "The bubble at the top of the screen shows what the camera is doing." +msgstr "" + +#: src/lib/menu.sh:304 +msgid "A small pill with a lock that opens." +msgstr "" + +#: src/lib/menu.sh:305 +msgid "An island with a face that looks around, then rings and a tick." +msgstr "" + +#: src/lib/menu.sh:306 +msgid "How fast the bubble moves." +msgstr "" + +#: src/lib/menu.sh:307 +msgid "Shows the bubble when sudo or an admin prompt scans your face, too." +msgstr "" + +#: src/lib/menu.sh:377 #, sh-printf-format msgid "automatic (%s)" msgstr "" -#: src/lib/menu.sh:333 +#: src/lib/menu.sh:387 msgid "(infrared)" msgstr "" -#: src/lib/menu.sh:337 +#: src/lib/menu.sh:391 msgid "(not connected)" msgstr "" -#: src/lib/menu.sh:393 src/lib/menu.sh:561 +#: src/lib/menu.sh:464 src/lib/menu.sh:648 msgid "Settings" msgstr "" -#: src/lib/menu.sh:394 -msgid "Up/Down: select, Space or Right: change, q: back" +#: src/lib/menu.sh:465 +msgid "↑↓ select ←→ or Space: change q: back" msgstr "" -#: src/lib/menu.sh:395 -msgid "Settings marked * are for the whole computer and ask for your password." +#: src/lib/menu.sh:466 +msgid "for all users, asks for your password" msgstr "" -#: src/lib/menu.sh:474 +#: src/lib/menu.sh:561 msgid "Up/Down: select, Space: on/off, r: rename, d: delete, a: add, q: back" msgstr "" -#: src/lib/menu.sh:475 +#: src/lib/menu.sh:562 msgid "No face is set up yet. Press a to add one." msgstr "" -#: src/lib/menu.sh:520 +#: src/lib/menu.sh:607 msgid "New name:" msgstr "" -#: src/lib/menu.sh:527 +#: src/lib/menu.sh:614 #, sh-printf-format msgid "Delete \"%s\"?" msgstr "" -#: src/lib/menu.sh:558 +#: src/lib/menu.sh:645 msgid "Turn face unlock on or off" msgstr "" -#: src/lib/menu.sh:562 +#: src/lib/menu.sh:649 msgid "Try it" msgstr "" -#: src/lib/menu.sh:563 +#: src/lib/menu.sh:650 msgid "Quit" msgstr "" @@ -525,35 +627,39 @@ msgid "Not a service this can be used for: %s" msgstr "" #: src/lib/menu.sh -msgid "Unlock the lock screen" +msgid "Unlock with your face" msgstr "" #: src/lib/menu.sh -msgid "Look when somebody comes back to the screen" +msgid "Scan when you come back" msgstr "" #: src/lib/menu.sh -msgid "Look right after the screen locks" +msgid "Scan right after locking" msgstr "" #: src/lib/menu.sh -msgid "Use for sudo in a terminal" +msgid "Password prompts" msgstr "" #: src/lib/menu.sh -msgid "Use for admin prompts" +msgid "sudo in a terminal" msgstr "" #: src/lib/menu.sh -msgid "How closely a face has to match" +msgid "Recognition" msgstr "" #: src/lib/menu.sh -msgid "Only while looking at the screen" +msgid "How closely the face has to match" msgstr "" #: src/lib/menu.sh -msgid "How long one look lasts" +msgid "Only when you look at the screen" +msgstr "" + +#: src/lib/menu.sh +msgid "How long a scan lasts" msgstr "" #: src/lib/menu.sh @@ -561,15 +667,19 @@ msgid "Learn from every unlock" msgstr "" #: src/lib/menu.sh -msgid "Not while the lid is closed" +msgid "Not when the lid is closed" msgstr "" #: src/lib/menu.sh -msgid "Show the bubble at the top" +msgid "Bubble" msgstr "" #: src/lib/menu.sh -msgid "Bubble style" +msgid "Show the bubble" +msgstr "" + +#: src/lib/menu.sh +msgid "Style" msgstr "" #: src/lib/menu.sh @@ -577,7 +687,7 @@ msgid "Animation speed" msgstr "" #: src/lib/menu.sh -msgid "Bubble for sudo and admin prompts too" +msgid "Also for sudo and admin prompts" msgstr "" #: src/agent/bubblecontroller.cpp:98 diff --git a/po/update-pot.sh b/po/update-pot.sh index 415e81a..49bab92 100755 --- a/po/update-pot.sh +++ b/po/update-pot.sh @@ -5,8 +5,9 @@ # the shell code (pfu_msg), the agent (i18n in C++ and QML) and the PAM module # (dgettext), so a word is translated once wherever it shows up. # -# The settings labels live in an array in menu.sh and reach gettext at run -# time, so xgettext cannot see them; they are pulled out here first. +# The settings labels and headings live in an array in menu.sh and reach +# gettext at run time, so xgettext cannot see them; they are pulled out here +# first. set -euo pipefail @@ -17,7 +18,8 @@ trap 'rm -rf -- "$tmp"' EXIT version="$(make -s version)" # The labels, as calls xgettext understands, pointing back at menu.sh. -awk -F'|' '/^\t"(user|sys|pam)\|/ { sub(/"$/, "", $5); print "pfu_msg \"" $5 "\"" }' src/lib/menu.sh > "$tmp/settings.sh" +awk -F'|' '/^\t"(user|sys|pam)\|/ { sub(/"$/, "", $5); print "pfu_msg \"" $5 "\"" } + /^\t"group\|/ { sub(/"$/, "", $2); print "pfu_msg \"" $2 "\"" }' src/lib/menu.sh > "$tmp/settings.sh" common=(--from-code=UTF-8 --add-comments=TRANSLATORS --package-name=plasma-face-unlock --package-version="$version" --msgid-bugs-address=https://github.com/LoonixTools/plasma-face-unlock/issues) diff --git a/src/lib/menu.sh b/src/lib/menu.sh index 43dfa7e..5bd85d8 100644 --- a/src/lib/menu.sh +++ b/src/lib/menu.sh @@ -174,8 +174,8 @@ _pfu_small_onoff() { # How a setting's value reads in the menu. pfu_value_label() { case "$1:$2" in - Liveness:heavy) pfu_msg "strict (blink or turn your head)" ;; - Liveness:light) pfu_msg "basic (screens and phone edges)" ;; + Liveness:heavy) pfu_msg "strict" ;; + Liveness:light) pfu_msg "basic" ;; Liveness:off) pfu_msg "off" ;; Strictness:normal) pfu_msg "normal" ;; Strictness:strict) pfu_msg "strict" ;; @@ -250,29 +250,85 @@ pfu_ui_status() { # --------------------------------------------------------------------------- # Settings # --------------------------------------------------------------------------- -# Format: scope|Key|type|default|label-msgid|choices -# scope user (this user's file), sys (the system file, through sudo) or -# pam (the service of that name, through sudo) -# type bool, choice (cycles through the choices) or camera +# Format: scope|Key|type|default|label-msgid|choices|needs +# scope user (this user's file), sys (the system file, through sudo), +# pam (the service of that name, through sudo), or group for a +# heading, with only the label after it +# type bool, choice (steps through the choices) or camera +# needs a bool setting this one does nothing without; it is dimmed while +# that is off PFU_SETTINGS=( - "user|LockScreen|bool|yes|Unlock the lock screen" - "user|ScanOnWake|bool|yes|Look when somebody comes back to the screen" - "user|ScanOnLock|bool|no|Look right after the screen locks" - "pam|sudo|bool|no|Use for sudo in a terminal" - "pam|polkit-1|bool|no|Use for admin prompts" - "sys|Liveness|choice|light|Photo check|light,heavy,off" - "sys|Strictness|choice|normal|How closely a face has to match|normal,strict,relaxed" - "sys|Attention|bool|yes|Only while looking at the screen" + "group|Lock screen" + "user|LockScreen|bool|yes|Unlock with your face" + "user|ScanOnWake|bool|yes|Scan when you come back||LockScreen" + "user|ScanOnLock|bool|no|Scan right after locking||LockScreen" + "group|Password prompts" + "pam|sudo|bool|no|sudo in a terminal" + "pam|polkit-1|bool|no|Admin prompts" + "group|Recognition" + "sys|Liveness|choice|light|Photo check|off,light,heavy" + "sys|Strictness|choice|normal|How closely the face has to match|relaxed,normal,strict" + "sys|Attention|bool|yes|Only when you look at the screen" "sys|Camera|camera|auto|Camera" - "sys|ScanSeconds|choice|5|How long one look lasts|3,4,5,6,8,10" + "sys|ScanSeconds|choice|5|How long a scan lasts|3,4,5,6,8,10" "sys|Adapt|bool|yes|Learn from every unlock" - "sys|SkipLidClosed|bool|yes|Not while the lid is closed" - "user|Bubble|bool|yes|Show the bubble at the top" - "user|BubbleStyle|choice|full|Bubble style|full,minimal" - "user|AnimationSpeed|choice|normal|Animation speed|normal,fast,slow" - "user|BubbleForPrompts|bool|yes|Bubble for sudo and admin prompts too" + "sys|SkipLidClosed|bool|yes|Not when the lid is closed" + "group|Bubble" + "user|Bubble|bool|yes|Show the bubble" + "user|BubbleStyle|choice|full|Style|full,minimal|Bubble" + "user|AnimationSpeed|choice|normal|Animation speed|slow,normal,fast|Bubble" + "user|BubbleForPrompts|bool|yes|Also for sudo and admin prompts||Bubble" ) +# pfu_setting_help +# What a setting does, shown under the list for the selected one. +pfu_setting_help() { + case "$1:$2" in + LockScreen:*) pfu_msg "Unlocks the lock screen when it sees your face. Off: only your password works there." ;; + ScanOnWake:*) pfu_msg "Scans when you press a key or move the mouse on the lock screen, and when the computer wakes up." ;; + ScanOnLock:*) pfu_msg "Scans as soon as the screen locks. Off by default: if you lock it yourself, it would unlock again right away." ;; + sudo:*) pfu_msg "sudo takes your face instead of the password. No match: you type the password as usual." ;; + polkit-1:*) pfu_msg "The password windows of Plasma and apps, for example when you install software. No match: you type the password." ;; + Liveness:heavy) pfu_msg "You have to blink or turn your head a little. This also stops printed photos." ;; + Liveness:off) pfu_msg "No check at all. Only for trying out a camera." ;; + Liveness:*) pfu_msg "Stops photos on a phone, a tablet or glossy paper. You do not have to blink. A matte printed photo can get through." ;; + Strictness:strict) pfu_msg "Fewer wrong matches, but it may not know you with glasses or in bad light." ;; + Strictness:relaxed) pfu_msg "Knows you more easily, but also somebody who looks a lot like you." ;; + Strictness:*) pfu_msg "The default. Right for most people." ;; + Attention:*) pfu_msg "Your eyes have to be open and on the screen. So it does not unlock while you look away or sleep." ;; + Camera:*) pfu_msg "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)." ;; + ScanSeconds:*) pfu_msg "How long the camera looks for your face before it gives up." ;; + Adapt:*) pfu_msg "After a sure match it keeps how you look now. So a new haircut or glasses need no new setup." ;; + SkipLidClosed:*) pfu_msg "No scan while the laptop is closed, for example at a desk with an external screen." ;; + Bubble:*) pfu_msg "The bubble at the top of the screen shows what the camera is doing." ;; + BubbleStyle:minimal) pfu_msg "A small pill with a lock that opens." ;; + BubbleStyle:*) pfu_msg "An island with a face that looks around, then rings and a tick." ;; + AnimationSpeed:*) pfu_msg "How fast the bubble moves." ;; + BubbleForPrompts:*) pfu_msg "Shows the bubble when sudo or an admin prompt scans your face, too." ;; + esac +} + +# _pfu_wrap +# Word wrap, into PFU_WRAP_LINES. +PFU_WRAP_LINES=() + +_pfu_wrap() { + local width="$1" word line='' + local -a words + PFU_WRAP_LINES=() + read -r -a words <<< "$2" + for word in "${words[@]}"; do + if [[ -n $line ]] && (( ${#line} + 1 + ${#word} > width )); then + PFU_WRAP_LINES+=("$line") + line="$word" + else + line="${line:+$line }$word" + fi + done + [[ -n $line ]] && PFU_WRAP_LINES+=("$line") + return 0 +} + # _pfu_setting_value # The current value, in PFU_SETTING_VALUE. PFU_SETTING_VALUE='' @@ -285,34 +341,32 @@ _pfu_setting_value() { esac } -# _pfu_next_choice -_pfu_next_choice() { - local current="$1" list="$2" first='' found=0 c - local -a choices - IFS=',' read -r -a choices <<< "$list" - for c in "${choices[@]}"; do - [[ -z $first ]] && first="$c" - if (( found )); then - printf '%s\n' "$c" - return - fi - [[ $c == "$current" ]] && found=1 - done - printf '%s\n' "$first" -} - -# _pfu_next_camera -_pfu_next_camera() { - local current="$1" i - pfu_cameras_load - local -a all=(auto "${PFU_CAM_PATHS[@]}") +# _pfu_step ... +# The choice (1 or -1) away from the current one, round at the ends. +_pfu_step() { + local current="$1" step="$2" i + shift 2 + local -a all=("$@") for i in "${!all[@]}"; do if [[ ${all[i]} == "$current" ]]; then - printf '%s\n' "${all[(i + 1) % ${#all[@]}]}" + printf '%s\n' "${all[(i + step + ${#all[@]}) % ${#all[@]}]}" return fi done - printf 'auto\n' + printf '%s\n' "${all[0]}" +} + +# _pfu_next_choice +_pfu_next_choice() { + local -a choices + IFS=',' read -r -a choices <<< "$2" + _pfu_step "$1" "$3" "${choices[@]}" +} + +# _pfu_next_camera +_pfu_next_camera() { + pfu_cameras_load + _pfu_step "$1" "$2" auto "${PFU_CAM_PATHS[@]}" } _pfu_camera_label() { @@ -337,14 +391,14 @@ _pfu_camera_label() { printf '%s %s' "$value" "$(pfu_msg "(not connected)")" } -# _pfu_setting_change +# _pfu_setting_change _pfu_setting_change() { - local scope="$1" key="$2" type="$3" current="$4" choices="$5" next + local scope="$1" key="$2" type="$3" current="$4" choices="$5" step="$6" next case "$type" in bool) if pfu_is_true "$current"; then next=no; else next=yes; fi ;; - choice) next="$(_pfu_next_choice "$current" "$choices")" ;; - camera) next="$(_pfu_next_camera "$current")" ;; + choice) next="$(_pfu_next_choice "$current" "$choices" "$step")" ;; + camera) next="$(_pfu_next_camera "$current" "$step")" ;; esac case "$scope" in @@ -374,25 +428,42 @@ _pfu_setting_change() { } # pfu_ui_settings -# A cursor list rather than a numbered menu. The frame is assembled in memory -# and written once, and everything constant is resolved before the loop. +# A cursor list in groups, with what the selected setting does under it. The +# frame is assembled in memory and written once, and everything constant is +# resolved before the loop. pfu_ui_settings() { - local count=${#PFU_SETTINGS[@]} - local -a scopes=() keys=() types=() defaults=() labels=() choices=() values=() - local spec scope key type default label choice locale i frame row pad dirty=1 cursor=0 shown + local -a scopes=() keys=() types=() defaults=() labels=() choices=() needs=() values=() rows=() + local spec scope key type default label choice need locale i j frame row pad dirty=1 cursor=0 shown + local width=0 wrap cols locale="$(pfu_ui_locale)" for spec in "${PFU_SETTINGS[@]}"; do - IFS='|' read -r scope key type default label choice <<< "$spec" - scopes+=("$scope"); keys+=("$key"); types+=("$type"); defaults+=("$default"); choices+=("$choice") + IFS='|' read -r scope key type default label choice need <<< "$spec" + # A heading has its label where the key would be. + [[ $scope == group ]] && label="$key" key='' + scopes+=("$scope"); keys+=("$key"); types+=("$type"); defaults+=("$default") + choices+=("$choice"); needs+=("$need") pfu_msg_into "$locale" "$label" labels+=("$PFU_MSG_RESULT") + if [[ $scope != group ]]; then + rows+=($(( ${#keys[@]} - 1 ))) + (( ${#PFU_MSG_RESULT} > width )) && width=${#PFU_MSG_RESULT} + fi done + local count=${#rows[@]} - local title hint legend l_on l_off + cols="$(tput cols 2>/dev/null)" || cols=80 + [[ $cols =~ ^[0-9]+$ ]] || cols=80 + wrap=$(( cols - 4 )) + (( wrap > 72 )) && wrap=72 + local rule + printf -v rule '%*s' "$wrap" '' + rule="${rule// /─}" + + local title hint shared l_on l_off pfu_msg_into "$locale" "Settings"; title="$PFU_MSG_RESULT" - pfu_msg_into "$locale" "Up/Down: select, Space or Right: change, q: back"; hint="$PFU_MSG_RESULT" - pfu_msg_into "$locale" "Settings marked * are for the whole computer and ask for your password."; legend="$PFU_MSG_RESULT" + pfu_msg_into "$locale" "↑↓ select ←→ or Space: change q: back"; hint="$PFU_MSG_RESULT" + pfu_msg_into "$locale" "for all users, asks for your password"; shared="$PFU_MSG_RESULT" pfu_msg_into "$locale" "ON"; l_on="$PFU_MSG_RESULT" pfu_msg_into "$locale" "OFF"; l_off="$PFU_MSG_RESULT" @@ -404,17 +475,26 @@ pfu_ui_settings() { while true; do if (( dirty )); then PFU_KV_CACHE=() - for i in "${!keys[@]}"; do + declare -A current=() + for i in "${rows[@]}"; do _pfu_setting_value "${scopes[i]}" "${keys[i]}" "${defaults[i]}" values[i]="$PFU_SETTING_VALUE" + current[${keys[i]}]="$PFU_SETTING_VALUE" done dirty=0 fi - frame="$clearseq"$'\n'"${PFU_C_BOLD}${PFU_C_BLUE} ${title}${PFU_C_RESET}"$'\n\n' + frame="$clearseq"$'\n'"${PFU_C_BOLD}${PFU_C_BLUE} ${title}${PFU_C_RESET}"$'\n' - local marker selected="${PFU_C_BLUE}▸${PFU_C_RESET} " star + local selected=${rows[cursor]} marker before after dim for i in "${!keys[@]}"; do + if [[ ${scopes[i]} == group ]]; then + frame+=$'\n'" ${PFU_C_BOLD}${labels[i]}${PFU_C_RESET}" + # The next row says whose settings these are. + [[ ${scopes[i + 1]} != user ]] && frame+=" ${PFU_C_DIM}${shared}${PFU_C_RESET}" + frame+=$'\n' + continue + fi case "${types[i]}" in bool) if pfu_is_true "${values[i]}"; then @@ -426,22 +506,27 @@ pfu_ui_settings() { camera) shown="$(_pfu_camera_label "${values[i]}")" ;; *) shown="$(pfu_value_label "${keys[i]}" "${values[i]}")" ;; esac - star=' ' - [[ ${scopes[i]} != user ]] && star='*' - pad=$(( 44 - ${#labels[i]} )) - (( pad < 0 )) && pad=0 - if (( i == cursor )); then marker="$selected"; else marker=' '; fi - printf -v row ' %s%s%s%*s %s' "$marker" "${labels[i]}" "${PFU_C_DIM}${star}${PFU_C_RESET}" "$pad" '' "$shown" + # Arrows on the selected choice: left and right step through it. + before=' ' after='' + if (( i == selected )) && [[ ${types[i]} != bool ]]; then + before="${PFU_C_BLUE}◂${PFU_C_RESET} " after=" ${PFU_C_BLUE}▸${PFU_C_RESET}" + fi + dim='' + [[ -n ${needs[i]} ]] && ! pfu_is_true "${current[${needs[i]}]}" && dim="$PFU_C_DIM" + pad=$(( width + 2 - ${#labels[i]} )) + if (( i == selected )); then marker="${PFU_C_BLUE}▸${PFU_C_RESET} "; else marker=' '; fi + printf -v row ' %s%s%s%s%*s%s%s%s' "$marker" "$dim" "${labels[i]}" "$PFU_C_RESET" "$pad" '' "$before" "$dim$shown$PFU_C_RESET" "$after" frame+="$row"$'\n' - # A gap between the groups: the lock screen, other prompts, how it - # checks, the bubble. - case "${keys[i]}" in - ScanOnLock|polkit-1|SkipLidClosed) frame+=$'\n' ;; - esac done - frame+=$'\n'" ${PFU_C_DIM}${legend}${PFU_C_RESET}"$'\n' - frame+=" ${PFU_C_DIM}${hint}${PFU_C_RESET}"$'\n' + # What the selected setting does, in a box of fixed height so the + # screen does not jump while moving through the list. + _pfu_wrap "$wrap" "$(pfu_setting_help "${keys[selected]}" "${values[selected]}")" + frame+=$'\n'" ${PFU_C_DIM}${rule}${PFU_C_RESET}"$'\n' + for j in 0 1 2; do + frame+=" ${PFU_WRAP_LINES[j]:-}"$'\n' + done + frame+=$'\n'" ${PFU_C_DIM}${hint}${PFU_C_RESET}"$'\n' _pfu_ui_take_notices frame+="$PFU_UI_NOTICE_TEXT" printf '%s' "$frame" @@ -451,8 +536,10 @@ pfu_ui_settings() { case "$key" in up|k) cursor=$(( (cursor - 1 + count) % count )) ;; down|j) cursor=$(( (cursor + 1) % count )) ;; - space|enter|right|l) - _pfu_setting_change "${scopes[cursor]}" "${keys[cursor]}" "${types[cursor]}" "${values[cursor]}" "${choices[cursor]}" + space|enter|right|l|left|h) + local step=1 + [[ $key == left || $key == h ]] && step=-1 + _pfu_setting_change "${scopes[selected]}" "${keys[selected]}" "${types[selected]}" "${values[selected]}" "${choices[selected]}" "$step" dirty=1 ;; q|Q|escape) return 0 ;;