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)
I got the
base_path is emptywhen 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 emptymeans 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.jsonI think this one is more preferred one:
/src/locales/fr.jsonIn this case, please modify the configuration:
or (to get fr-FR.json):
After you do the change for
translationfield, please runcrowdin pushto apply these changes to Crowdin. Then you can try to build the project via web interface (Build & Download) and finally runcrowdin pullto download latest translations to your machineHappy 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 aboutbase_pathand uploads via CLI, it will be automatic 😃@Yserz You should also update your
translationfield, it should contain a placeholder for language. For example:"translation": "/i18n/%locale_with_underscore%/strings.po",