diff --git a/src/main/java/com/crowdin/cli/commands/picocli/TaskAddSubcommand.java b/src/main/java/com/crowdin/cli/commands/picocli/TaskAddSubcommand.java index b7c04ba2..6b047a16 100644 --- a/src/main/java/com/crowdin/cli/commands/picocli/TaskAddSubcommand.java +++ b/src/main/java/com/crowdin/cli/commands/picocli/TaskAddSubcommand.java @@ -13,6 +13,9 @@ import java.util.*; +import static com.crowdin.cli.utils.console.ExecutionStatus.WARNING; +import static java.lang.System.out; + @CommandLine.Command( name = CommandNames.ADD, sortOptions = false @@ -46,7 +49,7 @@ class TaskAddSubcommand extends ActCommandTask { @CommandLine.Option(names = {"--skip-assigned-strings"}, paramLabel = "...", negatable = true, descriptionKey = "crowdin.task.add.skip-assigned-strings", order = -2) protected boolean skipAssignedStrings; - @CommandLine.Option(names = {"--skip-untranslated-strings"}, paramLabel = "...", negatable = true, descriptionKey = "crowdin.task.add.skip-untranslated-strings", order = -2) + @CommandLine.Option(names = {"--skip-untranslated-strings"}, hidden = true, paramLabel = "...", negatable = true, descriptionKey = "crowdin.task.add.skip-untranslated-strings", order = -2) protected boolean skipUntranslatedStrings; @CommandLine.Option(names = {"--include-pre-translated-strings-only"}, paramLabel = "...", negatable = true, descriptionKey = "crowdin.task.add.include-pre-translated-strings-only", order = -2) @@ -84,7 +87,10 @@ protected NewAction getAction(Actions actions) { @Override protected List checkOptions() { - String url = this.getProperties(propertiesBuilders, new PicocliOutputter(System.out, isAnsi())).getBaseUrl(); + if (skipUntranslatedStrings) { + out.println(WARNING.withIcon(RESOURCE_BUNDLE.getString("message.skip-untranslated-strings_deprecated"))); + } + String url = this.getProperties(propertiesBuilders, new PicocliOutputter(out, isAnsi())).getBaseUrl(); boolean isEnterprise = PropertiesBeanUtils.isOrganization(url); return checkOptions(isEnterprise); } diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index 34162ad3..7f6bef7a 100755 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -692,6 +692,7 @@ message.already_uploaded=Skipping file '%s' because it is already uploading/uplo message.extracted_organization_name=Extracted organization name from provided url: %s message.file_deleted=@|green File '%s' deleted|@ message.no_file_string_project=File management is not available for string-based projects +message.skip-untranslated-strings_deprecated=The '--skip-untranslated-strings' option is deprecated and will be removed in the future message.download_sources.preserve_hierarchy_warning=Because the 'preserve_hierarchy' parameter is set to 'false':\n\t- CLI might download some unexpected files that match the pattern;\n\t- Source file hierarchy may not be preserved and will be the same as in Crowdin. message.download_translations.preserve_hierarchy_warning=Because the 'preserve_hierarchy' parameter is set to 'false' CLI might download some unexpected files that match the pattern