fix: disabled target languages warning#1008
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1008 +/- ##
============================================
+ Coverage 65.26% 65.26% +0.01%
- Complexity 1679 1774 +95
============================================
Files 244 255 +11
Lines 6887 7340 +453
Branches 1047 1109 +62
============================================
+ Hits 4494 4790 +296
- Misses 1795 1905 +110
- Partials 598 645 +47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adjusts translation upload behavior so that when a translation file can’t be imported because its target language isn’t enabled for the source file in Crowdin, the CLI prints a warning instead of failing with an error.
Changes:
- Added a new user-facing warning message for “translation not uploaded because target language isn’t enabled”.
- Updated
Client.executeAsyncActionWithoutSpinnerto propagateResponseException(so callers can handleWrongLanguageExceptionexplicitly). - Handled
WrongLanguageExceptioninUploadTranslationsActionto print a warning and skip the failing import.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/main/resources/messages/messages.properties |
Adds a new localized warning message used when import is blocked by disabled target languages. |
src/main/java/com/crowdin/cli/commands/actions/UploadTranslationsAction.java |
Catches WrongLanguageException during translation import and prints a warning instead of failing. |
src/main/java/com/crowdin/cli/client/Client.java |
Updates async execution helper to rethrow ResponseException and stop the spinner with WARNING status for those cases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
crowdin/github-action#303