https://git.schokokeks.org/derivepassphrase.git/tree/0e8eaab68ebf814292a967aecf1315839baadd4dRecent commits to derivepassphrase.git (0e8eaab68ebf814292a967aecf1315839baadd4d)2025-01-13T17:36:18+01:00tag:gitlist.org,2012:commit/0e8eaab68ebf814292a967aecf1315839baadd4dIssue new context IDs for translatable messages2025-01-13T17:36:18+01:00Marco Riccisoftware@the13thletter.info
<pre>Use an ID system similar to the trove classifiers used the Python
packaging authority.
(Enum members were not reordered according to this new ID system.)
</pre>
tag:gitlist.org,2012:commit/ede0e19df43c7bfd4d20199f918afc62df29e3b0Fix debug output of messages with trimmed filenames2025-01-13T17:28:25+01:00Marco Riccisoftware@the13thletter.info
<pre>We do need to keep track of the trimming status when adding those
variants to the cache, because the debug output formatter will discover
the trimmed fields in the template anyway and otherwise attempt to emit
them. So store the set of trimmed fields in the cache for each message,
and pass it on to the formatter. We will assume that if a field gets
trimmed, then it had a `None` value, which is true for all the fields we
currently support trimming.
</pre>
tag:gitlist.org,2012:commit/61a16b1ca63e9019311836f286b6c2ae713710fdSupport SOURCE_DATE_EPOCH for .po file generation2025-01-13T16:16:12+01:00Marco Riccisoftware@the13thletter.info
<pre>Copyright messages and the creation date will bear the source date epoch
value.
</pre>
tag:gitlist.org,2012:commit/e7887804003dc277a9095956ffb7a44cb90608f4Move translation string preparation into the TranslatableString class2025-01-13T15:49:08+01:00Marco Riccisoftware@the13thletter.info
<pre>Save for a few factory functions to make enum definitions more readable,
the normalization machinery for translatable strings belongs in their
class. I originally coded this separately because I mistakenly believed
that `typing.NamedTuple` classes cannot contain methods of their own.
</pre>
tag:gitlist.org,2012:commit/c0b2e8ab4fd0a0ff9dd1a158502d4f70c85d7721Properly support trimmed filenames in translation strings2025-01-13T14:50:03+01:00Marco Riccisoftware@the13thletter.info
<pre>The debug translations object and the `.po` file writer now properly
support translation strings with the filename portion trimmed.
Effectively, these are separate translation strings, and as such they
need separate cache entries and separate `.po` entries.
To fully support this, the translatable string itself now knows how to
trim the filename replacement field, which the debug translations object
now honors. The `.po` writer still needs the enum name to construct the
message ID, but now it takes an optional transformed string to use
instead of the enum value, if given.
One additional minor fix to the debug translator: some of the emitted
translated messages interpolate other translated messages (such as
metavars). Thus when interpolating arguments, if the argument is
a translated string, then stringify it before interpolation. This
avoids printing the `repr` of the inner translated string, which is
otherwise very common for debug translation output.
</pre>
tag:gitlist.org,2012:commit/7986212a1f6a9ab0b4ba5d983e8a9846c90b47eaGenerate debug translations automatically, in code and on the command-line2025-01-13T14:19:27+01:00Marco Riccisoftware@the13thletter.info
<pre>Introduce a `DebugTranslations` object that returns the enum name of the
given message as its translation, including the parameters to be
interpolated.
Rename the `_format_pot_file` to `_format_po_file` and expand it to emit
either a template file or a debug translation `.po` file. This differs
slightly in the header, and in whether the translations are empty by
default or filled in with the enum name. The ad-hoc command-line
interface now accepts options to select the template or the debug
translation, and a way to explicitly override the declared version of
the `.po` template.
Because of negative experience with the `poedit` translations editor,
the message-ID (enum name) is no longer embedded as a (pseudo-)location
of the message string, but rather embedded as a translators' comment.
</pre>
tag:gitlist.org,2012:commit/7483aceb6e937bda5c0128129a4076b4df197d06Hide translation template enums behind a type alias2025-01-13T14:09:49+01:00Marco Riccisoftware@the13thletter.info
<pre>This is getting annoying to type, and error-prone to update.
</pre>
tag:gitlist.org,2012:commit/a0fe6ac8f03daa0df66dfedcf7071732f79ae45bMerge topic branch 'harmonize-exporter-interface' into master2025-01-13T12:40:34+01:00Marco Riccisoftware@the13thletter.info
<pre>* t/harmonize-exporter-interface:
Add changelog entry for export handler interface harmonization
Test the export handler dispatcher as well as the handlers directly
Harmonize the interface for both vault config export handlers
Accept all bytes-like objects as byte strings in the export subcommand
</pre>
tag:gitlist.org,2012:commit/9b9febbf4861ef7d6917367965677a58fd7ce1adAdd changelog entry for export handler interface harmonization2025-01-11T20:06:57+01:00Marco Riccisoftware@the13thletter.info
<pre></pre>
tag:gitlist.org,2012:commit/d25cdbdd2494feabfb29e8d8a6d8f695475bf7a2Test the export handler dispatcher as well as the handlers directly2025-01-11T19:04:57+01:00Marco Riccisoftware@the13thletter.info
<pre>For each test calling an export handler directly, also perform the test
when calling the export handler dispatcher.
</pre>