Skip to content

fix: disabled target languages warning#1008

Merged
andrii-bodnar merged 3 commits intomainfrom
fix/target-lang-warn
Mar 27, 2026
Merged

fix: disabled target languages warning#1008
andrii-bodnar merged 3 commits intomainfrom
fix/target-lang-warn

Conversation

@katerina20
Copy link
Copy Markdown
Collaborator

@katerina20 katerina20 commented Mar 17, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 42.30769% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.26%. Comparing base (9243204) to head (99fb2c3).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
...cli/commands/actions/UploadTranslationsAction.java 39.14% 14 Missing ⚠️
src/main/java/com/crowdin/cli/client/Client.java 66.67% 0 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/main/java/com/crowdin/cli/client/Client.java Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.executeAsyncActionWithoutSpinner to propagate ResponseException (so callers can handle WrongLanguageException explicitly).
  • Handled WrongLanguageException in UploadTranslationsAction to 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.

Comment thread src/main/resources/messages/messages.properties Outdated
Comment thread src/main/java/com/crowdin/cli/client/Client.java Outdated
@andrii-bodnar andrii-bodnar requested a review from yevheniyJ March 23, 2026 14:55
@andrii-bodnar andrii-bodnar merged commit d608b11 into main Mar 27, 2026
9 checks passed
@andrii-bodnar andrii-bodnar deleted the fix/target-lang-warn branch March 27, 2026 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants