Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

translation: Improve meta-data handling (authors, licence, copyright, ...) #1936

Open
13 tasks
buhtz opened this issue Nov 20, 2024 · 0 comments
Open
13 tasks
Assignees
Labels
Discussion decision or consensus needed Infrastructure

Comments

@buhtz
Copy link
Member

buhtz commented Nov 20, 2024

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 <Umeaman@users.noreply.translate.codeberg.org>\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 TRANSLATORS file into json format.
  • Use msgcat to manipulate the headers.
  • Add all known translators (from TRANSLATORS file) to Last-Translator field.
  • Use updateversion.sh with msgcat to set the Project-Id-Version field.
  • Warn in update_language_files.py if Project-Id-Version does not fit to the VERSION file.
  • 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.
    • Remove TRANSLATORS file.
    • Use update_language_files.py script to recreate a Python readable (like language.py) list of translators usable in the About dialog.
    • Add translators info to the AUTHORS file. Point to po-Headers, the about dialog and auto-generated translators file.
  • Set License field
  • 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.

@buhtz buhtz self-assigned this Nov 20, 2024
@buhtz buhtz added Infrastructure Discussion decision or consensus needed labels Nov 20, 2024
@buhtz buhtz added this to the 2nd release from now milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion decision or consensus needed Infrastructure
Projects
None yet
Development

No branches or pull requests

1 participant