From 03c00d51ba1f7f4dbea151bda33c96253489ccfd Mon Sep 17 00:00:00 2001 From: mimi89999 Date: Wed, 19 Mar 2025 09:43:56 +0100 Subject: [PATCH] Add Crowdin config file and update crowdin-cli Co-authored-by: Alexander Bakker --- .crowdin/config.example.yml | 10 ---------- .github/workflows/crowdin.yml | 14 ++++---------- crowdin.yml | 14 ++++++++++++++ 3 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 .crowdin/config.example.yml create mode 100644 crowdin.yml diff --git a/.crowdin/config.example.yml b/.crowdin/config.example.yml deleted file mode 100644 index 4ef788a3..00000000 --- a/.crowdin/config.example.yml +++ /dev/null @@ -1,10 +0,0 @@ -project_id: "372633" -api_token: "" -base_path: "../app/src/main" -base_url: "https://api.crowdin.com" -preserve_hierarchy: true - -files: -- source: "res/values/strings.xml" - dest: "strings.xml" - translation: "res/values-%android_code%/%original_file_name%" diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml index e0fd559c..e7898362 100644 --- a/.github/workflows/crowdin.yml +++ b/.github/workflows/crowdin.yml @@ -13,19 +13,13 @@ jobs: - uses: actions/checkout@v4 - name: Install crowdin-cli run: | - wget https://github.com/crowdin/crowdin-cli/releases/download/3.7.2/crowdin-cli.zip - echo "ee9f838b819ccedc33c9b2537055e5ba7d7934561b24df1e1a6274cbd6e27f2d crowdin-cli.zip" | sha256sum -c + wget https://github.com/crowdin/crowdin-cli/releases/download/4.6.1/crowdin-cli.zip + echo "7afd70de3a747ac631a5bad7866008163ae1d50c4606b5773f0b90a5481ffde2 crowdin-cli.zip" | sha256sum -c unzip crowdin-cli.zip -d crowdin-cli - name: Upload to Crowdin env: - CROWDIN_TOKEN: "${{ secrets.CROWDIN_TOKEN }}" + CROWDIN_PERSONAL_TOKEN: "${{ secrets.CROWDIN_TOKEN }}" run: | - java -jar ./crowdin-cli/3.7.2/crowdin-cli.jar upload sources \ + java -jar ./crowdin-cli/4.6.1/crowdin-cli.jar upload sources \ --no-progress \ - --token "$CROWDIN_TOKEN" \ - --project-id 372633 \ - --base-path app/src/main \ - --source res/values/strings.xml \ - --translation "res/values-%android_code%/%original_file_name%" \ - --dest strings.xml \ --branch master diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 00000000..59912b50 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,14 @@ +project_id: "372633" +preserve_hierarchy: true +base_path: "app/src/main" +base_url: "https://api.crowdin.com" +api_token_env: "CROWDIN_PERSONAL_TOKEN" +files: + - type: "android" + source: "res/values/strings.xml" + dest: "strings.xml" + translation: "res/values-%android_code%/%original_file_name%" + - type: "android" + source: "res/values-v29/strings.xml" + dest: "strings-v29.xml" + translation: "res/values-%android_code%-v29/%original_file_name%"