Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download all translations as zip folder #99

Closed
josephjthomas opened this issue Nov 16, 2021 · 4 comments
Closed

Download all translations as zip folder #99

josephjthomas opened this issue Nov 16, 2021 · 4 comments
Labels
API limitation Currently, this is not possible due to API limitations enhancement New feature or request

Comments

@josephjthomas
Copy link

I'm not sure if that is possible what I try to achieve.
I have this configuration,

- name: crowdin task
        uses: crowdin/github-action@1.4.1
        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?

@josephjthomas josephjthomas added the enhancement New feature or request label Nov 16, 2021
@ira-sem
Copy link

ira-sem commented Nov 16, 2021

Hi @josephjthomas! Will double-check this and update you as soon as possible!

@VBeytok
Copy link
Collaborator

VBeytok commented Nov 17, 2021

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.

@josephjthomas
Copy link
Author

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%

@VBeytok
Copy link
Collaborator

VBeytok commented Nov 19, 2021

@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?

@andrii-bodnar andrii-bodnar added the API limitation Currently, this is not possible due to API limitations label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API limitation Currently, this is not possible due to API limitations enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants