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

Add example script to update translation files #296

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hasecilu
Copy link

@hasecilu hasecilu commented Feb 28, 2024

@kaktusus
Copy link
Contributor

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

Right suggestion. 😀
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 🌵 for both translators and developers of external workbenches. 🥇

@hasecilu
Copy link
Author

hasecilu commented Mar 13, 2024

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.

  • Enhance description of workflow
  • Add missing locales (don't know how I missed them)
  • -U flag for maintainer to update only main agnostic file
  • -R flag for maintainer to release all translations
  • -r & -u for translators to do the things they could do before
  • Reorganize some functions
  • Add help
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?

@hasecilu hasecilu force-pushed the feat/script_for_updating_translations_files branch 2 times, most recently from 671bfd8 to 7618b40 Compare March 14, 2024 01:11
- Add bash script to:
- include marked strings on Python files (*.ts) & UI files (*.ui)
- update translation files
- release compiled translation for use

The workbench maintainer must mark the strings with `translate()`
or `QT_TRANSLATE_NOOP()` on Python files and make sure that strings
on UI that face users are not marked with notr="true".
@hasecilu hasecilu force-pushed the feat/script_for_updating_translations_files branch from 7618b40 to fc8fbc2 Compare March 14, 2024 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants