Need help with CLI config

I can’t download translations using the CLI client

crowdin download

✔️  Fetching project info     
✔️  Building ZIP archive with the latest translations
✔️  Building translation (100%)    
✔️  Downloading translations     
✔️  Extracting archive     
⚠️  Couldn't find any file to download
⚠️  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)
crowdin list project                          

✔️  Fetching project info     
✔️  File 'data_strings.xml'
✔️  File 'presentation_strings.xml'
✔️  File 'strings_plurals.xml'
✔️  File 'strings_redesign.xml'

Configuration for files:

files: [
    {
        "dest":         "presentation_strings.xml",
        "source":       "/presentation/src/main/res/values/strings.xml",
        "translation":  "/presentation/src/main/res/values-%android_code%/strings.xml",
        "type":         "android"
    },
    {
        "dest":         "data_strings.xml",
        "source":       "/data/src/main/res/values/strings.xml",
        "translation":  "/data/src/main/res/values-%android_code%/strings.xml",
        "type":         "android"
    },
    {
        "dest":         "strings_plurals.xml",
        "source":       "/presentation/src/main/res/values/strings_plurals.xml",
        "translation":  "/presentation/src/main/res/values-%android_code%/strings_plurals.xml",
        "type":         "android"
    },
    {
        "dest":         "strings_redesign.xml",
        "source":       "/presentation/src/main/res/values/strings_redesign.xml",
        "translation":  "/presentation/src/main/res/values-%android_code%/strings_redesign.xml",
        "type":         "android"
    },

    
]
1 Like

What CLI you use? Is it 3.9.1? GitHub - crowdin/crowdin-cli: A command-line client for the Crowdin API

For me it seems dest should go after the source specification. Please refer to the guidance:

1 Like

Thanks for quick reply !
I use 3.9.1
Moved dest under the source as in docs - same result.

1 Like

Do you have those files in your PC? Also, dest is needed only to specify the file name for translators, not to change the paths and so on. Probably there’s also no need in type pattern if files are already in xml. Configuration File | Crowdin Developer Portal

Do you use true=preserve hierarchy? Also, if uploading this file manually, not via CLI, but via UI, does that work?

1 Like

Thanks for answer, I figured out with my problem.
Could you help me with another question?
Is it possible to make a config file for download only a specific list of translated languages ?

1 Like

I don’t think so, but you can run this command do download specific target

crowdin download -l {language_code}

By the way I see your workflow is more than just a common one, try switching to API maybe? It’s far more flexible that CLI.
Crowdin has a pre-made library in Postman, so no need to write your own scripts.

2 Likes