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: pre-translate whole project #845

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -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
Loading