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

Catch relative path errors with crowdin lint #291

Closed
infotexture opened this issue Jul 20, 2020 · 1 comment · Fixed by #296
Closed

Catch relative path errors with crowdin lint #291

infotexture opened this issue Jul 20, 2020 · 1 comment · Fixed by #296

Comments

@infotexture
Copy link

According to the Usage docs, the crowdin lint command is designed to check the configuration file for mistakes, but I've found one it misses.

I tried to add a relative path with ../ uplevel syntax to point the translation key to a folder one level up from the configuration file location:

  "translation" : "../some/other/folder/locales/%two_letters_code%/%original_file_name%",

Even with this syntax, the crowdin lint command says:

 Your configuration file looks good

— but when I try to upload source files with crowdin upload sources, the process fails with a cryptic error that doesn't mention the translation key at all:

$ crowdin upload sources
✔️  Fetching project info     
✔️  Directory 'src'
✔️  Directory 'src/locales'
✔️  Directory 'src/locales/en'
❌ File 'src/locales/en/strings.json'
❌ exportOptions: optionsValidationInvalid: Invalid options given : 
   [exportPattern][exportPattern - File name can't contain any of the following characters: \ / : * ? " < > |]

When I removed the ../ uplevel syntax from the translation key as instructed by your support team, the upload command completed successfully.

It would be nice if the crowdin lint command could be extended with a check to catch this error and provide a helpful error message to help users diagnose the problem.

@Yuliya-Crowdinteam
Copy link

Thank you for bringing this information to our attention!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants