Skip to content

Commit 735b49e

Browse files
committed
Do not concatenate translated strings and fix typo in CONTRIBUTING.md
1 parent b48fac3 commit 735b49e

File tree

5 files changed

+54
-46
lines changed

5 files changed

+54
-46
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ Then `cd` into your build-directory (e.g. `build/`) and run
205205

206206
```
207207
# To update the POT template file, in case new strings have been added in the sources
208-
meson compile credentialds-ui-pot
208+
meson compile credentialsd-ui-pot
209209
# and to update the individual language files
210-
meson compile credentialds-ui-update-po
210+
meson compile credentialsd-ui-update-po
211211
```
212212
to update the template, so it contains all messages to be translated.
213213

credentialsd-ui/po/credentialsd-ui.pot

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
msgid ""
22
msgstr ""
3-
"POT-Creation-Date: 2025-10-13 11:55+0200\n"
3+
"Project-Id-Version: credentialsd-ui\n"
4+
"Report-Msgid-Bugs-To: \"https://github.com/linux-credentials/credentialsd/"
5+
"issues\"\n"
6+
"POT-Creation-Date: 2025-10-24 08:05+0200\n"
47
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
58
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
69
"Language: \n"
@@ -114,16 +117,16 @@ msgid ""
114117
"or use a different authenticator."
115118
msgstr ""
116119

117-
#: src/gui/view_model/gtk/mod.rs:137
118-
msgid "Enter your PIN."
119-
msgstr ""
120-
121-
#: src/gui/view_model/gtk/mod.rs:140
122-
msgid "One attempt remaining."
123-
msgid_plural "%d attempts remaining."
120+
#: src/gui/view_model/gtk/mod.rs:139
121+
msgid "Enter your PIN. One attempt remaining."
122+
msgid_plural "Enter your PIN. %d attempts remaining."
124123
msgstr[0] ""
125124
msgstr[1] ""
126125

126+
#: src/gui/view_model/gtk/mod.rs:145
127+
msgid "Enter your PIN."
128+
msgstr ""
129+
127130
#: src/gui/view_model/gtk/mod.rs:154
128131
msgid "Touch your device again. One attempt remaining."
129132
msgid_plural "Touch your device again. %d attempts remaining."

credentialsd-ui/po/de_DE.po

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
msgid ""
22
msgstr ""
33
"Project-Id-Version: PACKAGE VERSION\n"
4-
"POT-Creation-Date: 2025-10-10 14:45+0200\n"
4+
"Report-Msgid-Bugs-To: \"https://github.com/linux-credentials/credentialsd/"
5+
"issues\"\n"
6+
"POT-Creation-Date: 2025-10-24 08:05+0200\n"
57
"PO-Revision-Date: 2025-10-10 14:45+0200\n"
68
"Last-Translator: Martin Sirringhaus <martin.sirringhaus@suse.com>\n"
79
"Language: de_DE\n"
@@ -14,7 +16,7 @@ msgstr ""
1416
#. <project_license>LGPL-3.0-only</project_license>
1517
#: data/xyz.iinuwa.credentialsd.CredentialsUi.desktop.in.in:2
1618
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:8
17-
#: src/gui/view_model/gtk/mod.rs:370
19+
#: src/gui/view_model/gtk/mod.rs:372
1820
msgid "Credential Manager"
1921
msgstr "Zugangsdatenmanager"
2022

@@ -43,8 +45,7 @@ msgstr "Fenster maximiert"
4345
msgid ""
4446
"A boilerplate template for GTK + Rust. It uses Meson as a build system and "
4547
"has flatpak support by default."
46-
msgstr ""
47-
"Eine Vorlage für eine GTK + Rust Anwendung."
48+
msgstr "Eine Vorlage für eine GTK + Rust Anwendung."
4849

4950
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:16
5051
msgid "Registering a credential"
@@ -113,16 +114,17 @@ msgstr ""
113114
"Beim Abrufen Ihrer Zugangsdaten ist ein Fehler aufgetreten. Versuchen Sie es "
114115
"später wieder, oder verwenden Sie einen anderen Security-Token."
115116

116-
#: src/gui/view_model/gtk/mod.rs:137
117+
#: src/gui/view_model/gtk/mod.rs:139
118+
#, fuzzy
119+
msgid "Enter your PIN. One attempt remaining."
120+
msgid_plural "Enter your PIN. %d attempts remaining."
121+
msgstr[0] "Geben Sie Ihren PIN ein. Sie haben nur noch einen Versuch."
122+
msgstr[1] "Geben Sie Ihren PIN ein. Sie haben noch %d Versuche."
123+
124+
#: src/gui/view_model/gtk/mod.rs:145
117125
msgid "Enter your PIN."
118126
msgstr "Geben Sie Ihren PIN ein."
119127

120-
#: src/gui/view_model/gtk/mod.rs:140
121-
msgid "One attempt remaining."
122-
msgid_plural "%d attempts remaining."
123-
msgstr[0] "Sie haben nur noch einen Versuch."
124-
msgstr[1] "Sie haben noch %d Versuche."
125-
126128
#: src/gui/view_model/gtk/mod.rs:154
127129
msgid "Touch your device again. One attempt remaining."
128130
msgid_plural "Touch your device again. %d attempts remaining."
@@ -139,14 +141,16 @@ msgstr "Berühren Sie Ihr Gerät."
139141

140142
#: src/gui/view_model/gtk/mod.rs:168
141143
msgid "Scan the QR code with your device to begin authentication."
142-
msgstr "Scannen Sie den QR code mit ihrem Gerät um die Authentifizierung zu beginnen."
144+
msgstr ""
145+
"Scannen Sie den QR code mit ihrem Gerät um die Authentifizierung zu beginnen."
143146

144147
#: src/gui/view_model/gtk/mod.rs:178
145148
msgid ""
146149
"Connecting to your device. Make sure both devices are near each other and "
147150
"have Bluetooth enabled."
148151
msgstr ""
149-
"Verbindung zu Ihrem Gerät wird aufgebaut. Stellen Sie sicher, dass beide Geräte nah beieinander sind und Bluetooth aktiviert haben."
152+
"Verbindung zu Ihrem Gerät wird aufgebaut. Stellen Sie sicher, dass beide "
153+
"Geräte nah beieinander sind und Bluetooth aktiviert haben."
150154

151155
#: src/gui/view_model/gtk/mod.rs:186
152156
msgid "Device connected. Follow the instructions on your device"
@@ -204,7 +208,9 @@ msgstr "Keine passenden Zugangsdaten auf diesem Gerät gefunden."
204208
msgid ""
205209
"No more PIN attempts allowed. Try removing your device and plugging it back "
206210
"in."
207-
msgstr "Keine weiteren PIN-Eingaben erlaubt. Versuchen Sie ihr Gerät aus- und wieder einzustecken."
211+
msgstr ""
212+
"Keine weiteren PIN-Eingaben erlaubt. Versuchen Sie ihr Gerät aus- und wieder "
213+
"einzustecken."
208214

209215
#: src/gui/view_model/mod.rs:236
210216
msgid "This credential is already registered on this authenticator."

credentialsd-ui/po/en_US.po

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
msgid ""
22
msgstr ""
3-
"POT-Creation-Date: 2025-10-10 14:45+0200\n"
3+
"Report-Msgid-Bugs-To: \"https://github.com/linux-credentials/credentialsd/"
4+
"issues\"\n"
5+
"POT-Creation-Date: 2025-10-24 08:05+0200\n"
46
"PO-Revision-Date: 2025-10-10 14:45+0200\n"
57
"Last-Translator: Martin Sirringhaus <martin.sirringhaus@suse.com>\n"
68
"Language: en_US\n"
@@ -13,7 +15,7 @@ msgstr ""
1315
#. <project_license>LGPL-3.0-only</project_license>
1416
#: data/xyz.iinuwa.credentialsd.CredentialsUi.desktop.in.in:2
1517
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:8
16-
#: src/gui/view_model/gtk/mod.rs:370
18+
#: src/gui/view_model/gtk/mod.rs:372
1719
msgid "Credential Manager"
1820
msgstr "Credential Manager"
1921

@@ -50,11 +52,6 @@ msgstr ""
5052
msgid "Registering a credential"
5153
msgstr "Registering a credential"
5254

53-
#. developer_name tag deprecated with Appstream 1.0
54-
#: data/xyz.iinuwa.credentialsd.CredentialsUi.metainfo.xml.in.in:34
55-
msgid "Isaiah Inuwa"
56-
msgstr "Isaiah Inuwa"
57-
5855
#: data/resources/ui/shortcuts.ui:11
5956
msgctxt "shortcut window"
6057
msgid "General"
@@ -118,16 +115,17 @@ msgstr ""
118115
"Something went wrong while retrieving a credential. Please try again later "
119116
"or use a different authenticator."
120117

121-
#: src/gui/view_model/gtk/mod.rs:137
118+
#: src/gui/view_model/gtk/mod.rs:139
119+
#, fuzzy
120+
msgid "Enter your PIN. One attempt remaining."
121+
msgid_plural "Enter your PIN. %d attempts remaining."
122+
msgstr[0] "Enter your PIN. One attempt remaining."
123+
msgstr[1] "Enter your PIN. %d attempts remaining."
124+
125+
#: src/gui/view_model/gtk/mod.rs:145
122126
msgid "Enter your PIN."
123127
msgstr "Enter your PIN."
124128

125-
#: src/gui/view_model/gtk/mod.rs:140
126-
msgid "One attempt remaining."
127-
msgid_plural "%d attempts remaining."
128-
msgstr[0] "One attempt remaining."
129-
msgstr[1] "%d attempts remaining."
130-
131129
#: src/gui/view_model/gtk/mod.rs:154
132130
msgid "Touch your device again. One attempt remaining."
133131
msgid_plural "Touch your device again. %d attempts remaining."
@@ -220,4 +218,5 @@ msgstr "This credential is already registered on this authenticator."
220218

221219
#: src/gui/view_model/mod.rs:284
222220
msgid "Something went wrong. Try again later or use a different authenticator."
223-
msgstr "Something went wrong. Try again later or use a different authenticator."
221+
msgstr ""
222+
"Something went wrong. Try again later or use a different authenticator."

credentialsd-ui/src/gui/view_model/gtk/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,16 @@ impl ViewModel {
134134
view_model.waiting_for_device(&device)
135135
}
136136
ViewUpdate::UsbNeedsPin { attempts_left } => {
137-
let mut prompt = gettext("Enter your PIN.");
138-
if let Some(left) = attempts_left {
137+
let prompt = if let Some(left) = attempts_left {
139138
let localized = ngettext(
140-
"One attempt remaining.",
141-
"%d attempts remaining.",
139+
"Enter your PIN. One attempt remaining.",
140+
"Enter your PIN. %d attempts remaining.",
142141
left,
143142
);
144-
prompt.push(' ');
145-
prompt += &localized.replace("%d", &format!("{}", left));
146-
}
143+
localized.replace("%d", &format!("{}", left))
144+
} else {
145+
gettext("Enter your PIN.")
146+
};
147147
view_model.set_prompt(prompt);
148148
view_model.set_usb_pin_entry_visible(true);
149149
}

0 commit comments

Comments
 (0)