crowdin-cli: Error: `base path` is empty

When trying to download the latest translations for my crowdin project, I get the following error:

$ crowdin download --identity keys/crowdin.yaml
Building ZIP archive with the latest translations for 'ro' - skipped
Error `base path` is empty

My config file:

"project_identifier": "[redacted]"
"base_path": "."

files: [
  {
    "source": "/electron/locale/strings.js",
    "translation": "/electron/locale/strings-%two_letters_code%.js",
    "update_option": "update_as_unapproved"
  }
]

My environment:

OS: Linux Debian 9.5 stretch
crowdin: v2.0.24
Java: 1.8.0_191

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 27 (9 by maintainers)

Most upvoted comments

I got the base_path is empty when I had a typo in the filename of my source file, it was super confusing even after I found this issue. JetBrains spellcheck saved my bacon 😬

Okay, but the error message is quite misleading I think. I thought base_path is empty means that the configuration is not loaded properly or the value is not set. Instead it really means whatever crowdin is expecting to be the base_path after reading the config is empty (/i18n/ folder).

Hey @erperejildo, with your configuration French translations will go this way:

/fr/src/locales/en.json

I think this one is more preferred one: /src/locales/fr.json

In this case, please modify the configuration:

  "source" : "/src/locales/*.json",
  "translation" : "/src/locales/%two_letters_code.json"

or (to get fr-FR.json):

  "source" : "/src/locales/*.json",
  "translation" : "/src/locales/%locale%.json"

After you do the change for translation field, please run crowdin push to apply these changes to Crowdin. Then you can try to build the project via web interface (Build & Download) and finally run crowdin pull to download latest translations to your machine

Happy to hear everything works fine now 😃

Should any other questions arise, you know that you’re welcome to contact us

@erperejildo

Sorry for the inconvenience!

Already passing this to our content manager to adding an article about “base_path”: “.”

Let us try to raise a priority here, totally agree it’s not so obvious 😦

Yes, it’s running just great 😃 https://support.crowdin.com/github-integration/

Please contact us directly at support@crowdin.com if you need any assistance with set up (but it’s also based on crowdin.yml, so it will be easy to switch). Then you may forget about base_path and uploads via CLI, it will be automatic 😃

@Yserz You should also update your translation field, it should contain a placeholder for language. For example: "translation": "/i18n/%locale_with_underscore%/strings.po",