-
Notifications
You must be signed in to change notification settings - Fork 15
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
Sync desktop wallet translations with Crowdin #644
Conversation
|
push: | ||
paths: ['apps/desktop-wallet/locales/**'] | ||
branches: [next] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action will run only if there are changes in the files in the defined paths
when a push in the next
branch happens, or when run manually (workflow_dispatch
).
permissions: | ||
contents: write | ||
pull-requests: write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed so that the action can push to a branch and create PRs.
uses: crowdin/github-action@v2 | ||
with: | ||
config: 'apps/desktop-wallet/crowdin.yml' | ||
upload_sources: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will upload new translation strings added to the English JSON.
with: | ||
config: 'apps/desktop-wallet/crowdin.yml' | ||
upload_sources: true | ||
upload_translations: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will upload any translations that were added in the corresponding language JSON files. This is basically essential for the initialization of the languages. Any further updates on these files should happen on Crowdin directly (in principal). But nothing stops us accepting PRs from translators that update translation files directly instead of going through Crowdin (for example, you can already add the French translations, it'd be an overhead to have to go through Crowdin in each of your PRs).
download_translations: true | ||
localization_branch_name: l10n_crowdin_translations | ||
create_pull_request: true | ||
pull_request_title: 'New Crowdin translations' | ||
pull_request_body: 'New translations from https://crowdin.com/project/alephium-desktop-wallet.' | ||
pull_request_base_branch_name: 'next' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this config easily reads, if there are any new translations added in Crowdin, they will be downloaded and a new PR will be created with the changes.
CROWDIN_PROJECT_ID= | ||
CROWDIN_PERSONAL_TOKEN= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These 2 secrets were added in our GitHub actions settings in the frontend repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try it!
Closes #643
See #620 (comment) for details and resources.