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

feat: deprecate skip-untranslated-strings for task add command #860

Merged
merged 2 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -84,7 +87,10 @@ protected NewAction<ProjectProperties, ClientTask> getAction(Actions actions) {

@Override
protected List<String> 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);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/messages/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading