translation: Improve meta-data handling (authors, licence, copyright, ...)
The meta data in the po-files is messy (e.g. authors, license, version). Our Weblate platform seems not to be able to handle things like this. So we need to manage that by our own. This is an example of one po-file header
# Swedish translation for backintime
# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
# This file is distributed under the same license as the backintime package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
#
msgid ""
msgstr ""
"Project-Id-Version: backintime\n"
"Report-Msgid-Bugs-To: https://github.com/bit-team/backintime\n"
"POT-Creation-Date: 2024-11-13 09:21+0100\n"
"PO-Revision-Date: 2024-09-25 08:52+0000\n"
"Last-Translator: Umeaman <[email protected]>\n"
"Language-Team: Swedish <https://translate.codeberg.org/projects/backintime/common/sv/>\n"
"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.7.2\n"
"X-Launchpad-Export-Date: 2022-11-06 19:32+0000\n"
This is just a bunch of ideas I need to thinking through.
- [ ] ~~Convert
TRANSLATORSfile into json format.~~ - [ ] Use
msgcatto manipulate the headers. - [x] ~~Add all known translators (from translator-placeholder-string file) to
Last-Translatorfield.~~ - [ ] Use
updateversion.shwithmsgcatto set theProject-Id-Versionfield. - [ ] Warn in
update_language_files.pyifProject-Id-Versiondoes not fit to theVERSIONfile. - [ ] SPDX meta data
- [ ] Check if Weblate does overwrite the SPDX comments in po files. If not ...
- [ ] Manually create SPDX header for each po file based on the TRANSLATORS file.
- [X] Remove TRANSLATORS file.
- [ ] ~~Use
update_language_files.pyscript to recreate a Python readable (like language.py) list of translators usable in the About dialog.~~ - [ ] ~~Add translators info to the
AUTHORSfile. Point to po-Headers, the about dialog and auto-generated translators file.~~
- [ ] Set
Licensefield - [ ] Remove field
X-Launchpad-Export-Date
The thing is that Weblate will overwrite all this stuff. I still don't know why and how I can change that. So we need to regenerate all that meta data while using the update_language_files.py script. Still not sure if this will work.
Edit (2025-02)
Found an interesting solution in the "Peek" project. They use translator-strings in their po files. https://hosted.weblate.org/search/peek/translations/?q=translator-credits&search=exact&source=on&type=all&ignored=False -> Is implemented.