Download all translations as zip folder
I'm not sure if that is possible what I try to achieve. I have this configuration,
- name: crowdin task
uses: crowdin/[email protected]
with:
download_translations: true
push_translations: false
create_pull_request: true
config: 'crowdin.yml'
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
but it doesn't raise a pull request? I'm looking forward to download all translations and get a pull request that adds a zip file to the project, is that possible?
Hi @josephjthomas! Will double-check this and update you as soon as possible!
Hi @josephjthomas!
You need to add one more env property, this is GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}, if that doesn't help, please share the output of the github action.
2021-11-17T10:13:16.8351729Z STARTING CROWDIN ACTION
2021-11-17T10:13:16.8352361Z UPLOAD SOURCES
2021-11-17T10:13:20.0830650Z ✔️ Fetching project info
2021-11-17T10:13:21.1244739Z ✔️ File 'lang.json'
2021-11-17T10:13:21.3351767Z DOWNLOAD TRANSLATIONS
2021-11-17T10:13:24.1996935Z ✔️ Fetching project info
2021-11-17T10:13:24.2045276Z ✔️ Building ZIP archive with the latest translations
2021-11-17T10:14:00.0977312Z ✔️ Building translation (100%)
2021-11-17T10:14:00.5848757Z ✔️ Downloading translations
2021-11-17T10:14:00.7150690Z ✔️ Extracting archive
2021-11-17T10:14:00.7409855Z ✔️ Extracted: 'main/src/main/resources/lang/en/lang.json'
2021-11-17T10:14:00.7617239Z ⚠️ Downloaded translations don't match the current project configuration. The translations for the following sources will be omitted (use --verbose to get the list of the omitted translations):
2021-11-17T10:14:00.7633292Z - master/main/src/main/resources/lang/lang.json (1)
2021-11-17T10:14:00.7634288Z - crowdin-translations/lang.json (1)
2021-11-17T10:14:01.0064265Z Post job cleanup.
It looks like it tries to place them in a folder called master. The default branch is "main" and the root folder is "main" too. My crowdin.yml contains the following entries:
base_path: .
base_url: "https://ourdomain.crowdin.com/"
project_id_env: CROWDIN_PROJECT_ID
api_token_env: CROWDIN_PERSONAL_TOKEN
files:
- source: main/src/main/resources/lang/lang.json
translation: >-
main/src/main/resources/lang/%two_letters_code%/%original_file_name%
@josephjthomas to create pull request you need to set option push_translations: true
about Downloaded translations don't match the current project configuration. maybe you have folder or branch master in Crowdin project?