FreeCAD / FreeCAD-translations

Repository tracking localization issues and progress
5 stars 3 forks source link

Add example script to update translation files #296

Open hasecilu opened 4 months ago

hasecilu commented 4 months ago

The workbench must mark the strings with translate() or QT_TRANSLATE_NOOP() on Python files.

Before merging maybe some other notes/comments should be added to the script to make maintainer or translator aware of someting. Maybe links to https://freecad.github.io/DevelopersHandbook/technical/translation.html or https://wiki.freecad.org/Translating_an_external_workbench?

This is already used on:

kaktusus commented 4 months ago

Before merging maybe some other notes/comments should be added to the script to make maintainer or translator aware of someting.

Right suggestion. :grinning: I can add a few words about your script here in this repository. Now I will say that It is ro recommended solution by me :cactus: for both translators and developers of external workbenches. :1st_place_medal:

hasecilu commented 3 months ago

The previous script was made in my workflow as translator: update, translate, release.

With the new integration of external WB to Crowdin a new task is needed for maintainer so I made some changes.

Description:
        Create, update and release translation files.

Usage:
        ./update_translation.sh [-R] [-U] [-r <locale>] [-u <locale>]

Flags:
  -R
        Release all locales
  -U
        Update main translation file (locale agnostic)
  -r <locale>
        Release the specified locale
  -u <locale>
        Update strings for the specified locale

Maybe some links to some resources could be added?