"update_option": "update_as_unapproved" does nothing

@marcelbrode to be on the same page please record us a video with all the steps you take,

This video would be empty, as this is an automated task, which I have already mentioned several times. However, I am happy to provide you with my .yaml files and explain once more how our scheduled tasks work.

  1. We collect snippet files in a GitHub-Repository
  2. A scheduled task uploads everything at 8pm, as you can see in the GitHub-Action config file

And that’s it. Everything else is as I have already mentioned. If I change a snippet, the approval status remains unchanged.

Crowdin.yml

"project_id_env": "CROWDIN_PROJECT_ID"
"api_token_env": "CROWDIN_PERSONAL_TOKEN"
"base_path": "./translations/"
"base_url": "https://api.crowdin.com"

files: [{
    "source": "/en-GB/**/*.json",
    "translation": "/%locale%/**/%original_file_name%",
    "type": "json",
    "update_option": "update_as_unapproved",
    "translation_replace": {
        "no-NO": "nn-NO"
    },
    "languages_mapping": {
        "locale": {
            "sr-CS": "sr-RS"
        }
    }
}, {
    "source": "/en-GB/**/*.json",
    "translation": "/%two_letters_code%/**/%original_file_name%",
    "type": "json",
    "update_option": "update_as_unapproved",
    "translation_replace": {
        "de": "de-DE"
    },
    "languages_mapping": {
        "two_letters_code": {
            "ar": "ar-SA",
            "bg": "bg-BG",
            "bs": "bs-BA",
            "ca": "ca-ES",
            "cs": "cs-CZ",
            "da": "da-DK",
            "el": "el-GR",
            "fi": "fi-FI",
            "fr": "fr-FR",
            "he": "he-IL",
            "hi": "hi-IN",
            "hr": "hr-HR",
            "hu": "hu-HU",
            "id": "id-ID",
            "it": "it-IT",
            "ja": "ja-JP",
            "ko": "ko-KR",
            "lt": "lt-LT",
            "lv": "lv-LV",
            "nl": "nl-NL",
            "pl": "pl-PL",
            "pt": "pt-PT",
            "ro": "ro-RO",
            "ru": "ru-RU",
            "sk": "sk-SK",
            "sl": "sl-SI",
            "th": "th-TH",
            "tr": "tr-TR",
            "uk": "uk-UA",
            "vi": "vi-VN"
        }
    }
}]

crowdin-upload.yml (GitHub Workflow)

name: "Crowdin Upload Action"

on:
  workflow_dispatch:
  schedule:
    - cron: '0 20 * * *' # Every day at 20:00 UTC

jobs:
  crowdin-upload:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Prepare pre-fill en-US language files
        run:  PROJECT_ROOT="${GITHUB_WORKSPACE}" sh ./scripts/prepare-en-US.sh

      - name: Synchronize with Crowdin
        uses: crowdin/github-action@v1
        with:
          upload_sources: true
          upload_translations: true
          import_eq_suggestions: true
          download_translations: false
          preserve_hierarchy: false
        env:
          CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
          CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

Hi @marcelbrode,

Sorry for the delay! I have checked everything from our side, and looks like when you updated the source file (RootRoot folder), the previous translation actually did get unapproved. You are welcome to check this for any of the target languages by doing the following steps: open Editor e.g. for the French language → find the string sw-media.image-generator.image_root_folder_name → in the Source string field click on three dotsTranslation History.

As a result, you’ll see that on July 4th, the source string was changed and at the same time the existing translation was unapproved.

Could you please check it from your side?

Well, to be honest it didn’t. Like I said here: I tested this on Friday again to re-create the issue.

image

I deleted “Root folder” and approved “Root” to recreate the problem. That same evening, my schedulded task reuploaded it and didn’t unapprove it.

But I have the feeling I get what the issue is. It only unapproves when english changes, when german snippets change, which is the other one of two languages we maintain outside crowdin, I have to manually adjust always, otherwise crowdin will change it back later that day :confused:

If that’s the case, I guess crowdin doesn’t support a proper solution for that? :thinking: Why isn’t that supported for translations?

I sent you the reply via email (with the details) since it included links to the strings

The translations are public any, so I don’t mind posting them here.

So I guess what you wanna say in the Mail is “Yes”. If I change something in english (translation & source) it does unapprove, but not in german, where I have to lose control over approvals, to auto-override this.

This would mean I have to create at least 2 crowdin.yml files, since I want to upload en/de, but wanna download every other language, since mentioning the other languages would lead them to be uploaded, which is okay, as long is it isn’t auto-approve.

Guess I’ll have to tinker around with this.

Hi , yes, you’re welcome