-
-
Notifications
You must be signed in to change notification settings - Fork 302
Migrate i18n to crowdin-cli and kolibri-build/kolibri-i18n #5831
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| name: Download translations from Crowdin | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| download: | ||
| name: Download translations and update files | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| python-version: '3.10' | ||
| activate-environment: "true" | ||
| enable-cache: "true" | ||
|
|
||
| - name: Install Python dependencies | ||
| run: uv pip sync requirements.txt | ||
|
|
||
| - name: Use pnpm | ||
| uses: pnpm/action-setup@v5 | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20.x' | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Setup Java for crowdin-cli | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Install gettext | ||
| run: sudo apt-get update && sudo apt-get install -y gettext | ||
|
|
||
| - name: Install JavaScript dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Download translations | ||
| env: | ||
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_KEY }} | ||
| run: make i18n-download | ||
|
|
||
| - name: Generate App Token | ||
| id: generate-token | ||
| uses: actions/create-github-app-token@v3 | ||
| with: | ||
| app-id: ${{ secrets.LE_BOT_APP_ID }} | ||
| private-key: ${{ secrets.LE_BOT_PRIVATE_KEY }} | ||
|
|
||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v8 | ||
| with: | ||
| token: ${{ steps.generate-token.outputs.token }} | ||
| commit-message: | | ||
| Update translations from Crowdin | ||
|
|
||
| This includes: | ||
| - Updated translation files (.po and .json) | ||
| - Compiled Django messages (.mo files) | ||
| - Updated frontend i18n files | ||
| branch: i18n-update-${{ github.ref_name }} | ||
| base: ${{ github.ref_name }} | ||
| delete-branch: true | ||
| title: 'Update translations from Crowdin for ${{ github.ref_name }}' | ||
| body: | | ||
| ## Summary of changes | ||
|
|
||
| This PR updates translations downloaded from Crowdin. | ||
|
|
||
| ### Changes included: | ||
| - Updated translation files (`.po` and `.json`) | ||
| - Compiled Django messages (`.mo` files) | ||
| - Updated frontend i18n files | ||
|
|
||
| ### Testing checklist: | ||
| - [ ] Verify that translations are not obviously empty or untranslated in the message files | ||
| - [ ] Switch to a few different languages and navigate the app | ||
| labels: | | ||
| i18n | ||
| TAG: user strings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| name: Upload translations to Crowdin | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| upload: | ||
| name: Extract and upload strings to Crowdin | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
| with: | ||
| python-version: '3.10' | ||
| activate-environment: "true" | ||
| enable-cache: "true" | ||
|
|
||
| - name: Install Python dependencies | ||
| run: uv pip sync requirements.txt | ||
|
|
||
| - name: Use pnpm | ||
| uses: pnpm/action-setup@v5 | ||
|
|
||
| - name: Use Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '20.x' | ||
| cache: 'pnpm' | ||
|
|
||
| - name: Setup Java for crowdin-cli | ||
| uses: actions/setup-java@v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Install gettext | ||
| run: sudo apt-get update && sudo apt-get install -y gettext | ||
|
|
||
| - name: Install JavaScript dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Extract and upload strings to Crowdin | ||
| env: | ||
| CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_KEY }} | ||
| run: | | ||
| make i18n-upload | ||
| make i18n-pretranslate-approve-all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| module.exports = require('kolibri-tools/babel.config'); | ||
| module.exports = require('kolibri-build/babel.config'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
I truly do not know if this is important but in Kolibri this is
CROWDIN_BRANCH := releaseETA here meaning the difference being ?= vs := not branhc name
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.
?=technically allows the value to be overridden by the command line - I left it like this just in case we have a specific need to override, but I don't think it matters.