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

Use Crowdin for localization #1373

Open
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

oxygen-dioxide
Copy link
Contributor

There are many contributors who want to contribute to OpenUtau's localization. Crowdin provides a user-friendly UI for them to contribute strings translations without having to learn git and code.
I created a crowdin project for OpenUtau at https://crowdin.com/project/oxygen-dioxideopenutau
Changes made to this repo:

  • added crowdin config file crowdin.yml and a github action .github/workflows/crowdin.yml to sync this repo with crowdin project
  • files outputed from crowdin doesn't follow the code styles used in this repo, so I changed Misc/sync_strings.py to use it to fix their styles
  • Crowdin doesn't handle fontfamily, so I store them at unhandled_strings.json, which is applied when running sync_strings.py.

@stakira
Copy link
Owner

stakira commented Jan 3, 2025

This is great! Could you clarify:

  • How to add a new string key, e.g., during new feature development
  • How to delete a string key from all languages
  • How to add translations. I suppose there is no point to edit axamls, since Crowdin will overwrite them, right?
  • How are the translations reviewed? What if someone made a change by mistake?
  • How does this affect release cycles. Just run the workflow before making a release?

We would also need some guide in the Wiki later.

@github-actions github-actions bot force-pushed the crowdin-translated branch from f711e2d to 78f97b9 Compare January 3, 2025 06:07
@oxygen-dioxide
Copy link
Contributor Author

Crowdin actions runs in my forked repo at 12:00 UTC+8 every day.

  • When running the crowdin github action, English Strings.axaml will be synced from github to crowdin, including new strings and deleted strings.
  • Yes, crowdin actions will overwrite existing axamls, so we'll need to edit them on crowdin website. However, if a contributor edited an axaml file, crowdin also provides an "import file" function.
  • The translated strings won't directly go into the master branch. Instead, they're synced into https://github.com/oxygen-dioxide/OpenUtau/tree/crowdin-translated when the action runs. Only this branch will be modified by crowdin. We can review what has been changed there. Each time when we are going to release a new version, just create a PR from that branch to official master branch.

@github-actions github-actions bot force-pushed the crowdin-translated branch from ab6289f to 1848002 Compare January 3, 2025 06:31
@stakira
Copy link
Owner

stakira commented Jan 4, 2025

Let's try make the process as smooth as possible, i.e., as little human action as possible.
I assume the current flow is:

  1. Add text to main repo
  2. Merge the new text into to your repo
  3. Workflow picks it up and updates crowdin-translated branch in your repo
  4. Create and merge a PR from crowdin-translated branch

1, 3 and 4 are fine. But 2 is a manual step. Could we make it pick up untranslated text from the main repo? Or we should run the workflow from main repo instead?

@github-actions github-actions bot force-pushed the crowdin-translated branch from ae49074 to 57f7a66 Compare January 4, 2025 04:24
@github-actions github-actions bot force-pushed the crowdin-translated branch from fd0cc96 to 236ad85 Compare January 4, 2025 05:45
@oxygen-dioxide
Copy link
Contributor Author

oxygen-dioxide commented Jan 4, 2025

Added these code into crowdin action (before syncs EN strings into crowdin), Now it fetches the latest changes from official repo autometically:

      - name: Sync from official repo
        run: |
          git pull --unshallow
          git remote add official https://github.com/stakira/OpenUtau
          git fetch official
          git merge --no-edit official/master

@github-actions github-actions bot force-pushed the crowdin-translated branch 5 times, most recently from 1645057 to e9e7b72 Compare January 9, 2025 04:25
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