diff --git a/src/main/java/com/crowdin/cli/commands/Actions.java b/src/main/java/com/crowdin/cli/commands/Actions.java index 7c6eb204..b116a42c 100644 --- a/src/main/java/com/crowdin/cli/commands/Actions.java +++ b/src/main/java/com/crowdin/cli/commands/Actions.java @@ -60,7 +60,7 @@ NewAction stringEdit( boolean noProgress, Long id, String identifier, String newText, String newContext, Integer newMaxLength, List labelNames, Boolean isHidden); NewAction stringList( - boolean noProgress, boolean isVerbose, String file, String filter, String branchName, String croql); + boolean noProgress, boolean isVerbose, String file, String filter, String branchName, List labelNames, String croql); NewAction uploadSources( String branchName, boolean deleteObsolete, boolean noProgress, boolean autoUpdate, boolean debug, boolean plainView); diff --git a/src/main/java/com/crowdin/cli/commands/actions/CliActions.java b/src/main/java/com/crowdin/cli/commands/actions/CliActions.java index 6d1daa61..6a0b6c66 100644 --- a/src/main/java/com/crowdin/cli/commands/actions/CliActions.java +++ b/src/main/java/com/crowdin/cli/commands/actions/CliActions.java @@ -106,9 +106,9 @@ public NewAction stringEdit( @Override public NewAction stringList( - boolean noProgress, boolean isVerbose, String file, String filter, String branchName, String croql + boolean noProgress, boolean isVerbose, String file, String filter, String branchName, List labelNames, String croql ) { - return new StringListAction(noProgress, isVerbose, file, filter, branchName, croql); + return new StringListAction(noProgress, isVerbose, file, filter, branchName, labelNames, croql); } @Override diff --git a/src/main/java/com/crowdin/cli/commands/actions/StringListAction.java b/src/main/java/com/crowdin/cli/commands/actions/StringListAction.java index b78b66ba..3ab9bbf8 100644 --- a/src/main/java/com/crowdin/cli/commands/actions/StringListAction.java +++ b/src/main/java/com/crowdin/cli/commands/actions/StringListAction.java @@ -23,6 +23,7 @@ import static com.crowdin.cli.BaseCli.RESOURCE_BUNDLE; import static com.crowdin.cli.utils.console.ExecutionStatus.WARNING; +import static java.util.Objects.nonNull; class StringListAction implements NewAction { @@ -31,14 +32,16 @@ class StringListAction implements NewAction { private final String file; private final String filter; private final String branchName; + private final List labelNames; private final String croql; - public StringListAction(boolean noProgress, boolean isVerbose, String file, String filter, String branchName, String croql) { + public StringListAction(boolean noProgress, boolean isVerbose, String file, String filter, String branchName, List labelNames, String croql) { this.noProgress = noProgress; this.isVerbose = isVerbose; this.file = file; this.filter = filter; this.branchName = branchName; + this.labelNames = labelNames; this.croql = croql; } @@ -52,7 +55,8 @@ public void act(Outputter out, ProjectProperties pb, ProjectClient client) { .map(Branch::getId) .orElse(null); - Map labels = client.listLabels().stream() + List