-
Notifications
You must be signed in to change notification settings - Fork 66
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
I have a string-based Crowdin translation project, and I want the sync to work both ways
- upload the current list of strings from a file in the repository
- download the configured bundle and make a pull request to include it in this repository
The GitHub action fails on downloading the specified in configuration bundle, because of an invalid flag passed to the command line tool.
If I remove the problematic crowdin_branch_name: "main" from the configuration, the job fails because of missing branch name information:
2025-09-10T12:06:48.9964516Z STARTING CROWDIN ACTION
2025-09-10T12:06:49.0004681Z UPLOAD SOURCES
2025-09-10T12:06:52.2193025Z ✔️ Fetching project info
2025-09-10T12:06:52.6607024Z ❌ Branch is required for string-based projects
2025-09-10T12:06:53.2531780Z UPLOAD TRANSLATIONS
2025-09-10T12:06:56.1878678Z ✔️ Fetching project info
2025-09-10T12:06:56.2323770Z ❌ Cannot invoke "String.toCharArray()" because "branch" is null
2025-09-10T12:06:56.6704067Z Post job cleanup.
2025-09-10T12:06:57.2402515Z Token revoked
2025-09-10T12:06:57.3682042Z Post job cleanup.
Logs from when the crowdin_branch_name: "main" is set:
2025-09-10T12:11:34.2128246Z ✔️ File 'main/messages_en.properties'
2025-09-10T12:11:34.4777805Z UPLOAD TRANSLATIONS
2025-09-10T12:11:37.5784392Z ✔️ Fetching project info
2025-09-10T12:11:37.6491445Z ⏭ 'src/messages_fr.properties' translation file doesn't exist in the specified place
2025-09-10T12:11:37.6497164Z ⏭ 'src/messages_de.properties' translation file doesn't exist in the specified place
2025-09-10T12:11:37.9216679Z DOWNLOADING BUNDLE 25
2025-09-10T12:11:38.6069914Z Unknown option: '--branch=main'
2025-09-10T12:11:38.6447122Z
2025-09-10T12:11:38.6449910Z SYNOPSIS:
2025-09-10T12:11:38.6453974Z crowdin bundle download <id>
2025-09-10T12:11:38.6454357Z
2025-09-10T12:11:38.6454565Z DESCRIPTION:
2025-09-10T12:11:38.6455180Z Download bundle
2025-09-10T12:11:38.6455472Z
2025-09-10T12:11:38.6455718Z PARAMETERS:
2025-09-10T12:11:38.6456646Z <id> Numeric ID of the bundle
2025-09-10T12:11:38.6457106Z
2025-09-10T12:11:38.6457309Z OPTIONS:
2025-09-10T12:11:38.6457925Z -V, --version Display version information and exit
2025-09-10T12:11:38.6458709Z -h, --help Display help message and exit
2025-09-10T12:11:38.6459470Z --no-progress Disable progress on executed command
2025-09-10T12:11:38.6460332Z -v, --verbose Provide more information about the command execution
2025-09-10T12:11:38.6461132Z --no-colors Disable colors and styles
2025-09-10T12:11:38.6461947Z -c, --config=... Specify a path to the configuration file. Default:
2025-09-10T12:11:38.6463111Z crowdin.yml or crowdin.yaml
2025-09-10T12:11:38.6463916Z --identity=... Specify a path to user-specific credentials
2025-09-10T12:11:38.6464756Z --plain Provide plain, processable output
2025-09-10T12:11:38.6465648Z --keep-archive Do not remove the downloaded archive with translations
2025-09-10T12:11:38.6466787Z after it's extracting
2025-09-10T12:11:38.6467536Z --dryrun Print a command output without execution
2025-09-10T12:11:38.6468060Z
2025-09-10T12:11:38.6468273Z CONFIG OPTIONS:
2025-09-10T12:11:38.6468932Z -T, --token=... Personal access token required for authentication
2025-09-10T12:11:38.6469861Z --base-url=... Base URL of Crowdin server for API requests execution
2025-09-10T12:11:38.6470853Z --base-path=... Path to your project directory on a local machine
2025-09-10T12:11:38.6471684Z -i, --project-id=... Numeric ID of the project
2025-09-10T12:11:39.3547887Z Post job cleanup.
2025-09-10T12:11:39.7233537Z Token revoked
2025-09-10T12:11:39.8060478Z Post job cleanup.
Job configuration
- name: Sync (upload and download) with Crowdin
id: crowdin
uses: crowdin/github-action@v2
with:
base_url: ${{ vars.CROWDIN_API_URL }}
download_bundle: "25"
localization_branch_name: crowdin
commit_message: "chore(i18n): sync translations"
create_pull_request: true
pull_request_title: "chore(i18n): sync translations"
pull_request_base_branch_name: main
upload_sources: true
upload_translations: true
download_translations: false
export_only_approved: true
crowdin_branch_name: "main"
config: "crowdin.yml"
env:
CROWDIN_PROJECT_ID: "29"
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}crowdin.yml file:
project_id: "29"
api_token_env: CROWDIN_PERSONAL_TOKEN
base_path: "."
files:
- source: "/src/messages_en.properties"
translation: "/src/messages_%two_letters_code%.properties"It seems to be a bug to pass ---branch flag to the bundle download command, because it does not support this flag.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working