-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore) Setup transifex integration (#311)
- Loading branch information
1 parent
20e4b89
commit 68f36e7
Showing
3 changed files
with
65 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,32 @@ | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# every day at 8:05 PM UTC | ||
- cron: "5 20 * * *" | ||
|
||
name: "Scheduled Transifex Update" | ||
|
||
jobs: | ||
pull-translations-from-transifex: | ||
name: pull-translations-from-transifex | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Push source file using transifex client | ||
uses: transifex/cli-action@v2 | ||
with: | ||
token: ${{ secrets.TRANSIFEX_TOKEN }} | ||
args: pull --force --all | ||
- name: Create PR if necessary | ||
uses: peter-evans/create-pull-request@v6.0.1 | ||
with: | ||
commit-message: "(chore) Update translations from Transifex" | ||
title: "(chore) Update translations from Transifex" | ||
body: "Automated updates of translations pulled from Transifex" | ||
branch: "chore/update-transifex" | ||
author: "OpenMRS Bot <infrastructure@openmrs.org>" | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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,21 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [main] | ||
|
||
name: "Update Transifex on Push" | ||
|
||
jobs: | ||
push-translations-to-transifex: | ||
name: push-translations-to-transifex | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Push source file using transifex client | ||
uses: transifex/cli-action@v2 | ||
with: | ||
token: ${{ secrets.TRANSIFEX_TOKEN }} |
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,12 @@ | ||
[main] | ||
host = https://www.transifex.com | ||
|
||
[o:openmrs:p:openmrs3:r:esm-form-builder-app] | ||
file_filter = packages/esm-form-builder-app/translations/<lang>.json | ||
source_file = packages/esm-form-builder-app/translations/en.json | ||
source_lang = en | ||
type = KEYVALUEJSON | ||
minimum_perc = 0 | ||
replace_edited_strings = false | ||
keep_translations = false | ||
resource_name = esm-form-builder-app |