Marco Ricci commited on 2025-01-07 19:54:00
Zeige 1 geänderte Dateien mit 58 Einfügungen und 13 Löschungen.
... for diagnostic labels, introductory paragraphs of help texts, and error messages of the form "user aborted operation".
| ... | ... |
@@ -222,10 +222,22 @@ class TranslatedString: |
| 222 | 222 |
|
| 223 | 223 |
class Label(enum.Enum): |
| 224 | 224 |
DEPRECATION_WARNING_LABEL = _prepare_translatable( |
| 225 |
- 'Deprecation warning', comments='', context='diagnostic label' |
|
| 225 |
+ comments=r""" |
|
| 226 |
+ TRANSLATORS: This is a short label that will be prepended to |
|
| 227 |
+ a warning message, e.g., "Deprecation warning: A subcommand will |
|
| 228 |
+ be required in v1.0." |
|
| 229 |
+ """, |
|
| 230 |
+ msg='Deprecation warning', |
|
| 231 |
+ context='diagnostic label', |
|
| 226 | 232 |
) |
| 227 | 233 |
WARNING_LABEL = _prepare_translatable( |
| 228 |
- 'Warning', comments='', context='diagnostic label' |
|
| 234 |
+ comments=r""" |
|
| 235 |
+ TRANSLATORS: This is a short label that will be prepended to |
|
| 236 |
+ a warning message, e.g., "Warning: An empty service name is not |
|
| 237 |
+ supported by vault(1)." |
|
| 238 |
+ """, |
|
| 239 |
+ msg='Warning', |
|
| 240 |
+ context='diagnostic label', |
|
| 229 | 241 |
) |
| 230 | 242 |
CANNOT_UPDATE_SETTINGS_METAVAR_SETTINGS_TYPE_GLOBAL = ( |
| 231 | 243 |
_prepare_translatable( |
| ... | ... |
@@ -254,10 +266,15 @@ class Label(enum.Enum): |
| 254 | 266 |
) |
| 255 | 267 |
) |
| 256 | 268 |
DERIVEPASSPHRASE_01 = _prepare_translatable( |
| 269 |
+ comments=r""" |
|
| 270 |
+ TRANSLATORS: This is the first paragraph of the command help |
|
| 271 |
+ text, but it also appears (in truncated form, if necessary) as |
|
| 272 |
+ one-line help text for this command. The translation should |
|
| 273 |
+ thus be as meaningful as possible even if truncated. |
|
| 274 |
+ """, |
|
| 257 | 275 |
msg=""" |
| 258 | 276 |
Derive a strong passphrase, deterministically, from a master secret. |
| 259 | 277 |
""", |
| 260 |
- comments='', |
|
| 261 | 278 |
context='help text (long form)', |
| 262 | 279 |
) |
| 263 | 280 |
DERIVEPASSPHRASE_02 = _prepare_translatable( |
| ... | ... |
@@ -289,10 +306,15 @@ class Label(enum.Enum): |
| 289 | 306 |
context='help text (long form)', |
| 290 | 307 |
) |
| 291 | 308 |
DERIVEPASSPHRASE_EXPORT_01 = _prepare_translatable( |
| 309 |
+ comments=r""" |
|
| 310 |
+ TRANSLATORS: This is the first paragraph of the command help |
|
| 311 |
+ text, but it also appears (in truncated form, if necessary) as |
|
| 312 |
+ one-line help text for this command. The translation should |
|
| 313 |
+ thus be as meaningful as possible even if truncated. |
|
| 314 |
+ """, |
|
| 292 | 315 |
msg=""" |
| 293 | 316 |
Export a foreign configuration to standard output. |
| 294 | 317 |
""", |
| 295 |
- comments='', |
|
| 296 | 318 |
context='help text (long form)', |
| 297 | 319 |
) |
| 298 | 320 |
DERIVEPASSPHRASE_EXPORT_02 = _prepare_translatable( |
| ... | ... |
@@ -306,10 +328,15 @@ class Label(enum.Enum): |
| 306 | 328 |
) |
| 307 | 329 |
DERIVEPASSPHRASE_EXPORT_03 = DERIVEPASSPHRASE_03 |
| 308 | 330 |
DERIVEPASSPHRASE_EXPORT_VAULT_01 = _prepare_translatable( |
| 331 |
+ comments=r""" |
|
| 332 |
+ TRANSLATORS: This is the first paragraph of the command help |
|
| 333 |
+ text, but it also appears (in truncated form, if necessary) as |
|
| 334 |
+ one-line help text for this command. The translation should |
|
| 335 |
+ thus be as meaningful as possible even if truncated. |
|
| 336 |
+ """, |
|
| 309 | 337 |
msg=""" |
| 310 | 338 |
Export a vault-native configuration to standard output. |
| 311 | 339 |
""", |
| 312 |
- comments='', |
|
| 313 | 340 |
context='help text (long form)', |
| 314 | 341 |
) |
| 315 | 342 |
DERIVEPASSPHRASE_EXPORT_VAULT_02 = _prepare_translatable( |
| ... | ... |
@@ -334,10 +361,15 @@ class Label(enum.Enum): |
| 334 | 361 |
flags='python-brace-format', |
| 335 | 362 |
) |
| 336 | 363 |
DERIVEPASSPHRASE_VAULT_01 = _prepare_translatable( |
| 364 |
+ comments=r""" |
|
| 365 |
+ TRANSLATORS: This is the first paragraph of the command help |
|
| 366 |
+ text, but it also appears (in truncated form, if necessary) as |
|
| 367 |
+ one-line help text for this command. The translation should |
|
| 368 |
+ thus be as meaningful as possible even if truncated. |
|
| 369 |
+ """, |
|
| 337 | 370 |
msg=""" |
| 338 | 371 |
Derive a passphrase using the vault derivation scheme. |
| 339 | 372 |
""", |
| 340 |
- comments='', |
|
| 341 | 373 |
context='help text (long form)', |
| 342 | 374 |
) |
| 343 | 375 |
DERIVEPASSPHRASE_VAULT_02 = _prepare_translatable( |
| ... | ... |
@@ -370,8 +402,12 @@ class Label(enum.Enum): |
| 370 | 402 |
context='help text (long form)', |
| 371 | 403 |
) |
| 372 | 404 |
DEPRECATED_COMMAND_LABEL = _prepare_translatable( |
| 405 |
+ comments=r""" |
|
| 406 |
+ TRANSLATORS: We use this format string to indicate, at the |
|
| 407 |
+ beginning of a command's help text, that this command is |
|
| 408 |
+ deprecated. |
|
| 409 |
+ """, |
|
| 373 | 410 |
msg='(Deprecated) {text}',
|
| 374 |
- comments='', |
|
| 375 | 411 |
context='help text (long form, label)', |
| 376 | 412 |
flags='python-brace-format', |
| 377 | 413 |
) |
| ... | ... |
@@ -1172,18 +1208,27 @@ class ErrMsgTemplate(enum.Enum): |
| 1172 | 1208 |
context='error message', |
| 1173 | 1209 |
) |
| 1174 | 1210 |
USER_ABORTED_EDIT = _prepare_translatable( |
| 1175 |
- 'Not saving any new notes: the user aborted the request.', |
|
| 1176 |
- comments='', |
|
| 1211 |
+ comments=r""" |
|
| 1212 |
+ TRANSLATORS: The user requested to edit the notes for a service, |
|
| 1213 |
+ but aborted the request mid-editing. |
|
| 1214 |
+ """, |
|
| 1215 |
+ msg='Not saving any new notes: the user aborted the request.', |
|
| 1177 | 1216 |
context='error message', |
| 1178 | 1217 |
) |
| 1179 | 1218 |
USER_ABORTED_PASSPHRASE = _prepare_translatable( |
| 1180 |
- 'No passphrase was given; the user aborted the request.', |
|
| 1181 |
- comments='', |
|
| 1219 |
+ comments=r""" |
|
| 1220 |
+ TRANSLATORS: The user was prompted for a master passphrase, |
|
| 1221 |
+ but aborted the request. |
|
| 1222 |
+ """, |
|
| 1223 |
+ msg='No passphrase was given; the user aborted the request.', |
|
| 1182 | 1224 |
context='error message', |
| 1183 | 1225 |
) |
| 1184 | 1226 |
USER_ABORTED_SSH_KEY_SELECTION = _prepare_translatable( |
| 1185 |
- 'No SSH key was selected; the user aborted the request.', |
|
| 1186 |
- comments='', |
|
| 1227 |
+ comments=r""" |
|
| 1228 |
+ TRANSLATORS: The user was prompted to select a master SSH key, |
|
| 1229 |
+ but aborted the request. |
|
| 1230 |
+ """, |
|
| 1231 |
+ msg='No SSH key was selected; the user aborted the request.', |
|
| 1187 | 1232 |
context='error message', |
| 1188 | 1233 |
) |
| 1189 | 1234 |
|
| 1190 | 1235 |