f38b80e71b72c46036ddccd2dc7c5cfbb6a4daf2
Marco Ricci Update copyright notices to...

Marco Ricci authored 2 months ago

1) # SPDX-FileCopyrightText: 2025 Marco Ricci <software@the13thletter.info>
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

2) #
3) # SPDX-Licence-Identifier: MIT
4) 
5) """Internal module.  Do not use.  Contains error strings and functions."""
6) 
7) from __future__ import annotations
8) 
Marco Ricci Provide a function to reloa...

Marco Ricci authored 2 months ago

9) import contextlib
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

10) import datetime
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

11) import enum
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

12) import functools
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

13) import gettext
14) import inspect
Marco Ricci Provide a function to reloa...

Marco Ricci authored 2 months ago

15) import os
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

16) import string
Marco Ricci Provide a function to reloa...

Marco Ricci authored 2 months ago

17) import sys
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

18) import textwrap
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

19) import types
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

20) from typing import TYPE_CHECKING, NamedTuple, Protocol, TextIO, Union, cast
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

21) 
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

22) from typing_extensions import TypeAlias, override
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

23) 
24) import derivepassphrase as dpp
25) 
26) if TYPE_CHECKING:
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

27)     from collections.abc import Iterable, Iterator, Mapping, Sequence
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

28) 
29)     from typing_extensions import Any, Self
30) 
31) __author__ = dpp.__author__
32) __version__ = dpp.__version__
33) 
34) __all__ = ('PROG_NAME',)
35) 
36) PROG_NAME = 'derivepassphrase'
Marco Ricci Provide a function to reloa...

Marco Ricci authored 2 months ago

37) 
38) 
39) def load_translations(
40)     localedirs: list[str] | None = None,
41)     languages: Sequence[str] | None = None,
42)     class_: type[gettext.NullTranslations] | None = None,
Marco Ricci Fix coverage

Marco Ricci authored 2 months ago

43) ) -> gettext.NullTranslations:  # pragma: no cover
Marco Ricci Provide a function to reloa...

Marco Ricci authored 2 months ago

44)     """Load a translation catalog for derivepassphrase.
45) 
46)     Runs [`gettext.translation`][] under the hood for multiple locale
47)     directories.  `fallback=True` is implied.
48) 
49)     Args:
50)         localedirs:
51)             A list of directories to run [`gettext.translation`][]
52)             against.  Defaults to `$XDG_DATA_HOME/locale` (usually
53)             `~/.local/share/locale`), `{sys.prefix}/share/locale` and
54)             `{sys.base_prefix}/share/locale` if not given.
55)         languages:
56)             Passed directly to [`gettext.translation`][].
57)         class_:
58)             Passed directly to [`gettext.translation`][].
59) 
60)     Returns:
61)         A (potentially dummy) translation catalog.
62) 
63)     """
64)     if localedirs is None:
65)         if sys.platform.startswith('win'):
66)             xdg_data_home = os.environ.get(
67)                 'APPDATA',
68)                 os.path.expanduser('~'),
69)             )
70)         elif os.environ.get('XDG_DATA_HOME'):
71)             xdg_data_home = os.environ['XDG_DATA_HOME']
72)         else:
73)             xdg_data_home = os.path.join(
74)                 os.path.expanduser('~'), '.local', 'share'
75)             )
76)         localedirs = [
77)             os.path.join(xdg_data_home, 'locale'),
78)             os.path.join(sys.prefix, 'share', 'locale'),
79)             os.path.join(sys.base_prefix, 'share', 'locale'),
80)         ]
81)     for localedir in localedirs:
82)         with contextlib.suppress(OSError):
83)             return gettext.translation(
84)                 PROG_NAME,
85)                 localedir=localedir,
86)                 languages=languages,
87)                 class_=class_,
88)             )
89)     return gettext.NullTranslations()
90) 
91) 
92) translation = load_translations()
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

93) _debug_translation_message_cache: dict[
94)     tuple[str, str],
95)     tuple[MsgTemplate, frozenset],
96) ] = {}
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

97) 
98) 
99) class DebugTranslations(gettext.NullTranslations):
100)     """A debug object indicating which known message is being requested.
101) 
102)     Each call to the `*gettext` methods will return the enum name if the
103)     message is a known translatable message for the `derivepassphrase`
104)     command-line interface, or the message itself otherwise.
105) 
106)     """
107) 
108)     @staticmethod
109)     def _load_cache() -> None:
110)         cache = _debug_translation_message_cache
111)         for enum_class in MSG_TEMPLATE_CLASSES:
112)             for member in enum_class.__members__.values():
113)                 value = cast('TranslatableString', member.value)
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

114)                 queue: list[tuple[TranslatableString, frozenset[str]]] = [
115)                     (value, frozenset())
116)                 ]
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

117)                 value2 = value.maybe_without_filename()
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

118)                 if value != value2:
119)                     queue.append((value2, frozenset({'filename'})))
120)                 for v, trimmed in queue:
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

121)                     singular = v.singular
122)                     plural = v.plural
123)                     context = v.l10n_context
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

124)                     cache.setdefault((context, singular), (member, trimmed))
Marco Ricci Fix obvious coverage failur...

Marco Ricci authored 2 months ago

125)                     # Currently no translatable messages use plural forms
126)                     if plural:  # pragma: no cover
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

127)                         cache.setdefault((context, plural), (member, trimmed))
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

128) 
129)     @classmethod
130)     def _locate_message(
131)         cls,
132)         message: str,
133)         /,
134)         *,
135)         context: str = '',
136)         message_plural: str = '',
137)         n: int = 1,
138)     ) -> str:
139)         try:
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

140)             enum_value, trimmed = _debug_translation_message_cache[
141)                 context, message
142)             ]
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

143)         except KeyError:
144)             return message if not message_plural or n == 1 else message_plural
145)         return cls._format_enum_name_maybe_with_fields(
146)             enum_name=str(enum_value),
147)             ts=cast('TranslatableString', enum_value.value),
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

148)             trimmed=trimmed,
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

149)         )
150) 
151)     @staticmethod
152)     def _format_enum_name_maybe_with_fields(
153)         enum_name: str,
154)         ts: TranslatableString,
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

155)         trimmed: frozenset[str] = frozenset(),
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

156)     ) -> str:
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

157)         formatted_fields = [
158)             f'{f}=None' if f in trimmed else f'{f}={{{f}!r}}'
Marco Ricci Add hypothesis-based tests...

Marco Ricci authored 2 months ago

159)             for f in ts.fields()
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

160)         ]
161)         return (
Marco Ricci Fix debug output of message...

Marco Ricci authored 2 months ago

162)             '{!s}({})'.format(enum_name, ', '.join(formatted_fields))
163)             if formatted_fields
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

164)             else str(enum_name)
165)         )
166) 
167)     @override
168)     def gettext(
169)         self,
170)         message: str,
171)         /,
Marco Ricci Add hypothesis-based tests...

Marco Ricci authored 2 months ago

172)     ) -> str:
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

173)         return self._locate_message(message)
174) 
175)     @override
176)     def ngettext(
177)         self,
178)         msgid1: str,
179)         msgid2: str,
180)         n: int,
181)         /,
182)     ) -> str:  # pragma: no cover
183)         return self._locate_message(msgid1, message_plural=msgid2, n=n)
184) 
185)     @override
186)     def pgettext(
187)         self,
188)         context: str,
189)         message: str,
190)         /,
191)     ) -> str:
192)         return self._locate_message(message, context=context)
193) 
194)     @override
195)     def npgettext(
196)         self,
197)         context: str,
198)         msgid1: str,
199)         msgid2: str,
200)         n: int,
201)         /,
202)     ) -> str:  # pragma: no cover
203)         return self._locate_message(
204)             msgid1,
205)             context=context,
206)             message_plural=msgid2,
207)             n=n,
208)         )
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

209) 
210) 
211) class TranslatableString(NamedTuple):
212)     l10n_context: str
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

213)     singular: str
214)     plural: str = ''
215)     flags: frozenset[str] = frozenset()
216)     translator_comments: str = ''
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

217) 
Marco Ricci Add hypothesis-based tests...

Marco Ricci authored 2 months ago

218)     def fields(self) -> list[str]:
219)         """Return the replacement fields this template requires.
220) 
221)         Raises:
222)             NotImplementedError:
223)                 Replacement field discovery for %-formatting is not
224)                 implemented.
225) 
226)         """
227)         if 'python-format' in self.flags:  # pragma: no cover
228)             err_msg = (
229)                 'Replacement field discovery for %-formatting '
230)                 'is not implemented'
231)             )
232)             raise NotImplementedError(err_msg)
233)         if (
234)             'no-python-brace-format' in self.flags
235)             or 'python-brace-format' not in self.flags
236)         ):
237)             return []
238)         formatter = string.Formatter()
239)         fields: dict[str, int] = {}
240)         for _lit, field, _spec, _conv in formatter.parse(self.singular):
241)             if field is not None and field not in fields:
242)                 fields[field] = len(fields)
243)         return sorted(fields, key=fields.__getitem__)
244) 
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

245)     @staticmethod
246)     def _maybe_rewrap(
247)         string: str,
248)         /,
249)         *,
250)         fix_sentence_endings: bool = True,
251)     ) -> str:
252)         string = inspect.cleandoc(string)
253)         if not any(s.strip() == '\b' for s in string.splitlines()):
254)             string = '\n'.join(
255)                 textwrap.wrap(
256)                     string,
257)                     width=float('inf'),  # type: ignore[arg-type]
258)                     fix_sentence_endings=fix_sentence_endings,
259)                 )
260)             )
261)         else:
262)             string = ''.join(
263)                 s
264)                 for s in string.splitlines(True)  # noqa: FBT003
265)                 if s.strip() != '\b'
266)             )
267)         return string
268) 
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

269)     def maybe_without_filename(self) -> Self:
270)         """Return a new translatable string without the "filename" field.
271) 
272)         Only acts upon translatable strings containing the exact
273)         contents `": {filename!r}"`.  The specified part will be
274)         removed.  This is correct usage in English for messages like
275)         `"Cannot open file: {error!s}: {filename!r}."`, but not
276)         necessarily in other languages.
277) 
278)         """
279)         filename_str = ': {filename!r}'
280)         ret = self
281)         a, sep1, b = self.singular.partition(filename_str)
282)         c, sep2, d = self.plural.partition(filename_str)
283)         if sep1:
284)             ret = ret._replace(singular=(a + b))
Marco Ricci Fix obvious coverage failur...

Marco Ricci authored 2 months ago

285)         # Currently no translatable messages use plural forms
286)         if sep2:  # pragma: no cover
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

287)             ret = ret._replace(plural=(c + d))
288)         return ret
289) 
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

290)     def rewrapped(self) -> Self:
291)         """Return a rewrapped version of self.
292) 
293)         Normalizes all parts assumed to contain English prose.
294) 
295)         """
296)         msg = self._maybe_rewrap(self.singular, fix_sentence_endings=True)
297)         plural = self._maybe_rewrap(self.plural, fix_sentence_endings=True)
298)         context = self.l10n_context.strip()
299)         comments = self._maybe_rewrap(
300)             self.translator_comments, fix_sentence_endings=False
301)         )
302)         return self._replace(
303)             singular=msg,
304)             plural=plural,
305)             l10n_context=context,
306)             translator_comments=comments,
307)         )
308) 
309)     def with_comments(self, comments: str, /) -> Self:
310)         """Add or replace the string's translator comments.
311) 
312)         The comments are assumed to contain English prose, and will be
313)         normalized.
314) 
315)         Returns:
316)             A new [`TranslatableString`][] with the specified comments.
317) 
318)         """
319)         if not comments.lstrip().startswith(  # pragma: no cover
320)             'TRANSLATORS:'
321)         ):
322)             comments = 'TRANSLATORS: ' + comments.lstrip()
323)         comments = self._maybe_rewrap(comments, fix_sentence_endings=False)
324)         return self._replace(translator_comments=comments)
325) 
326)     def validate_flags(self, *extra_flags: str) -> Self:
327)         """Add all flags, then validate them against the string.
328) 
329)         Returns:
330)             A new [`TranslatableString`][] with the extra flags added,
331)             and all flags validated.
332) 
333)         Raises:
334)             ValueError:
335)                 The flags failed to validate.  See the exact error
336)                 message for details.
337) 
Marco Ricci Fix obvious coverage failur...

Marco Ricci authored 2 months ago

338)         Examples:
339)             >>> TranslatableString('', 'all OK').validate_flags()
340)             ... # doctest: +NORMALIZE_WHITESPACE
341)             TranslatableString(l10n_context='', singular='all OK', plural='',
342)                                flags=frozenset(), translator_comments='')
343)             >>> TranslatableString('', '20% OK').validate_flags(
344)             ...     'no-python-format'
345)             ... )
346)             ... # doctest: +NORMALIZE_WHITESPACE
347)             TranslatableString(l10n_context='', singular='20% OK', plural='',
348)                                flags=frozenset({'no-python-format'}),
349)                                translator_comments='')
350)             >>> TranslatableString('', '%d items').validate_flags()
351)             ... # doctest: +ELLIPSIS
352)             Traceback (most recent call last):
353)                 ...
354)             ValueError: Missing flag for how to deal with percent character ...
355)             >>> TranslatableString('', '{braces}').validate_flags()
356)             ... # doctest: +ELLIPSIS
357)             Traceback (most recent call last):
358)                 ...
359)             ValueError: Missing flag for how to deal with brace character ...
360)             >>> TranslatableString('', 'no braces').validate_flags(
361)             ...     'python-brace-format'
362)             ... )
363)             ... # doctest: +ELLIPSIS
364)             Traceback (most recent call last):
365)                 ...
366)             ValueError: Missing format string parameters ...
367) 
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

368)         """
369)         all_flags = frozenset(
370)             f.strip() for f in self.flags.union(extra_flags)
371)         )
372)         if '{' in self.singular and not bool(
373)             all_flags & {'python-brace-format', 'no-python-brace-format'}
374)         ):
375)             msg = (
376)                 f'Missing flag for how to deal with brace character '
377)                 f'in {self.singular!r}'
378)             )
379)             raise ValueError(msg)
380)         if '%' in self.singular and not bool(
381)             all_flags & {'python-format', 'no-python-format'}
382)         ):
383)             msg = (
384)                 f'Missing flag for how to deal with percent character '
385)                 f'in {self.singular!r}'
386)             )
387)             raise ValueError(msg)
388)         if (
389)             all_flags & {'python-format', 'python-brace-format'}
390)             and '%' not in self.singular
391)             and '{' not in self.singular
392)         ):
393)             msg = f'Missing format string parameters in {self.singular!r}'
394)             raise ValueError(msg)
395)         return self._replace(flags=all_flags)
396) 
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

397) 
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

398) def translatable(
399)     context: str,
400)     single: str,
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

401)     # /,
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

402)     flags: Iterable[str] = (),
403)     plural: str = '',
404)     comments: str = '',
405) ) -> TranslatableString:
406)     """Return a [`TranslatableString`][] with validated parts.
407) 
408)     This factory function is really only there to make the enum
409)     definitions more readable.
410) 
411)     """
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

412)     flags = (
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

413)         frozenset(flags)
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

414)         if not isinstance(flags, str)
415)         else frozenset({flags})
416)     )
Marco Ricci Move translation string pre...

Marco Ricci authored 2 months ago

417)     return (
418)         TranslatableString(context, single, plural=plural, flags=flags)
419)         .rewrapped()
420)         .with_comments(comments)
421)         .validate_flags()
422)     )
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

423) 
424) 
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

425) class TranslatedString:
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

426)     def __init__(
427)         self,
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

428)         template: (
429)             str
430)             | TranslatableString
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

431)             | MsgTemplate
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

432)         ),
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

433)         args_dict: Mapping[str, Any] = types.MappingProxyType({}),
434)         /,
435)         **kwargs: Any,  # noqa: ANN401
436)     ) -> None:
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

437)         if isinstance(template, MSG_TEMPLATE_CLASSES):
Marco Ricci Add remaining re-linting ch...

Marco Ricci authored 2 months ago

438)             template = cast('TranslatableString', template.value)
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

439)         self.template = template
440)         self.kwargs = {**args_dict, **kwargs}
441)         self._rendered: str | None = None
442) 
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

443)     def __bool__(self) -> bool:
444)         return bool(str(self))
445) 
446)     def __eq__(self, other: object) -> bool:  # pragma: no cover
447)         return str(self) == other
448) 
449)     def __hash__(self) -> int:  # pragma: no cover
450)         return hash(str(self))
451) 
452)     def __repr__(self) -> str:  # pragma: no cover
453)         return (
454)             f'{self.__class__.__name__}({self.template!r}, '
455)             f'{dict(self.kwargs)!r})'
456)         )
457) 
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

458)     def __str__(self) -> str:
459)         if self._rendered is None:
Marco Ricci Add hypothesis-based tests...

Marco Ricci authored 2 months ago

460)             do_escape = False
461)             if isinstance(self.template, str):
462)                 context = ''
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

463)                 template = self.template
464)             else:
465)                 context = self.template.l10n_context
466)                 template = self.template.singular
Marco Ricci Add hypothesis-based tests...

Marco Ricci authored 2 months ago

467)                 do_escape = 'no-python-brace-format' in self.template.flags
468)             template = (
469)                 translation.pgettext(context, template)
470)                 if context
471)                 else translation.gettext(template)
472)             )
473)             template = self._escape(template) if do_escape else template
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

474)             kwargs = {
475)                 k: str(v) if isinstance(v, TranslatedString) else v
476)                 for k, v in self.kwargs.items()
477)             }
478)             self._rendered = template.format(**kwargs)
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

479)         return self._rendered
480) 
Marco Ricci Add hypothesis-based tests...

Marco Ricci authored 2 months ago

481)     @staticmethod
482)     def _escape(template: str) -> str:
483)         return template.translate({
484)             ord('{'): '{{',
485)             ord('}'): '}}',
486)         })
487) 
488)     @classmethod
489)     def constant(cls, template: str) -> Self:
490)         return cls(cls._escape(template))
491) 
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

492)     def maybe_without_filename(self) -> Self:
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

493)         """Return a new string without the "filename" field.
494) 
495)         Only acts upon translated strings containing the exact contents
496)         `": {filename!r}"`.  The specified part will be removed.  This
497)         acts upon the string *before* translation, i.e., the string
498)         without the filename will be used as a translation base.
499) 
500)         """
501)         new_template = (
502)             self.template.maybe_without_filename()
503)             if not isinstance(self.template, str)
504)             else self.template
505)         )
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

506)         if (
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

507)             not isinstance(new_template, str)
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

508)             and self.kwargs.get('filename') is None
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

509)             and new_template != self.template
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

510)         ):
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

511)             return self.__class__(new_template, self.kwargs)
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

512)         return self
513) 
514) 
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

515) class _TranslatedStringConstructor(Protocol):
516)     def __call__(
517)         self,
518)         context: str,
519)         single: str,
520)         # /,
521)         flags: Iterable[str] = (),
522)         plural: str = '',
523)         comments: str = '',
524)     ) -> TranslatableString: ...
525) 
526) 
527) def _Commented(  # noqa: N802
528)     comments: str = '',
529)     # /
530) ) -> _TranslatedStringConstructor:
531)     """A "decorator" for readably constructing commented enum values.
532) 
533)     This is geared towards the quirks of the API documentation extractor
534)     `mkdocstrings-python`/`griffe`, which reformat and trim enum value
535)     declarations in somewhat weird ways.  Chains of function calls are
536)     preserved, though, so use this to our advantage to suggest
537)     a specific formatting.
538) 
539)     This is not necessarily good code style, and it is
540)     (quasi-)unnecessarily heavyweight.
541) 
542)     """  # noqa: DOC201
543)     return functools.partial(translatable, comments=comments)
544) 
545) 
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

546) class Label(enum.Enum):
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

547)     DEPRECATION_WARNING_LABEL = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

548)         comments='This is a short label that will be prepended to '
549)         'a warning message, e.g., "Deprecation warning: A subcommand '
550)         'will be required in v1.0."',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

551)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

552)         context='Label :: Diagnostics :: Marker',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

553)         single='Deprecation warning',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

554)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

555)     WARNING_LABEL = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

556)         comments='This is a short label that will be prepended to '
557)         'a warning message, e.g., "Warning: An empty service name '
558)         'is not supported by vault(1)."',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

559)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

560)         context='Label :: Diagnostics :: Marker',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

561)         single='Warning',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

562)     )
Marco Ricci Fix phrasing of "Cannot upd...

Marco Ricci authored 2 months ago

563)     CANNOT_UPDATE_SETTINGS_METAVAR_SETTINGS_TYPE_GLOBAL = (
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

564)         _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

565)             comments='This is one of two values of the settings_type metavar '
566)             'used in the CANNOT_UPDATE_SETTINGS_NO_SETTINGS entry.  '
567)             'It is only used there.  '
568)             'The full sentence then reads: '
569)             '"Cannot update the global settings without any given settings."',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

570)         )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

571)             context='Label :: Error message :: Metavar',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

572)             single='global settings',
Marco Ricci Fix phrasing of "Cannot upd...

Marco Ricci authored 2 months ago

573)         )
574)     )
575)     CANNOT_UPDATE_SETTINGS_METAVAR_SETTINGS_TYPE_SERVICE = (
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

576)         _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

577)             comments='This is one of two values of the settings_type metavar '
578)             'used in the CANNOT_UPDATE_SETTINGS_NO_SETTINGS entry.  '
579)             'It is only used there.  '
580)             'The full sentence then reads: '
581)             '"Cannot update the service-specific settings without any '
582)             'given settings."',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

583)         )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

584)             context='Label :: Error message :: Metavar',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

585)             single='service-specific settings',
Marco Ricci Fix phrasing of "Cannot upd...

Marco Ricci authored 2 months ago

586)         )
587)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

588)     DERIVEPASSPHRASE_01 = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

589)         comments='This is the first paragraph of the command help text, '
590)         'but it also appears (in truncated form, if necessary) '
591)         'as one-line help text for this command.  '
592)         'The translation should thus be as meaningful as possible '
593)         'even if truncated.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

594)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

595)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

596)         single='Derive a strong passphrase, deterministically, '
597)         'from a master secret.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

598)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

599)     DERIVEPASSPHRASE_02 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

600)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

601)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

602)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

603)         single='The currently implemented subcommands are "vault" '
604)         '(for the scheme used by vault) and "export" '
605)         '(for exporting foreign configuration data).  '
606)         'See the respective `--help` output for instructions.  '
607)         'If no subcommand is given, we default to "vault".',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

608)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

609)     DERIVEPASSPHRASE_03 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

610)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

611)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

612)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

613)         single='Deprecation notice: Defaulting to "vault" is deprecated.  '
614)         'Starting in v1.0, the subcommand must be specified explicitly.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

615)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

616)     DERIVEPASSPHRASE_EPILOG_01 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

617)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

618)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

619)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

620)         single='Configuration is stored in a directory according to the '
621)         '`DERIVEPASSPHRASE_PATH` variable, which defaults to '
622)         '`~/.derivepassphrase` on UNIX-like systems and '
623)         r'`C:\Users\<user>\AppData\Roaming\Derivepassphrase` on Windows.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

624)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

625)     DERIVEPASSPHRASE_EXPORT_01 = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

626)         comments='This is the first paragraph of the command help text, '
627)         'but it also appears (in truncated form, if necessary) '
628)         'as one-line help text for this command.  '
629)         'The translation should thus be as meaningful as possible '
630)         'even if truncated.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

631)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

632)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

633)         single='Export a foreign configuration to standard output.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

634)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

635)     DERIVEPASSPHRASE_EXPORT_02 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

636)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

637)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

638)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

639)         single='The only available subcommand is "vault", '
640)         'which implements the vault-native configuration scheme.  '
641)         'If no subcommand is given, we default to "vault".',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

642)     )
643)     DERIVEPASSPHRASE_EXPORT_03 = DERIVEPASSPHRASE_03
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

644)     DERIVEPASSPHRASE_EXPORT_VAULT_01 = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

645)         comments='This is the first paragraph of the command help text, '
646)         'but it also appears (in truncated form, if necessary) '
647)         'as one-line help text for this command.  '
648)         'The translation should thus be as meaningful as possible '
649)         'even if truncated.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

650)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

651)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

652)         single='Export a vault-native configuration to standard output.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

653)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

654)     DERIVEPASSPHRASE_EXPORT_VAULT_02 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

655)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

656)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

657)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

658)         single='Depending on the configuration format, '
659)         '{path_metavar!s} may either be a file or a directory.  '
660)         'We support the vault "v0.2", "v0.3" and "storeroom" formats.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

661)         flags='python-brace-format',
662)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

663)     DERIVEPASSPHRASE_EXPORT_VAULT_03 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

664)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

665)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

666)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

667)         single='If {path_metavar!s} is explicitly given as `VAULT_PATH`, '
668)         'then use the `VAULT_PATH` environment variable to '
669)         'determine the correct path.  '
670)         '(Use `./VAULT_PATH` or similar to indicate a file/directory '
671)         'actually named `VAULT_PATH`.)',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

672)         flags='python-brace-format',
673)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

674)     DERIVEPASSPHRASE_VAULT_01 = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

675)         comments='This is the first paragraph of the command help text, '
676)         'but it also appears (in truncated form, if necessary) '
677)         'as one-line help text for this command.  '
678)         'The translation should thus be as meaningful as possible '
679)         'even if truncated.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

680)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

681)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

682)         single='Derive a passphrase using the vault derivation scheme.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

683)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

684)     DERIVEPASSPHRASE_VAULT_02 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

685)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

686)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

687)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

688)         single='If operating on global settings, or importing/exporting settings, '
689)         'then {service_metavar!s} must be omitted.  '
690)         'Otherwise it is required.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

691)         flags='python-brace-format',
692)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

693)     DERIVEPASSPHRASE_VAULT_EPILOG_01 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

694)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

695)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

696)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

697)         single='WARNING: There is NO WAY to retrieve the generated passphrases '
698)         'if the master passphrase, the SSH key, or the exact '
699)         'passphrase settings are lost, '
700)         'short of trying out all possible combinations.  '
701)         'You are STRONGLY advised to keep independent backups of '
702)         'the settings and the SSH key, if any.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

703)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

704)     DERIVEPASSPHRASE_VAULT_EPILOG_02 = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

705)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

706)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

707)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

708)         single='The configuration is NOT encrypted, and you are '
709)         'STRONGLY discouraged from using a stored passphrase.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

710)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

711)     DEPRECATED_COMMAND_LABEL = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

712)         comments='We use this format string to indicate, at the beginning '
713)         "of a command's help text, that this command is deprecated.",
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

714)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

715)         context='Label :: Help text :: Marker',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

716)         single='(Deprecated) {text}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

717)         flags='python-brace-format',
718)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

719)     DEBUG_OPTION_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

720)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

721)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

722)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

723)         single='also emit debug information (implies --verbose)',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

724)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

725)     EXPORT_VAULT_FORMAT_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

726)         comments='The defaults_hint is Label.EXPORT_VAULT_FORMAT_DEFAULTS_HELP_TEXT, '
727)         'the metavar is Label.EXPORT_VAULT_FORMAT_METAVAR_FMT.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

728)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

729)         context='Label :: Help text :: One-line description',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

730)         single='try the following storage format {metavar!s}; '
731)         'may be specified multiple times, '
732)         'formats will be tried in order {defaults_hint!s}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

733)         flags='python-brace-format',
734)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

735)     EXPORT_VAULT_FORMAT_DEFAULTS_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

736)         comments='See EXPORT_VAULT_FORMAT_HELP_TEXT.  '
737)         'The format names/labels "v0.3", "v0.2" and "storeroom" '
738)         'should not be translated.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

739)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

740)         context='Label :: Help text :: One-line description',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

741)         single='(default: v0.3, v0.2, storeroom)',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

742)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

743)     EXPORT_VAULT_KEY_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

744)         comments='The defaults_hint is Label.EXPORT_VAULT_KEY_DEFAULTS_HELP_TEXT, '
745)         'the metavar is Label.EXPORT_VAULT_KEY_METAVAR_K.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

746)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

747)         context='Label :: Help text :: One-line description',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

748)         single='use {metavar!s} as the storage master key {defaults_hint!s}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

749)         flags='python-brace-format',
750)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

751)     EXPORT_VAULT_KEY_DEFAULTS_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

752)         comments='See EXPORT_VAULT_KEY_HELP_TEXT.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

753)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

754)         context='Label :: Help text :: One-line description',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

755)         single='(default: check the `VAULT_KEY`, `LOGNAME`, `USER`, or '
756)         '`USERNAME` environment variables)',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

757)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

758)     HELP_OPTION_HELP_TEXT = _Commented(
Marco Ricci Reimplement `--help` and `-...

Marco Ricci authored 2 months ago

759)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

760)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

761)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

762)         single='show this help text, then exit',
Marco Ricci Reimplement `--help` and `-...

Marco Ricci authored 2 months ago

763)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

764)     QUIET_OPTION_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

765)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

766)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

767)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

768)         single='suppress even warnings, emit only errors',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

769)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

770)     VERBOSE_OPTION_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

771)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

772)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

773)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

774)         single='emit extra/progress information to standard error',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

775)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

776)     VERSION_OPTION_HELP_TEXT = _Commented(
Marco Ricci Reimplement `--help` and `-...

Marco Ricci authored 2 months ago

777)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

778)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

779)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

780)         single='show applicable version information, then exit',
Marco Ricci Reimplement `--help` and `-...

Marco Ricci authored 2 months ago

781)     )
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

782) 
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

783)     DERIVEPASSPHRASE_VAULT_PHRASE_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

784)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

785)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

786)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

787)         single='prompt for a master passphrase',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

788)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

789)     DERIVEPASSPHRASE_VAULT_KEY_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

790)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

791)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

792)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

793)         single='select a suitable SSH key from the SSH agent',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

794)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

795)     DERIVEPASSPHRASE_VAULT_LENGTH_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

796)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

797)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

798)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

799)         single='ensure a passphrase length of {metavar!s} characters',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

800)         flags='python-brace-format',
801)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

802)     DERIVEPASSPHRASE_VAULT_REPEAT_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

803)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

804)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

805)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

806)         single='forbid any run of {metavar!s} identical characters',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

807)         flags='python-brace-format',
808)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

809)     DERIVEPASSPHRASE_VAULT_LOWER_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

810)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

811)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

812)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

813)         single='ensure at least {metavar!s} lowercase characters',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

814)         flags='python-brace-format',
815)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

816)     DERIVEPASSPHRASE_VAULT_UPPER_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

817)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

818)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

819)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

820)         single='ensure at least {metavar!s} uppercase characters',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

821)         flags='python-brace-format',
822)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

823)     DERIVEPASSPHRASE_VAULT_NUMBER_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

824)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

825)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

826)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

827)         single='ensure at least {metavar!s} digits',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

828)         flags='python-brace-format',
829)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

830)     DERIVEPASSPHRASE_VAULT_SPACE_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

831)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

832)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

833)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

834)         single='ensure at least {metavar!s} spaces',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

835)         flags='python-brace-format',
836)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

837)     DERIVEPASSPHRASE_VAULT_DASH_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

838)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

839)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

840)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

841)         single='ensure at least {metavar!s} "-" or "_" characters',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

842)         flags='python-brace-format',
843)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

844)     DERIVEPASSPHRASE_VAULT_SYMBOL_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

845)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

846)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

847)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

848)         single='ensure at least {metavar!s} symbol characters',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

849)         flags='python-brace-format',
850)     )
851) 
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

852)     DERIVEPASSPHRASE_VAULT_NOTES_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

853)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

854)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

855)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

856)         single='spawn an editor to edit notes for {service_metavar!s}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

857)         flags='python-brace-format',
858)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

859)     DERIVEPASSPHRASE_VAULT_CONFIG_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

860)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

861)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

862)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

863)         single='save the given settings for {service_metavar!s}, or global',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

864)         flags='python-brace-format',
865)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

866)     DERIVEPASSPHRASE_VAULT_DELETE_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

867)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

868)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

869)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

870)         single='delete the settings for {service_metavar!s}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

871)         flags='python-brace-format',
872)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

873)     DERIVEPASSPHRASE_VAULT_DELETE_GLOBALS_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

874)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

875)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

876)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

877)         single='delete the global settings',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

878)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

879)     DERIVEPASSPHRASE_VAULT_DELETE_ALL_HELP_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

880)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

881)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

882)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

883)         single='delete all settings',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

884)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

885)     DERIVEPASSPHRASE_VAULT_EXPORT_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

886)         comments='The metavar is Label.STORAGE_MANAGEMENT_METAVAR_SERVICE.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

887)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

888)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

889)         single='export all saved settings to {metavar!s}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

890)         flags='python-brace-format',
891)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

892)     DERIVEPASSPHRASE_VAULT_IMPORT_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

893)         comments='The metavar is Label.STORAGE_MANAGEMENT_METAVAR_SERVICE.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

894)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

895)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

896)         single='import saved settings from {metavar!s}',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

897)         flags='python-brace-format',
898)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

899)     DERIVEPASSPHRASE_VAULT_OVERWRITE_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

900)         comments='The corresponding option is displayed as '
901)         '"--overwrite-existing / --merge-existing", so you may want to '
902)         'hint that the default (merge) is the second of those options.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

903)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

904)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

905)         single='overwrite or merge (default) the existing configuration',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

906)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

907)     DERIVEPASSPHRASE_VAULT_UNSET_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

908)         comments='The corresponding option is displayed as '
909)         '"--unset=phrase|key|...|symbol", so the "given setting" is '
910)         'referring to "phrase", "key", "lower", ..., or "symbol", '
911)         'respectively.  '
912)         '"with --config" here means that the user must also specify '
913)         '"--config" for this option to have any effect.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

914)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

915)         context='Label :: Help text :: One-line description',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

916)         single='with --config, also unsets the given setting; '
917)         'may be specified multiple times',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

918)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

919)     DERIVEPASSPHRASE_VAULT_EXPORT_AS_HELP_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

920)         comments='The corresponding option is displayed as '
921)         '"--export-as=json|sh", so json refers to the JSON format (default) '
922)         'and sh refers to the POSIX sh format.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

923)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

924)         context='Label :: Help text :: One-line description',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

925)         single='when exporting, export as JSON (default) or POSIX sh',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

926)     )
927) 
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

928)     EXPORT_VAULT_FORMAT_METAVAR_FMT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

929)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

930)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

931)         context='Label :: Help text :: Metavar :: export vault',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

932)         single='FMT',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

933)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

934)     EXPORT_VAULT_KEY_METAVAR_K = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

935)         comments='See Label.EXPORT_VAULT_KEY_HELP_TEXT.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

936)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

937)         context='Label :: Help text :: Metavar :: export vault',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

938)         single='K',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

939)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

940)     EXPORT_VAULT_METAVAR_PATH = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

941)         comments='Used as "path_metavar" in '
942)         'Label.DERIVEPASSPHRASE_EXPORT_VAULT_02 and others.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

943)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

944)         context='Label :: Help text :: Metavar :: export vault',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

945)         single='PATH',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

946)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

947)     PASSPHRASE_GENERATION_METAVAR_NUMBER = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

948)         comments='This metavar is also used in a matching epilog.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

949)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

950)         context='Label :: Help text :: Metavar :: vault',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

951)         single='NUMBER',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

952)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

953)     STORAGE_MANAGEMENT_METAVAR_PATH = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

954)         comments='This metavar is also used in multiple one-line help texts.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

955)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

956)         context='Label :: Help text :: Metavar :: vault',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

957)         single='PATH',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

958)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

959)     VAULT_METAVAR_SERVICE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

960)         comments='This metavar is also used in multiple one-line help texts.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

961)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

962)         context='Label :: Help text :: Metavar :: vault',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

963)         single='SERVICE',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

964)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

965)     CONFIGURATION_EPILOG = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

966)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

967)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

968)         context='Label :: Help text :: Explanation',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

969)         single='Use $VISUAL or $EDITOR to configure the spawned editor.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

970)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

971)     PASSPHRASE_GENERATION_EPILOG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

972)         comments='The metavar is Label.PASSPHRASE_GENERATION_METAVAR_NUMBER.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

973)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

974)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

975)         single='Use {metavar!s}=0 to exclude a character type from the output.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

976)         flags='python-brace-format',
977)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

978)     STORAGE_MANAGEMENT_EPILOG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

979)         comments='The metavar is Label.STORAGE_MANAGEMENT_METAVAR_PATH.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

980)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

981)         context='Label :: Help text :: Explanation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

982)         single='Using "-" as {metavar!s} for standard input/standard output '
983)         'is supported.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

984)         flags='python-brace-format',
985)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

986)     COMMANDS_LABEL = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

987)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

988)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

989)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

990)         single='Commands',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

991)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

992)     COMPATIBILITY_OPTION_LABEL = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

993)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

994)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

995)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

996)         single='Compatibility and extension options',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

997)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

998)     CONFIGURATION_LABEL = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

999)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1000)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1001)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1002)         single='Configuration',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1003)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1004)     LOGGING_LABEL = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1005)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1006)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1007)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1008)         single='Logging',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1009)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1010)     OPTIONS_LABEL = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1011)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1012)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1013)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1014)         single='Options',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1015)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1016)     OTHER_OPTIONS_LABEL = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1017)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1018)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1019)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1020)         single='Other options',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1021)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1022)     PASSPHRASE_GENERATION_LABEL = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1023)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1024)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1025)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1026)         single='Passphrase generation',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1027)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1028)     STORAGE_MANAGEMENT_LABEL = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1029)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1030)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1031)         context='Label :: Help text :: Option group name',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1032)         single='Storage management',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1033)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1034)     VERSION_INFO_TEXT = _Commented(
Marco Ricci Reimplement `--help` and `-...

Marco Ricci authored 2 months ago

1035)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1036)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1037)         context='Label :: Info Message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1038)         single='{PROG_NAME!s} {__version__}',  # noqa: RUF027
Marco Ricci Reimplement `--help` and `-...

Marco Ricci authored 2 months ago

1039)         flags='python-brace-format',
1040)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1041)     CONFIRM_THIS_CHOICE_PROMPT_TEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1042)         comments='There is no support for "yes" or "no" in other languages '
1043)         'than English, so it is advised that your translation makes it '
1044)         'clear that only the strings "y", "yes", "n" or "no" are supported, '
1045)         'even if the prompt becomes a bit longer.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1046)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1047)         context='Label :: Interactive prompt',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1048)         single='Confirm this choice? (y/N)',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1049)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1050)     SUITABLE_SSH_KEYS_LABEL = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1051)         comments='This label is the heading of the list of suitable SSH keys.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1052)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1053)         context='Label :: Interactive prompt',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1054)         single='Suitable SSH keys:',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1055)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1056)     YOUR_SELECTION_PROMPT_TEXT = _Commented(
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1057)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1058)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1059)         context='Label :: Interactive prompt',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1060)         single='Your selection? (1-{n}, leave empty to abort)',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1061)         flags='python-brace-format',
1062)     )
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1063) 
1064) 
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1065) class DebugMsgTemplate(enum.Enum):
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1066)     BUCKET_ITEM_FOUND = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1067)         comments='This message is emitted by the vault configuration exporter '
1068)         'for "storeroom"-type configuration directories.  '
1069)         'The system stores entries in different "buckets" of a hash table.  '
1070)         'Here, we report on a single item (path and value) we discovered '
1071)         'after decrypting the whole bucket.  '
1072)         '(We ensure the path and value are printable as-is.)',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1073)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1074)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1075)         single='Found bucket item: {path} -> {value}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1076)         flags='python-brace-format',
1077)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1078)     DECRYPT_BUCKET_ITEM_INFO = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1079)         comments='"AES256-CBC" and "PKCS#7" are, in essence, names of formats, '
1080)         'and should not be translated.  '
1081)         '"IV" means "initialization vector", and is specifically '
1082)         'a cryptographic term, as are "plaintext" and "ciphertext".',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1083)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1084)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1085)         single="""\
1086) Decrypt bucket item contents:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1087) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1088)   \b
1089)   Encryption key (master key): {enc_key}
1090)   Encryption cipher: AES256-CBC with PKCS#7 padding
1091)   Encryption IV: {iv}
1092)   Encrypted ciphertext: {ciphertext}
1093)   Plaintext: {plaintext}
1094) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1095)         flags='python-brace-format',
1096)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1097)     DECRYPT_BUCKET_ITEM_KEY_INFO = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1098)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1099)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1100)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1101)         single="""\
1102) Decrypt bucket item:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1103) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1104)   \b
1105)   Plaintext: {plaintext}
1106)   Encryption key (master key): {enc_key}
1107)   Signing key (master key): {sign_key}
1108) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1109)         flags='python-brace-format',
1110)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1111)     DECRYPT_BUCKET_ITEM_MAC_INFO = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1112)         comments='The MAC stands for "message authentication code", '
1113)         'which guarantees the authenticity of the message to anyone '
1114)         'who holds the corresponding key, similar to a digital signature.  '
1115)         'The acronym "MAC" is assumed to be well-known to the '
1116)         'English target audience, or at least discoverable by them; '
1117)         'they *are* asking for debug output, after all.  '
1118)         'Please use your judgement as to whether to translate this term '
1119)         'or not, expanded or not.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1120)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1121)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1122)         single="""\
1123) Decrypt bucket item contents:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1124) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1125)   \b
1126)   MAC key: {sign_key}
1127)   Authenticated content: {ciphertext}
1128)   Claimed MAC value: {claimed_mac}
1129)   Computed MAC value: {actual_mac}
1130) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1131)         flags='python-brace-format',
1132)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1133)     DECRYPT_BUCKET_ITEM_SESSION_KEYS_INFO = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1134)         comments='"AES256-CBC" and "PKCS#7" are, in essence, names of formats, '
1135)         'and should not be translated.  '
1136)         '"IV" means "initialization vector", and is specifically '
1137)         'a cryptographic term, as are "plaintext" and "ciphertext".',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1138)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1139)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1140)         single="""\
1141) Decrypt bucket item session keys:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1142) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1143)   \b
1144)   Encryption key (master key): {enc_key}
1145)   Encryption cipher: AES256-CBC with PKCS#7 padding
1146)   Encryption IV: {iv}
1147)   Encrypted ciphertext: {ciphertext}
1148)   Plaintext: {plaintext}
1149)   Parsed plaintext: {code}
1150) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1151)         flags='python-brace-format',
1152)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1153)     DECRYPT_BUCKET_ITEM_SESSION_KEYS_MAC_INFO = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1154)         comments='The MAC stands for "message authentication code", '
1155)         'which guarantees the authenticity of the message to anyone '
1156)         'who holds the corresponding key, similar to a digital signature.  '
1157)         'The acronym "MAC" is assumed to be well-known to the '
1158)         'English target audience, or at least discoverable by them; '
1159)         'they *are* asking for debug output, after all.  '
1160)         'Please use your judgement as to whether to translate this term '
1161)         'or not, expanded or not.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1162)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1163)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1164)         single="""\
1165) Decrypt bucket item session keys:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1166) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1167)   \b
1168)   MAC key (master key): {sign_key}
1169)   Authenticated content: {ciphertext}
1170)   Claimed MAC value: {claimed_mac}
1171)   Computed MAC value: {actual_mac}
1172) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1173)         flags='python-brace-format',
1174)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1175)     DERIVED_MASTER_KEYS_KEYS = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1176)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1177)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1178)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1179)         single="""\
1180) Derived master keys' keys:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1181) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1182)   \b
1183)   Encryption key: {enc_key}
1184)   Signing key: {sign_key}
1185)   Password: {pw_bytes}
1186)   Function call: pbkdf2(algorithm={algorithm!r}, length={length!r}, salt={salt!r}, iterations={iterations!r})
1187) """,  # noqa: E501
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1188)         flags='python-brace-format',
1189)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1190)     DIRECTORY_CONTENTS_CHECK_OK = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1191)         comments='This message is emitted by the vault configuration exporter '
1192)         'for "storeroom"-type configuration directories, '
1193)         'while "assembling" the items stored in the configuration '
1194)         """according to the item's "path".  """
1195)         'Each "directory" in the path contains a list of children '
1196)         'it claims to contain, and this list must be matched '
1197)         'against the actual discovered items.  '
1198)         'Now, at the end, we actually confirm the claim.  '
1199)         '(We would have already thrown an error here otherwise.)',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1200)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1201)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1202)         single='Directory contents check OK: {path} -> {contents}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1203)         flags='python-brace-format',
1204)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1205)     MASTER_KEYS_DATA_MAC_INFO = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1206)         comments='The MAC stands for "message authentication code", '
1207)         'which guarantees the authenticity of the message to anyone '
1208)         'who holds the corresponding key, similar to a digital signature.  '
1209)         'The acronym "MAC" is assumed to be well-known to the '
1210)         'English target audience, or at least discoverable by them; '
1211)         'they *are* asking for debug output, after all.  '
1212)         'Please use your judgement as to whether to translate this term '
1213)         'or not, expanded or not.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1214)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1215)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1216)         single="""\
1217) Master keys data:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1218) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1219)   \b
1220)   MAC key: {sign_key}
1221)   Authenticated content: {ciphertext}
1222)   Claimed MAC value: {claimed_mac}
1223)   Computed MAC value: {actual_mac}
1224) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1225)         flags='python-brace-format',
1226)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1227)     POSTPONING_DIRECTORY_CONTENTS_CHECK = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1228)         comments='This message is emitted by the vault configuration exporter '
1229)         'for "storeroom"-type configuration directories, '
1230)         'while "assembling" the items stored in the configuration '
1231)         """according to the item's "path".  """
1232)         'Each "directory" in the path contains a list of children '
1233)         'it claims to contain, and this list must be matched '
1234)         'against the actual discovered items.  '
1235)         'When emitting this message, we merely indicate that we saved '
1236)         'the "claimed" list for this directory for later.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1237)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1238)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1239)         single='Postponing directory contents check: {path} -> {contents}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1240)         flags='python-brace-format',
1241)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1242)     SETTING_CONFIG_STRUCTURE_CONTENTS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1243)         comments='This message is emitted by the vault configuration exporter '
1244)         'for "storeroom"-type configuration directories, '
1245)         'while "assembling" the items stored in the configuration '
1246)         """according to the item's "path".  """
1247)         'We confirm that we set the entry at the given path '
1248)         'to the given value.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1249)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1250)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1251)         single='Setting contents: {path} -> {value}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1252)         flags='python-brace-format',
1253)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1254)     SETTING_CONFIG_STRUCTURE_CONTENTS_EMPTY_DIRECTORY = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1255)         comments='This message is emitted by the vault configuration exporter '
1256)         'for "storeroom"-type configuration directories, '
1257)         'while "assembling" the items stored in the configuration '
1258)         """according to the item's "path".  """
1259)         'We confirm that we set up a currently empty directory '
1260)         'at the given path.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1261)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1262)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1263)         single='Setting contents (empty directory): {path}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1264)         flags='python-brace-format',
1265)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1266)     VAULT_NATIVE_EVP_BYTESTOKEY_INIT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1267)         comments='This message is emitted by the vault configuration exporter '
1268)         'for "native"-type configuration directories: '
1269)         'in v0.2, the non-standard and deprecated "EVP_bytestokey" function '
1270)         'from OpenSSL must be reimplemented from scratch.  '
1271)         'The terms "salt" and "IV" (initialization vector) '
1272)         'are cryptographic terms.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1273)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1274)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1275)         single="""\
1276) evp_bytestokey_md5 (initialization):
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1277) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1278)   \b
1279)   Input: {data}
1280)   Salt: {salt}
1281)   Key size: {key_size}
1282)   IV size: {iv_size}
1283)   Buffer length: {buffer_length}
1284)   Buffer: {buffer}
1285) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1286)         flags='python-brace-format',
1287)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1288)     VAULT_NATIVE_EVP_BYTESTOKEY_RESULT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1289)         comments='This message is emitted by the vault configuration exporter '
1290)         'for "native"-type configuration directories: '
1291)         'in v0.2, the non-standard and deprecated "EVP_bytestokey" function '
1292)         'from OpenSSL must be reimplemented from scratch.  '
1293)         'The terms "salt" and "IV" (initialization vector) '
1294)         'are cryptographic terms.'
1295)         'This function reports on the final results.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1296)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1297)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1298)         single="""\
1299) evp_bytestokey_md5 (result):
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1300) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1301)   \b
1302)   Encryption key: {enc_key}
1303)   IV: {iv}
1304) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1305)         flags='python-brace-format',
1306)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1307)     VAULT_NATIVE_EVP_BYTESTOKEY_ROUND = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1308)         comments='This message is emitted by the vault configuration exporter '
1309)         'for "native"-type configuration directories: '
1310)         'in v0.2, the non-standard and deprecated "EVP_bytestokey" function '
1311)         'from OpenSSL must be reimplemented from scratch.  '
1312)         'The terms "salt" and "IV" (initialization vector) '
1313)         'are cryptographic terms.'
1314)         'This function reports on the updated buffer length and contents '
1315)         'after executing one round of hashing.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1316)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1317)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1318)         single="""\
1319) evp_bytestokey_md5 (round update):
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1320) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1321)   \b
1322)   Buffer length: {buffer_length}
1323)   Buffer: {buffer}
1324) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1325)         flags='python-brace-format',
1326)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1327)     VAULT_NATIVE_CHECKING_MAC_DETAILS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1328)         comments='This message is emitted by the vault configuration exporter '
1329)         'for "native"-type configuration directories.  '
1330)         'It is preceded by the info message '
1331)         'VAULT_NATIVE_PARSING_IV_PAYLOAD_MAC; see the commentary there '
1332)         'concerning the terms and thoughts on translating them.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1333)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1334)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1335)         single="""\
1336) MAC details:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1337) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1338)   \b
1339)   MAC input: {mac_input}
1340)   Expected MAC: {mac}
1341) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1342)         flags='python-brace-format',
1343)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1344)     VAULT_NATIVE_PADDED_PLAINTEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1345)         comments='This message is emitted by the vault configuration exporter '
1346)         'for "native"-type configuration directories.  '
1347)         '"padding" and "plaintext" are cryptographic terms.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1348)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1349)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1350)         single='Padded plaintext: {contents}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1351)         flags='python-brace-format',
1352)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1353)     VAULT_NATIVE_PARSE_BUFFER = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1354)         comments='This message is emitted by the vault configuration exporter '
1355)         'for "native"-type configuration directories.  '
1356)         'It is preceded by the info message '
1357)         'VAULT_NATIVE_PARSING_IV_PAYLOAD_MAC; see the commentary there '
1358)         'concerning the terms and thoughts on translating them.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1359)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1360)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1361)         single="""\
1362) Buffer: {contents}
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1363) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1364)   \b
1365)   IV: {iv}
1366)   Payload: {payload}
1367)   MAC: {mac}
1368) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1369)         flags='python-brace-format',
1370)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1371)     VAULT_NATIVE_PLAINTEXT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1372)         comments='This message is emitted by the vault configuration exporter '
1373)         'for "native"-type configuration directories.  '
1374)         '"plaintext" is a cryptographic term.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1375)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1376)         context='Debug message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1377)         single='Plaintext: {contents}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1378)         flags='python-brace-format',
1379)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1380)     VAULT_NATIVE_PBKDF2_CALL = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1381)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1382)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1383)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1384)         single="""\
1385) Master key derivation:
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1386) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1387)   \b
1388)   PBKDF2 call: PBKDF2-HMAC(password={password!r}, salt={salt!r}, iterations={iterations!r}, key_size={key_size!r}, algorithm={algorithm!r})
1389)   Result (binary): {raw_result}
1390)   Result (hex key): {result_key!r}
1391) """,  # noqa: E501
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1392)         flags='python-brace-format',
1393)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1394)     VAULT_NATIVE_V02_PAYLOAD_MAC_POSTPROCESSING = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1395)         comments='This message is emitted by the vault configuration exporter '
1396)         'for "native"-type configuration directories.  '
1397)         'It is preceded by the info message '
1398)         'VAULT_NATIVE_PARSING_IV_PAYLOAD_MAC and the debug message '
1399)         'PARSING_NATIVE_PARSE_BUFFER; see the commentary there concerning '
1400)         'the terms and thoughts on translating them.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1401)     )(
1402)         context='Debug message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1403)         single="""\
1404) Postprocessing buffer (v0.2):
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1405) 
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1406)   \b
1407)   Payload: {payload} (decoded from base64)
1408)   MAC: {mac} (decoded from hex)
1409) """,
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1410)         flags='python-brace-format',
1411)     )
1412) 
1413) 
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1414) class InfoMsgTemplate(enum.Enum):
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1415)     ASSEMBLING_CONFIG_STRUCTURE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1416)         comments='This message is emitted by the vault configuration exporter '
1417)         'for "storeroom"-type configuration directories.  '
1418)         'The system stores entries in different "buckets" of a hash table.  '
1419)         'After the respective items in the buckets have been decrypted, '
1420)         'we then have a list of item paths plus contents to populate.  '
1421)         "This must be done in a certain order (we don't yet have an "
1422)         'existing directory tree to rely on, but rather must '
1423)         'build it on-the-fly), hence the term "assembling".',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1424)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1425)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1426)         single='Assembling config structure',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1427)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1428)     CANNOT_LOAD_AS_VAULT_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1429)         comments='"fmt" is a string such as "v0.2" or "storeroom", '
1430)         'indicating the format which we tried to load the '
1431)         'vault configuration as.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1432)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1433)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1434)         single='Cannot load {path!r} as a {fmt!s} vault configuration.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1435)         flags='python-brace-format',
1436)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1437)     CHECKING_CONFIG_STRUCTURE_CONSISTENCY = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1438)         comments='This message is emitted by the vault configuration exporter '
1439)         'for "storeroom"-type configuration directories.  '
1440)         'Having "assembled" the configuration items according to '
1441)         'their claimed paths and contents, we then check if the '
1442)         'assembled structure is internally consistent.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1443)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1444)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1445)         single='Checking config structure consistency',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1446)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1447)     DECRYPTING_BUCKET = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1448)         comments='This message is emitted by the vault configuration exporter '
1449)         'for "storeroom"-type configuration directories.  '
1450)         'The system stores entries in different "buckets" of a hash table.  '
1451)         'We parse the directory bucket by bucket.  '
1452)         'All buckets are numbered in hexadecimal, and typically there are '
1453)         '32 buckets, so 2-digit hex numbers.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1454)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1455)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1456)         single='Decrypting bucket {bucket_number}',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1457)         flags='python-brace-format',
1458)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1459)     PARSING_MASTER_KEYS_DATA = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1460)         comments='This message is emitted by the vault configuration exporter '
1461)         'for "storeroom"-type configuration directories.  '
1462)         '`.keys` is a filename, from which data about the master keys '
1463)         'for this configuration are loaded.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1464)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1465)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1466)         single='Parsing master keys data from .keys',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1467)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1468)     PIP_INSTALL_EXTRA = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1469)         comments='This message immediately follows an error message about '
1470)         'a missing library that needs to be installed.  '
1471)         'The Python Package Index (PyPI) supports declaring sets of '
1472)         'optional dependencies as "extras", so users installing from PyPI '
1473)         'can request reinstallation with a named "extra" being enabled.  '
1474)         'This would then let the installer take care of the '
1475)         'missing libraries automatically, '
1476)         'hence this suggestion to PyPI users.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1477)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1478)         context='Info message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1479)         single='For users installing from PyPI, see the {extra_name!r} extra.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1480)         flags='python-brace-format',
1481)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1482)     SUCCESSFULLY_MIGRATED = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1483)         comments='This info message immediately follows the '
1484)         '"Using deprecated v0.1-style ..." deprecation warning.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1485)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1486)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1487)         single='Successfully migrated to {path!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1488)         flags='python-brace-format',
1489)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1490)     VAULT_NATIVE_CHECKING_MAC = _Commented(
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1491)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1492)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1493)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1494)         single='Checking MAC',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1495)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1496)     VAULT_NATIVE_DECRYPTING_CONTENTS = _Commented(
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1497)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1498)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1499)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1500)         single='Decrypting contents',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1501)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1502)     VAULT_NATIVE_DERIVING_KEYS = _Commented(
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1503)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1504)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1505)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1506)         single='Deriving an encryption and signing key',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1507)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1508)     VAULT_NATIVE_PARSING_IV_PAYLOAD_MAC = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1509)         comments='This message is emitted by the vault configuration exporter '
1510)         'for "native"-type configuration directories.  '
1511)         '"IV" means "initialization vector", and "MAC" means '
1512)         '"message authentication code".  '
1513)         'They are specifically cryptographic terms, as is "payload".  '
1514)         'The acronyms "IV" and "MAC" are assumed to be well-known to the '
1515)         'English target audience, or at least discoverable by them; '
1516)         'they *are* asking for debug output, after all.  '
1517)         'Please use your judgement as to whether to translate these terms '
1518)         'or not, expanded or not.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1519)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1520)         context='Info message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1521)         single='Parsing IV, payload and MAC from the file contents',
Marco Ricci Make debug and info message...

Marco Ricci authored 2 months ago

1522)     )
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1523) 
1524) 
1525) class WarnMsgTemplate(enum.Enum):
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1526)     EMPTY_SERVICE_NOT_SUPPORTED = _Commented(
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1527)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1528)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1529)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1530)         single='An empty {service_metavar!s} is not supported by vault(1).  '
1531)         'For compatibility, this will be treated as if SERVICE was not '
1532)         'supplied, i.e., it will error out, or operate on global settings.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1533)         flags='python-brace-format',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1534)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1535)     EMPTY_SERVICE_SETTINGS_INACCESSIBLE = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1536)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1537)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1538)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1539)         single='An empty {service_metavar!s} is not supported by vault(1).  '
1540)         'The empty-string service settings will be inaccessible '
1541)         'and ineffective.  '
1542)         'To ensure that vault(1) and {PROG_NAME!s} see the settings, '  # noqa: RUF027
1543)         'move them into the "global" section.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1544)         flags='python-brace-format',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1545)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1546)     FAILED_TO_MIGRATE_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1547)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1548)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1549)         context='Warning message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1550)         single='Failed to migrate to {path!r}: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1551)         flags='python-brace-format',
1552)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1553)     GLOBAL_PASSPHRASE_INEFFECTIVE = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1554)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1555)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1556)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1557)         single='Setting a global passphrase is ineffective '
1558)         'because a key is also set.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1559)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1560)     PASSPHRASE_NOT_NORMALIZED = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1561)         comments='The key is a (vault) configuration key, in JSONPath syntax, '
1562)         'typically "$.global" for the global passphrase or '
1563)         '"$.services.service_name" or "$.services["service with spaces"]" '
1564)         'for the services "service_name" and "service with spaces", '
1565)         'respectively.  '
1566)         'The form is one of the four Unicode normalization forms: '
1567)         'NFC, NFD, NFKC, NFKD.  '
1568)         'The asterisks are not special.  '
1569)         'Please feel free to substitute any other appropriate way to '
1570)         'mark up emphasis of the word "displays".',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1571)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1572)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1573)         single='The {key!s} passphrase is not {form!s}-normalized.  '
1574)         'Its serialization as a byte string may not be what you '
1575)         'expect it to be, even if it *displays* correctly.  '
1576)         'Please make sure to double-check any derived passphrases '
1577)         'for unexpected results.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1578)         flags='python-brace-format',
1579)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1580)     SERVICE_NAME_INCOMPLETABLE = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1581)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1582)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1583)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1584)         single='The service name {service!r} contains an ASCII control character, '
1585)         'which is not supported by our shell completion code.  '
1586)         'This service name will therefore not be available for completion '
1587)         'on the command-line.  '
1588)         'You may of course still type it in manually in whatever format '
1589)         'your shell accepts, but we highly recommend choosing a different '
1590)         'service name instead.',
Marco Ricci Consolidate shell completio...

Marco Ricci authored 2 months ago

1591)         flags='python-brace-format',
1592)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1593)     SERVICE_PASSPHRASE_INEFFECTIVE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1594)         comments='The key that is set need not necessarily be set at the '
1595)         'service level; it may be a global key as well.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1596)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1597)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1598)         single='Setting a service passphrase is ineffective '
1599)         'because a key is also set: {service!s}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1600)         flags='python-brace-format',
1601)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1602)     STEP_REMOVE_INEFFECTIVE_VALUE = _Commented(
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1603)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1604)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1605)         context='Warning message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1606)         single='Removing ineffective setting {path!s} = {old!s}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1607)         flags='python-brace-format',
1608)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1609)     STEP_REPLACE_INVALID_VALUE = _Commented(
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1610)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1611)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1612)         context='Warning message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1613)         single='Replacing invalid value {old!s} for key {path!s} with {new!s}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1614)         flags='python-brace-format',
1615)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1616)     V01_STYLE_CONFIG = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1617)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1618)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1619)         context='Warning message :: Deprecation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1620)         single='Using deprecated v0.1-style config file {old!r}, '
1621)         'instead of v0.2-style {new!r}.  '
1622)         'Support for v0.1-style config filenames will be removed in v1.0.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1623)         flags='python-brace-format',
1624)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1625)     V10_SUBCOMMAND_REQUIRED = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1626)         comments='This deprecation warning may be issued at any level, '
1627)         'i.e. we may actually be talking about subcommands, '
1628)         'or sub-subcommands, or sub-sub-subcommands, etc., '
1629)         'which is what the "here" is supposed to indicate.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1630)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1631)         context='Warning message :: Deprecation',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1632)         single='A subcommand will be required here in v1.0.  '
1633)         'See --help for available subcommands.  '
1634)         'Defaulting to subcommand "vault".',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1635)     )
1636) 
1637) 
1638) class ErrMsgTemplate(enum.Enum):
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1639)     AGENT_REFUSED_LIST_KEYS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1640)         comments='"loaded keys" being keys loaded into the agent.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1641)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1642)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1643)         single='The SSH agent failed to or refused to supply '
1644)         'a list of loaded keys.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1645)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1646)     AGENT_REFUSED_SIGNATURE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1647)         comments='The message to be signed is the vault UUID, '
1648)         "but there's no space to explain that here, "
1649)         'so ideally the error message does not go into detail.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1650)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1651)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1652)         single='The SSH agent failed to or refused to issue a signature '
1653)         'with the selected key, necessary for deriving a service passphrase.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1654)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1655)     CANNOT_CONNECT_TO_AGENT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1656)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1657)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1658)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1659)         single='Cannot connect to the SSH agent: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1660)         flags='python-brace-format',
1661)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1662)     CANNOT_DECODEIMPORT_VAULT_SETTINGS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1663)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1664)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1665)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1666)         single='Cannot import vault settings: cannot decode JSON: {error!s}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1667)         flags='python-brace-format',
1668)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1669)     CANNOT_EXPORT_VAULT_SETTINGS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1670)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1671)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1672)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1673)         single='Cannot export vault settings: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1674)         flags='python-brace-format',
1675)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1676)     CANNOT_IMPORT_VAULT_SETTINGS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1677)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1678)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1679)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1680)         single='Cannot import vault settings: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1681)         flags='python-brace-format',
1682)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1683)     CANNOT_LOAD_USER_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1684)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1685)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1686)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1687)         single='Cannot load user config: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1688)         flags='python-brace-format',
1689)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1690)     CANNOT_LOAD_VAULT_SETTINGS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1691)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1692)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1693)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1694)         single='Cannot load vault settings: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1695)         flags='python-brace-format',
1696)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1697)     CANNOT_PARSE_AS_VAULT_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1698)         comments='Unlike the "Cannot load {path!r} as a {fmt!s} '
1699)         'vault configuration." message, *this* error message is emitted '
1700)         'when we have tried loading the path in each of our '
1701)         'supported formats, and failed.  '
1702)         'The user will thus see the above "Cannot load ..." warning message '
1703)         'potentially multiple times, '
1704)         'and this error message at the very bottom.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1705)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1706)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1707)         single='Cannot parse {path!r} as a valid vault-native '
1708)         'configuration file/directory.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1709)         flags='python-brace-format',
1710)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1711)     CANNOT_PARSE_AS_VAULT_CONFIG_OSERROR = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1712)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1713)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1714)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1715)         single=r'Cannot parse {path!r} as a valid vault-native '
1716)         'configuration file/directory: {error!s}: {filename!r}.',
Marco Ricci Replace strings in `derivep...

Marco Ricci authored 2 months ago

1717)         flags='python-brace-format',
1718)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1719)     CANNOT_STORE_VAULT_SETTINGS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1720)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1721)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1722)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1723)         single='Cannot store vault settings: {error!s}: {filename!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1724)         flags='python-brace-format',
1725)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1726)     CANNOT_UNDERSTAND_AGENT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1727)         comments='This error message is used whenever we cannot make '
1728)         'any sense of a response from the SSH agent '
1729)         'because the response is ill-formed '
1730)         '(truncated, improperly encoded, etc.) '
1731)         'or otherwise violates the communications protocol.  '
1732)         'Well-formed responses that adhere to the protocol, '
1733)         'even if they indicate that the requested operation failed, '
1734)         'are handled with a different error message.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1735)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1736)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1737)         single="Cannot understand the SSH agent's response because it "
1738)         'violates the communications protocol.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1739)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1740)     CANNOT_UPDATE_SETTINGS_NO_SETTINGS = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1741)         comments='The settings_type metavar contains translations for '
1742)         'either "global settings" or "service-specific settings"; '
1743)         'see the CANNOT_UPDATE_SETTINGS_METAVAR_SETTINGS_TYPE_GLOBAL and '
1744)         'CANNOT_UPDATE_SETTINGS_METAVAR_SETTINGS_TYPE_SERVICE entries.  '
1745)         'The first sentence will thus read either '
1746)         '"Cannot update the global settings without any given settings." or '
1747)         '"Cannot update the service-specific settings without any '
1748)         'given settings.".  '
1749)         'You may update this entry, and the two metavar entries, '
1750)         'in any way you see fit that achieves the desired translations '
1751)         'of the first sentence.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1752)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1753)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1754)         single='Cannot update the {settings_type!s} without any given settings.  '
1755)         'You must specify at least one of --lower, ..., --symbol, '
1756)         'or --phrase or --key.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1757)         flags='python-brace-format',
1758)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1759)     INVALID_USER_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1760)         comments='"error" is supplied by the operating system (errno/strerror).',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1761)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1762)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1763)         single='The user configuration file is invalid.  '
1764)         '{error!s}: {filename!r}.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1765)         flags='python-brace-format',
1766)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1767)     INVALID_VAULT_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1768)         comments='This error message is a reaction to a validator function '
1769)         'saying *that* the configuration is not valid, '
1770)         'but not *how* it is not valid.  '
1771)         'The configuration file is principally parsable, however.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1772)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1773)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1774)         single='Invalid vault config: {config!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1775)         flags='python-brace-format',
1776)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1777)     MISSING_MODULE = _Commented(
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1778)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1779)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1780)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1781)         single='Cannot load the required Python module {module!r}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1782)         flags='python-brace-format',
1783)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1784)     NO_AF_UNIX = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1785)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1786)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1787)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1788)         single='Cannot connect to an SSH agent because this Python version '
1789)         'does not support UNIX domain sockets.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1790)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1791)     NO_KEY_OR_PHRASE = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1792)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1793)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1794)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1795)         single='No passphrase or key was given in the configuration.  '
1796)         'In this case, the --phrase or --key argument is required.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1797)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1798)     NO_SSH_AGENT_FOUND = _Commented(
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1799)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1800)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1801)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1802)         single='Cannot find any running SSH agent because SSH_AUTH_SOCK is not set.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1803)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1804)     NO_SUITABLE_SSH_KEYS = _Commented(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1805)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1806)     )(
Marco Ricci Sort arguments to translata...

Marco Ricci authored 2 months ago

1807)         context='Error message',
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1808)         single='The SSH agent contains no keys suitable for {PROG_NAME!s}.',  # noqa: RUF027
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1809)         flags='python-brace-format',
1810)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1811)     PARAMS_MUTUALLY_EXCLUSIVE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1812)         comments='The params are long-form command-line option names.  '
1813)         'Typical example: "--key is mutually exclusive with --phrase."',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1814)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1815)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1816)         single='{param1!s} is mutually exclusive with {param2!s}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1817)         flags='python-brace-format',
1818)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1819)     PARAMS_NEEDS_SERVICE_OR_CONFIG = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1820)         comments='The param is a long-form command-line option name, '
1821)         'the metavar is Label.VAULT_METAVAR_SERVICE.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1822)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1823)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1824)         single='{param!s} requires a {service_metavar!s} or --config.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1825)         flags='python-brace-format',
1826)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1827)     PARAMS_NEEDS_SERVICE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1828)         comments='The param is a long-form command-line option name, '
1829)         'the metavar is Label.VAULT_METAVAR_SERVICE.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1830)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1831)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1832)         single='{param!s} requires a {service_metavar!s}.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1833)         flags='python-brace-format',
1834)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1835)     PARAMS_NO_SERVICE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1836)         comments='The param is a long-form command-line option name, '
1837)         'the metavar is Label.VAULT_METAVAR_SERVICE.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1838)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1839)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1840)         single='{param!s} does not take a {service_metavar!s} argument.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1841)         flags='python-brace-format',
1842)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1843)     SERVICE_REQUIRED = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1844)         comments='The metavar is Label.VAULT_METAVAR_SERVICE.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1845)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1846)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1847)         single='Deriving a passphrase requires a {service_metavar!s}.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1848)         flags='python-brace-format',
1849)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1850)     SET_AND_UNSET_SAME_SETTING = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1851)         comments='The rephrasing '
1852)         '"Attempted to unset and set the same setting '
1853)         '(--unset={setting!s} --{setting!s}=...) at the same time."'
1854)         'may or may not be more suitable as a basis for translation instead.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1855)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1856)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1857)         single='Attempted to unset and set --{setting!s} at the same time.',
Marco Ricci Add more translatable strin...

Marco Ricci authored 2 months ago

1858)         flags='python-brace-format',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1859)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1860)     SSH_KEY_NOT_LOADED = _Commented(
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1861)         comments='',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1862)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1863)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1864)         single='The requested SSH key is not loaded into the agent.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1865)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1866)     USER_ABORTED_EDIT = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1867)         comments='The user requested to edit the notes for a service, '
1868)         'but aborted the request mid-editing.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1869)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1870)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1871)         single='Not saving any new notes: the user aborted the request.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1872)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1873)     USER_ABORTED_PASSPHRASE = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1874)         comments='The user was prompted for a master passphrase, '
1875)         'but aborted the request.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1876)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1877)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1878)         single='No passphrase was given; the user aborted the request.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1879)     )
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1880)     USER_ABORTED_SSH_KEY_SELECTION = _Commented(
Marco Ricci Normalize and unwrap transl...

Marco Ricci authored 2 months ago

1881)         comments='The user was prompted to select a master SSH key, '
1882)         'but aborted the request.',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1883)     )(
Marco Ricci Issue new context IDs for t...

Marco Ricci authored 2 months ago

1884)         context='Error message',
Marco Ricci Split off comments in trans...

Marco Ricci authored 2 months ago

1885)         single='No SSH key was selected; the user aborted the request.',
Marco Ricci Extract translatable log me...

Marco Ricci authored 2 months ago

1886)     )
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

1887) 
1888) 
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

1889) MsgTemplate: TypeAlias = Union[
1890)     Label,
1891)     DebugMsgTemplate,
1892)     InfoMsgTemplate,
1893)     WarnMsgTemplate,
1894)     ErrMsgTemplate,
1895) ]
1896) MSG_TEMPLATE_CLASSES = (
1897)     Label,
1898)     DebugMsgTemplate,
1899)     InfoMsgTemplate,
1900)     WarnMsgTemplate,
1901)     ErrMsgTemplate,
1902) )
1903) 
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

1904) DebugTranslations._load_cache()  # noqa: SLF001
1905) 
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

1906) 
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

1907) 
1908) def _write_po_file(  # noqa: C901
1909)     fileobj: TextIO,
1910)     /,
1911)     *,
1912)     is_template: bool = True,
1913)     version: str = __version__,
1914) ) -> None:  # pragma: no cover
1915)     r"""Write a .po file to the given file object.
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

1916) 
1917)     Assumes the file object is opened for writing and accepts string
1918)     inputs.  The file will *not* be closed when writing is complete.
1919)     The file *must* be opened in UTF-8 encoding, lest the file will
1920)     declare an incorrect encoding.
1921) 
1922)     This function crucially depends on all translatable strings
1923)     appearing in the enums of this module.  Certain parts of the
1924)     .po header are hard-coded, as is the source filename.
1925) 
Marco Ricci Update ruff to v0.8.x, refo...

Marco Ricci authored 2 months ago

1926)     """  # noqa: DOC501
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

1927)     entries: dict[str, dict[str, MsgTemplate]] = {}
1928)     for enum_class in MSG_TEMPLATE_CLASSES:
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

1929)         for member in enum_class.__members__.values():
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

1930)             value = cast('TranslatableString', member.value)
1931)             ctx = value.l10n_context
1932)             msg = value.singular
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

1933)             if (
1934)                 msg in entries.setdefault(ctx, {})
1935)                 and entries[ctx][msg] != member
1936)             ):
Marco Ricci Update ruff to v0.8.x, refo...

Marco Ricci authored 2 months ago

1937)                 raise AssertionError(  # noqa: TRY003
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

1938)                     f'Duplicate entry for ({ctx!r}, {msg!r}): '  # noqa: EM102
1939)                     f'{entries[ctx][msg]!r} and {member!r}'
1940)                 )
1941)             entries[ctx][msg] = member
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

1942)     build_time = datetime.datetime.now().astimezone()
Marco Ricci Support SOURCE_DATE_EPOCH f...

Marco Ricci authored 2 months ago

1943)     if os.environ.get('SOURCE_DATE_EPOCH'):
1944)         try:
1945)             source_date_epoch = int(os.environ['SOURCE_DATE_EPOCH'])
1946)         except ValueError as exc:
1947)             err_msg = 'Cannot parse SOURCE_DATE_EPOCH'
1948)             raise RuntimeError(err_msg) from exc
1949)         else:
1950)             build_time = datetime.datetime.fromtimestamp(
1951)                 source_date_epoch,
1952)                 tz=datetime.timezone.utc,
1953)             )
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

1954)     if is_template:
1955)         header = (
1956)             inspect.cleandoc(rf"""
1957)             # English translation for {PROG_NAME!s}.
1958)             # Copyright (C) {build_time.strftime('%Y')} AUTHOR
1959)             # This file is distributed under the same license as {PROG_NAME!s}.
1960)             # AUTHOR <someone@example.com>, {build_time.strftime('%Y')}.
1961)             #
1962)             msgid ""
1963)             msgstr ""
1964)             """).removesuffix('\n')
1965)             + '\n'
1966)         )
1967)     else:
1968)         header = (
1969)             inspect.cleandoc(rf"""
1970)             # English debug translation for {PROG_NAME!s}.
1971)             # Copyright (C) {build_time.strftime('%Y')} {__author__}
1972)             # This file is distributed under the same license as {PROG_NAME!s}.
1973)             #
1974)             msgid ""
1975)             msgstr ""
1976)             """).removesuffix('\n')
1977)             + '\n'
1978)         )
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

1979)     fileobj.write(header)
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

1980)     po_info = {
1981)         'Project-Id-Version': f'{PROG_NAME} {version}',
1982)         'Report-Msgid-Bugs-To': 'software@the13thletter.info',
1983)         'PO-Revision-Date': build_time.strftime('%Y-%m-%d %H:%M%z'),
1984)         'MIME-Version': '1.0',
1985)         'Content-Type': 'text/plain; charset=UTF-8',
1986)         'Content-Transfer-Encoding': '8bit',
1987)         'Plural-Forms': 'nplurals=2; plural=(n != 1);',
1988)     }
1989)     if is_template:
1990)         po_info.update({
1991)             'POT-Creation-Date': build_time.strftime('%Y-%m-%d %H:%M%z'),
1992)             'Last-Translator': 'AUTHOR <someone@example.com>',
1993)             'Language': 'en',
1994)             'Language-Team': 'English',
1995)         })
1996)     else:
1997)         po_info.update({
1998)             'Last-Translator': __author__,
1999)             'Language': 'en_DEBUG',
2000)             'Language-Team': 'English',
2001)         })
2002)     print(*_format_po_info(po_info), sep='\n', end='\n', file=fileobj)
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2003)     for _ctx, subdict in sorted(entries.items()):
2004)         for _msg, enum_value in sorted(
2005)             subdict.items(),
2006)             key=lambda kv: str(kv[1]),
2007)         ):
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

2008)             value = cast('TranslatableString', enum_value.value)
2009)             value2 = value.maybe_without_filename()
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

2010)             fileobj.writelines(
2011)                 _format_po_entry(
2012)                     enum_value, is_debug_translation=not is_template
2013)                 )
2014)             )
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

2015)             if value != value2:
2016)                 fileobj.writelines(
2017)                     _format_po_entry(
2018)                         enum_value,
2019)                         is_debug_translation=not is_template,
2020)                         transformed_string=value2,
2021)                     )
2022)                 )
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

2023) 
2024) 
2025) def _format_po_info(
2026)     data: Mapping[str, Any],
2027)     /,
2028) ) -> Iterator[str]:  # pragma: no cover
2029)     sortorder = [
2030)         'project-id-version',
2031)         'report-msgid-bugs-to',
2032)         'pot-creation-date',
2033)         'po-revision-date',
2034)         'last-translator',
2035)         'language',
2036)         'language-team',
2037)         'mime-version',
2038)         'content-type',
2039)         'content-transfer-encoding',
2040)         'plural-forms',
2041)     ]
2042) 
2043)     def _sort_position(s: str, /) -> int:
2044)         n = len(sortorder)
2045)         for i, x in enumerate(sortorder):
2046)             if s.lower().rstrip(':') == x:
2047)                 return i
2048)         return n
2049) 
2050)     for key in sorted(data.keys(), key=_sort_position):
2051)         value = data[key]
2052)         line = f"{key}: {value}\n"
2053)         yield _cstr(line)
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2054) 
2055) 
2056) def _format_po_entry(
Marco Ricci Hide translation template e...

Marco Ricci authored 2 months ago

2057)     enum_value: MsgTemplate,
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

2058)     /,
2059)     *,
2060)     is_debug_translation: bool = False,
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

2061)     transformed_string: TranslatableString | None = None,
Marco Ricci Fix coverage

Marco Ricci authored 2 months ago

2062) ) -> tuple[str, ...]:  # pragma: no cover
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2063)     ret: list[str] = ['\n']
Marco Ricci Properly support trimmed fi...

Marco Ricci authored 2 months ago

2064)     ts = transformed_string or cast('TranslatableString', enum_value.value)
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2065)     if ts.translator_comments:
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

2066)         comments = ts.translator_comments.splitlines(False)  # noqa: FBT003
2067)         comments.extend(['', f'Message-ID: {enum_value}'])
2068)     else:
2069)         comments = [f'TRANSLATORS: Message-ID: {enum_value}']
2070)     ret.extend(f'#. {line}\n' for line in comments)
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2071)     if ts.flags:
2072)         ret.append(f'#, {", ".join(sorted(ts.flags))}\n')
2073)     if ts.l10n_context:
2074)         ret.append(f'msgctxt {_cstr(ts.l10n_context)}\n')
2075)     ret.append(f'msgid {_cstr(ts.singular)}\n')
2076)     if ts.plural:
2077)         ret.append(f'msgid_plural {_cstr(ts.plural)}\n')
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

2078)     value = (
2079)         DebugTranslations().pgettext(ts.l10n_context, ts.singular)
2080)         if is_debug_translation
2081)         else ''
2082)     )
2083)     ret.append(f'msgstr {_cstr(value)}\n')
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2084)     return tuple(ret)
2085) 
2086) 
Marco Ricci Fix coverage

Marco Ricci authored 2 months ago

2087) def _cstr(s: str) -> str:  # pragma: no cover
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2088)     def escape(string: str) -> str:
2089)         return string.translate({
2090)             0: r'\000',
2091)             1: r'\001',
2092)             2: r'\002',
2093)             3: r'\003',
2094)             4: r'\004',
2095)             5: r'\005',
2096)             6: r'\006',
2097)             7: r'\007',
2098)             8: r'\b',
2099)             9: r'\t',
2100)             10: r'\n',
2101)             11: r'\013',
2102)             12: r'\f',
2103)             13: r'\r',
2104)             14: r'\016',
2105)             15: r'\017',
2106)             ord('"'): r'\"',
2107)             ord('\\'): r'\\',
2108)             127: r'\177',
2109)         })
2110) 
2111)     return '\n'.join(
2112)         f'"{escape(line)}"'
Marco Ricci Generate debug translations...

Marco Ricci authored 2 months ago

2113)         for line in s.splitlines(True) or ['']  # noqa: FBT003
Marco Ricci Add a writer function for d...

Marco Ricci authored 2 months ago

2114)     )
2115) 
2116) 
2117) if __name__ == '__main__':