···11+name: Nightly Update Source Languages
22+on:
33+ schedule:
44+ - cron: '0 2 * * *' # run at 2 AM UTC
55+ workflow_dispatch:
66+77+jobs:
88+ extract-languages:
99+ name: Nightly Update Source Languages
1010+ runs-on: ubuntu-latest
1111+1212+ permissions:
1313+ # Give the default GITHUB_TOKEN write permission to commit and push the
1414+ # added or changed files to the repository.
1515+ contents: write
1616+1717+ steps:
1818+ - name: Check out Git repository
1919+ uses: actions/checkout@v3
2020+ - name: Install node
2121+ uses: actions/setup-node@v4
2222+ with:
2323+ node-version-file: .nvmrc
2424+ - name: Yarn install
2525+ uses: Wandalen/wretry.action@master
2626+ with:
2727+ command: yarn --frozen-lockfile
2828+ attempt_limit: 3
2929+ attempt_delay: 2000
3030+ - name: Extract language strings
3131+ run: yarn intl:extract
3232+ - name: Create commit
3333+ uses: stefanzweifel/git-auto-commit-action@v5
3434+ with:
3535+ commit_message: Nightly source-language update
3636+ file_pattern: /src/locale/locales/en/messages.po
+7-5
docs/localization.md
···40404141Install the [Crowdin CLI](https://crowdin.github.io/crowdin-cli/). You will need to [configure your API token](https://crowdin.github.io/crowdin-cli/configuration) to access the project.
42424343+### English source-file sync with Crowdin
4444+4545+Every night, a GitHub action will run `yarn intl:extract` to update the english `messages.po` file. This will be automatically synced with Crowdin. Crowdin should notify all subscribed users of new translations.
4646+4347### Release process
444845491. Pull main and create a branch.
46501. Run `yarn intl:pull` to fetch all translation updates from Crowdin.
47511. Create a PR, ensure the translations all look correct, and merge.
4848-1. Merge all approved translation PRs (contributions from outside crowdin).
4949-1. Pull main.
5050-1. Run `yarn intl:extract` to sync the english `.po` file with the state of the app.
5151-1. Run `yarn intl:push` to sync Crowdin with the state of the repo.
5252-1. Commit the updated english `.po` and push to GitHub.
5252+1. If needed:
5353+ 1. Merge all approved translation PRs (contributions from outside crowdin).
5454+ 1. Run `yarn intl:push` to sync Crowdin with the state of the repo.
53555456### Testing the translations in Crowdin
5557