-
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
Conversation
workflow_dispatch: | ||
push: | ||
paths: ['bridge_ui/locales/**'] | ||
branches: [master] |
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 run either when we manually run it, or when there is any change in the translation files when pushing to master.
@@ -0,0 +1,36 @@ | |||
name: Sync translations |
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:
- Upload new translation strings to Crowdin
- Download any new approved translations from Crowdin
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 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:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.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.
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 comment
The 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.
@@ -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 comment
The 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).
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 the config file for Crowdin, defining the source and translation files.
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.
Thanks 👍
Related to #131