-
Notifications
You must be signed in to change notification settings - Fork 4
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
Create translation files for bridge UI and sync them with Crowdin #132
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Sync translations | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: ['bridge_ui/locales/**'] | ||
branches: [master] | ||
Comment on lines
+4
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This workflow will run either when we manually run it, or when there is any change in the translation files when pushing to master. |
||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is required so that Crowdin can open PRs in this repo. We need to make sure that GitHub Actions are allowed to do that. This can be toggled in the settings of this repo: https://github.com/alephium/wormhole-fork/settings/actions It looks like this: |
||
|
||
jobs: | ||
sync-translations: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Sync sources and translations | ||
uses: crowdin/github-action@v2 | ||
with: | ||
config: 'crowdin.yml' | ||
upload_sources: true | ||
upload_translations: true | ||
download_translations: true | ||
export_only_approved: true | ||
localization_branch_name: l10n_crowdin_translations | ||
create_pull_request: true | ||
pull_request_title: 'New Crowdin translations' | ||
pull_request_body: 'New translations from Crowdin.' | ||
pull_request_base_branch_name: 'master' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | ||
Comment on lines
+35
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to set these 2 secrets up in this project. Hit me up to give you the secrets. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the source file of all translations. When updating the UI, new strings need to be added here so that they are synced with Crowdin at the next push on master. |
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,7 @@ | |
"qrcode.react": "^3.0.1", | ||
"react": "^17.0.2", | ||
"react-dom": "^17.0.2", | ||
"react-i18next": "^14.1.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This library takes care of using the right translation file based on the choice of the user (language switcher component will be implemented later, once we have some translations, for now we only have the English source file). |
||
"react-modal": "^3.15.1", | ||
"react-redux": "^7.2.4", | ||
"react-router-dom": "^5.2.0", | ||
|
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 workflow will: