Skip to content

Commit

Permalink
feat: pre-translate whole project (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ authored Sep 23, 2024
1 parent 3f2b6db commit fd5dea8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ public void act(Outputter out, PropertiesWithFiles properties, ProjectClient cli
return;
}

if ((files == null || files.isEmpty()) && StringUtils.isEmpty(directory)) {
throw new ExitCodeExceptionMapper.ValidationException(RESOURCE_BUNDLE.getString("error.file_or_directory_required"));
}

Optional<Branch> branch = Optional.ofNullable(branchName).flatMap(project::findBranchByName);

if (!branch.isPresent() && branchName != null) {
Expand Down Expand Up @@ -107,6 +103,8 @@ public void act(Outputter out, PropertiesWithFiles properties, ProjectClient cli
fileIds.add(entry.getValue().getId());
}
}
} else {
fileIds = paths.values().stream().map(FileInfo::getId).toList();
}

if (fileIds.isEmpty()) {
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/messages/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,6 @@ error.while_checking_base_path=Failed to check the base path. Try to run the app
error.skip_untranslated_both_strings_and_files=You cannot skip strings and files at the same time. Please use one of these parameters instead.
error.file_not_exists=Project doesn't contain the '%s' file
error.file_required=The '--file' parameter is required for this type of project
error.file_or_directory_required=The '--file' or '--directory' parameter is required for this type of project
error.dir_not_exists=Project doesn't contain the '%s' directory
error.branch_not_exists=Project doesn't contain the '%s' branch
error.source_string_no_edit=Specify some parameters to edit the string
Expand Down

0 comments on commit fd5dea8

Please sign in to comment.