TIQR-507: Input screen basics #146
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
name: Update translations | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'localizations.yaml' | |
jobs: | |
sync-myconext: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '#AUTO#') }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@master | |
- name: Get token for myconext repo | |
uses: actions/create-github-app-token@v1 | |
id: app-token-myconext | |
with: | |
app-id: ${{ secrets.SYNC_APP_ID }} | |
private-key: ${{ secrets.SYNC_PRIVATE_KEY }} | |
owner: OpenConext | |
- name: Create PR for new translation in Openconext-myconext | |
uses: BetaHuhn/repo-file-sync-action@v1 | |
with: | |
GH_INSTALLATION_TOKEN: ${{ steps.app-token-myconext.outputs.token }} | |
COMMIT_PREFIX: "#AUTO#" | |
CONFIG_PATH: .github/sync-myconext.yml | |
sync-eduid-app-ios: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '#AUTO#') }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@master | |
- name: Get token for eduid-app-ios repo | |
uses: actions/create-github-app-token@v1 | |
id: app-token-eduid-app-ios | |
with: | |
app-id: ${{ secrets.SYNC_APP_ID }} | |
private-key: ${{ secrets.SYNC_PRIVATE_KEY }} | |
owner: Tiqr | |
- name: Create PR for new translation in eduid-app-ios | |
uses: BetaHuhn/repo-file-sync-action@v1 | |
with: | |
GH_INSTALLATION_TOKEN: ${{ steps.app-token-eduid-app-ios.outputs.token }} | |
COMMIT_PREFIX: "#AUTO#" | |
CONFIG_PATH: .github/sync-eduid-app-ios.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 }} | |
localicious render localizations.yaml ./ --languages en,nl --outputTypes android -c SHARED,ANDROID | |
- name: Move files and clean up | |
run: | | |
cd ${{ github.workspace }} | |
mv android/nl/strings.xml app/src/main/res/values-nl/strings.xml | |
mv android/en/strings.xml app/src/main/res/values/strings.xml | |
rm -rf android | |
- 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.xml' | |