This updates each PO file to the date when it was last touched:
for po_file in po/*.po; do
POT_DATE=$(git log -1 --date=short --format=%ad $po_file)
sed -i -e 's/"POT-Creation-Date:.*"/"POT-Creation-Date:
'$POT_DATE'\\n"/' $po_file
done
The dates will be updated with `msgmerge` in the future via
https://github.com/google/mdbook-i18n-helpers/pull/87.
The dates here can be adjusted by hand if needed — the starting point
here only serves as a rough anchor to let us freeze the translations
from further updates. So if you know that you ran `msgmerge` most
recently on a given date, please update the file to that date in a later
PR.
Before, po/de.po had these statistics:
410 translated messages, 697 fuzzy translations, 674 untranslated
messages.
Afterwards, the statistics for po/de.po is:
556 translated messages, 814 fuzzy translations, 1097 untranslated
messages.
The number of translated messages stayed at 23%.
With this change, it becomes important to use the latest version of
mdbook-i18n-helpers when viewing the translation locally. To update to
the latest version, run
cargo install mdbook-i18n-helpers
You will now be able to serve the translation locally.
Part of #330.
* Updated base translations
* Translated TOC to german
* Translated Chapter 1 to German
* Update po/de.po
Co-authored-by: ronaldfw <wotzlaw@gmail.com>
---------
Co-authored-by: ronaldfw <wotzlaw@gmail.com>
* Parse Markdown to support translation.
This upgrades from just splitting Markdown files on double-newlines, to
using a Markdown parser to break them into more appropriate chunks. The
upshot is that code samples are all in one message, lists are bundled
together, and generally it should be easier to translate.
* [WIP] helper to update po files for new translation
* process synthetic input file-by-file
* review comments
* remove temporary code
* fix msgfmt lints
I started using poedit to work on the translation, which has
reformatted large parts of the file, so the change is a lot larger
than just the newly translated parts.