aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-05-16 02:28:37 +0200
committernea <nea@nea.moe>2023-05-16 02:48:15 +0200
commit72d0f98b4c80738c96c603554d8c35fa8c45ae88 (patch)
tree6541a96ed211b51e0682aead49e8143e59d7d445
parentead6762eb1c005914b05f9d3c29f334989c67513 (diff)
downloadFirmament-72d0f98b4c80738c96c603554d8c35fa8c45ae88.tar.gz
Firmament-72d0f98b4c80738c96c603554d8c35fa8c45ae88.tar.bz2
Firmament-72d0f98b4c80738c96c603554d8c35fa8c45ae88.zip
Add crowdin auto translator
-rw-r--r--.github/workflows/crowdin.yml34
-rw-r--r--crowdin.yml11
2 files changed, 45 insertions, 0 deletions
diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml
new file mode 100644
index 0000000..8c1fc6b
--- /dev/null
+++ b/.github/workflows/crowdin.yml
@@ -0,0 +1,34 @@
+name: Crowdin Action
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ synchronize-with-crowdin:
+ runs-on: ubuntu-latest
+ permissions:
+ pull-requests: write
+ contents: write
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Crowdin Action
+ uses: crowdin/github-action@v1
+ with:
+ upload_sources: true
+ config: crowdin.yml
+ upload_translations: false
+ download_sources: false
+ download_translations: true
+ skip_untranslated_strings: true
+ export_only_approved: true
+ push_translations: true
+ create_pull_request: true
+ pull_request_title: 'New Crowdin Translations'
+ pull_request_base_branch_name: 'master'
+ pull_request_body: 'New Crowdin Translations'
+ localization_branch_name: l10n
+ env:
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
+ CROWDIN_PERSONAL_TOKEN: "${{ secrets.CROWDIN_TOKEN }}"
diff --git a/crowdin.yml b/crowdin.yml
new file mode 100644
index 0000000..7efb0c2
--- /dev/null
+++ b/crowdin.yml
@@ -0,0 +1,11 @@
+project_id: "588173"
+base_path: "."
+api_token_env: CROWDIN_PERSONAL_TOKEN
+preserve_hierarchy: false
+base_url: "https://api.crowdin.com"
+commit_message: "New translations"
+append_commit_message: false
+files:
+ - source: "/src/main/resources/assets/firmament/lang/en_us.json"
+ translation: "/src/main/resources/assets/firmament/lang/%locale_with_underscore%.json"
+