-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate translation sync to eduID apps (Android and iOS)
- Loading branch information
Showing
2 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,8 @@ | ||
Tiqr/eduid-app-android: | ||
- source: localizations.yaml | ||
dest: localizations.yaml | ||
|
||
Tiqr/eduid-app-ios: | ||
- source: localizations.yaml | ||
dest: EduID/localizations.yaml | ||
|
This file contains 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,53 @@ | ||
name: Update translations | ||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'localizations.yaml' | ||
jobs: | ||
sync-eduid-apps: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, '#AUTO#') }} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@master | ||
- name: Get token for the Tiqr github org | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token-tiqr-org | ||
with: | ||
app-id: ${{ secrets.SYNC_APP_ID }} | ||
private-key: ${{ secrets.SYNC_PRIVATE_KEY }} | ||
owner: Tiqr | ||
- name: Create PR for new translation in eduid-app repos | ||
uses: BetaHuhn/repo-file-sync-action@v1 | ||
with: | ||
GH_INSTALLATION_TOKEN: ${{ steps.app-token-tiqr-org.outputs.token }} | ||
COMMIT_PREFIX: "#AUTO#" | ||
CONFIG_PATH: .github/sync.yml | ||
localicious: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'npm' | ||
- name: Install localicious/ | ||
run: | | ||
npm install -g @picnicsupermarket/localicious | ||
- name: Create Localizable.strings files | ||
run: | | ||
cd ${{ github.workspace }} | ||
yarn localicious render ./localizations.yaml ./account-gui/src/locale/ --languages en,nl --outputTypes js -c SHARED | ||
rm -fr ./account-gui/src/locale/js/Localizable.ts | ||
yarn localicious render ./localizations.yaml ./myconext-gui/src/locale/ --languages en,nl --outputTypes js -c SHARED | ||
rm -fr ./myconext-gui/src/locale/js/Localizable.ts | ||
- name: Commit updated files | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Automated update of strings.xml after updating localizations.yaml | ||
file_pattern: '**/strings.json' | ||
|
||
|