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

Improve upload translations output #618

Closed
pastey opened this issue Aug 3, 2023 · 2 comments · Fixed by #639
Closed

Improve upload translations output #618

pastey opened this issue Aug 3, 2023 · 2 comments · Fixed by #639

Comments

@pastey
Copy link

pastey commented Aug 3, 2023

Is your feature request related to a problem? Please describe.
We are using upload translations. In case of issues the output of the command doesn't tell which file has caused the issues. For example:

+ crowdin upload translations -b release~xxxxx-7.17.1 --import-eq-suggestions --plain
Resources/uk.lproj/Localizable.strings
Resources/ru.lproj/Localizable.strings
Resources/de.lproj/Localizable.strings
❌ Failed to upload the translation file to the storage. Please contact our support team for help
❌ Error from server: <Code: <empty_code>, Message: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
"; line: 1, column: 2]>
❌ Failed to upload the translation file to the storage. Please contact our support team for help
❌ Error from server: <Code: <empty_code>, Message: Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
"; line: 1, column: 2]>
Resources/es.lproj/Localizable.strings
Resources/ja.lproj/Localizable.strings
Resources/pt.lproj/Localizable.strings
Resources/vi.lproj/Localizable.strings
Resources/fr.lproj/Localizable.strings
❌ Current execution finished with errors

There's no way one can tell that Italian and Chinese localizations failed to upload.

Describe the solution you'd like
I would suggest that the error message should contain the name of the file that experienced issues. Like this:

❌ Failed to upload the translation file 'Resources/it.lproj/Localizable.strings' to the storage. Please contact our support team for help

Describe alternatives you've considered
Print "Uploading file Resources/it.lproj/Localizable.strings..." when upload process begins. Add ✅ to the line, once upload is done successfully. Or ❌ and an error description, if upload fails.

Additional context
Well, would be super cool if upload could be united with upload of sources and the whole process be atomic, so that we won't have to "rollback" unsuccessful branch initialisation process ourselves.

@andrii-bodnar
Copy link
Member

@pastey thanks for the request!

@andrii-bodnar
Copy link
Member

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