Recent commits to derivepassphrase.git (11a492e7d9c86097a31c97d78d9751f1d82db377) https://git.schokokeks.org/derivepassphrase.git/tree/11a492e7d9c86097a31c97d78d9751f1d82db377 Recent commits feed provided by GitList. Convert `tests.SSHTestKey` into a named tuple Again, this makes the notation more readable, and allows test keys to contain methods. Use this to group keys into always suitable keys and other keys, instead of having to manually define appropriate tables. https://git.schokokeks.org/derivepassphrase.git/commit/11a492e7d9c86097a31c97d78d9751f1d82db377 software@the13thletter.info (Marco Ricci) Thu, 16 Jan 2025 00:55:16 +0100 11a492e7d9c86097a31c97d78d9751f1d82db377 Move storeroom helper types into `_types` module, as named tuples Move `exporter.storeroom.KeyPair` and `exporter.storeroom.MasterKeys` into the `_types` module, as `StoreroomKeyPair` and `StoreroomMasterKeys`, respectively. Also convert them from `TypedDict` to `NamedTuple`. Also rename `_types.KeyCommentPair` to `_types.SSHKeyCommentPair` for consistency. https://git.schokokeks.org/derivepassphrase.git/commit/3389da68ea507ff9bd0d12562e04cb883e9997b9 software@the13thletter.info (Marco Ricci) Wed, 15 Jan 2025 21:07:32 +0100 3389da68ea507ff9bd0d12562e04cb883e9997b9 Fix formatting and linting issues https://git.schokokeks.org/derivepassphrase.git/commit/b65b618949ca77aa0ad481ae2a517d0b469a4d9f software@the13thletter.info (Marco Ricci) Wed, 15 Jan 2025 20:09:20 +0100 b65b618949ca77aa0ad481ae2a517d0b469a4d9f Merge topic branch 'l10n-machinery' into master * t/l10n-machinery: Convert translatable string construction in enums to positional args only Normalize and unwrap translatable strings (messages and comments) Add hypothesis-based tests for l10n machinery Fix obvious coverage failures among the translatable strings machinery Split off comments in translatable string enum value constructor Sort arguments to translatable string enum value constructor Issue new context IDs for translatable messages Fix debug output of messages with trimmed filenames Support SOURCE_DATE_EPOCH for .po file generation Move translation string preparation into the TranslatableString class Properly support trimmed filenames in translation strings Generate debug translations automatically, in code and on the command-line Hide translation template enums behind a type alias https://git.schokokeks.org/derivepassphrase.git/commit/e9c19afa34ddb3a061c243fc8b5eeca83b3f6ba5 software@the13thletter.info (Marco Ricci) Wed, 15 Jan 2025 19:31:19 +0100 e9c19afa34ddb3a061c243fc8b5eeca83b3f6ba5 Convert translatable string construction in enums to positional args only This too makes the rendered code more readable by elliding repetitive information. https://git.schokokeks.org/derivepassphrase.git/commit/e1e0c1a37cd712bd6a346820d67ba2e2d24400a3 software@the13thletter.info (Marco Ricci) Wed, 15 Jan 2025 19:23:47 +0100 e1e0c1a37cd712bd6a346820d67ba2e2d24400a3 Normalize and unwrap translatable strings (messages and comments) Rewrite one-paragraph comments and strings as one-line strings, with implicit line continuation if necessary. This is how they would appear anyway if printed via `repr`, and in the `mkdocstrings`-extracted API documentation. Further trim the "TRANSLATORS:" prefix from comments; it is added automatically during `.po` file writing as necessary. Some minor changes to the docstrings have also been made: * `Label` - `VAULT_METAVAR_SERVICE`: Trim `as "service_metavar"` from the` comments for consistency. * DebugMsgTemplate - `VAULT_NATIVE_EVP_BYTESTOKEY_RESULT`: Use the correct message. - `VAULT_NATIVE_CHECKING_MAC_DETAILS`, `VAULT_NATIVE_V02_PAYLOAD_MAC_POSTPROCESSING`: Fix reference to `InfoMsgTemplate.VAULT_NATIVE_PARSING_IV_PAYLOAD_AND_MAC` * InfoMsgTemplate - `VAULT_NATIVE_PARSING_IV_PAYLOAD_MAC`: Use "these terms" instead of "this term". The diff is hard to read in normal "line" mode, but much clearer if read in "word-diff" mode (with quotes also treated as whitespace). https://git.schokokeks.org/derivepassphrase.git/commit/f38b80e71b72c46036ddccd2dc7c5cfbb6a4daf2 software@the13thletter.info (Marco Ricci) Wed, 15 Jan 2025 16:01:44 +0100 f38b80e71b72c46036ddccd2dc7c5cfbb6a4daf2 Add hypothesis-based tests for l10n machinery This specifically tests the `DebugTranslations` object, and various asserted properties of `TranslatedStrings` and `TranslatableStrings` such as hashability and equality under various modifications (e.g. trimming the filename). To further support this, `TranslatedStrings` now know their own format string replacement fields (except for `%`-formatted strings), and the `DebugTranslations` class now uses that knowledge instead of duplicating it inline. Additionally, because `TranslatedString`s are always interpolated, there is a new `TranslatedString.constant` constructor for `str` templates which ensures that nothing is interpolated. Some code branches previously excluded from coverage are now considered again. https://git.schokokeks.org/derivepassphrase.git/commit/d21c0bed73ae46bd06b004f5c0c1621b729e6fab software@the13thletter.info (Marco Ricci) Tue, 14 Jan 2025 03:06:58 +0100 d21c0bed73ae46bd06b004f5c0c1621b729e6fab Fix obvious coverage failures among the translatable strings machinery Use examples in doctests where it makes didactical sense. https://git.schokokeks.org/derivepassphrase.git/commit/5507510b6e8800ac739fd5ce5de3b3a6d771dce4 software@the13thletter.info (Marco Ricci) Mon, 13 Jan 2025 23:28:32 +0100 5507510b6e8800ac739fd5ce5de3b3a6d771dce4 Split off comments in translatable string enum value constructor Now that the constructor for translatable string enum values is homogeneous, split the constructor into a curried two-step function call. This should hopefully look much better visually separated when rendered in the API documentation than the current solution, because the rendering normalizes the multiline strings into single-line strings with escape sequences. (This commit only splits the arguments into the two-step function call; the arguments have not yet been trimmed or normalized.) https://git.schokokeks.org/derivepassphrase.git/commit/3d077627bc7f337b394d9a265c54b6042df3f4e8 software@the13thletter.info (Marco Ricci) Mon, 13 Jan 2025 22:44:58 +0100 3d077627bc7f337b394d9a265c54b6042df3f4e8 Sort arguments to translatable string enum value constructor https://git.schokokeks.org/derivepassphrase.git/commit/8075959562a0ba81ec2468af6e470e85f720f5df software@the13thletter.info (Marco Ricci) Mon, 13 Jan 2025 18:05:33 +0100 8075959562a0ba81ec2468af6e470e85f720f5df