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

285: Error message when error on Pre-translate #461

Merged
merged 9 commits into from
Jul 26, 2022
Original file line number Diff line number Diff line change
@@ -71,6 +71,11 @@ public void act(Outputter out, PropertiesWithFiles properties, ProjectClient cli

List<String> languages = this.prepareLanguageIds(project);
List<Long> fileIds = this.prepareFileIds(out, properties, project);

if (fileIds == null || fileIds.isEmpty()) {
throw new RuntimeException(String.format(RESOURCE_BUNDLE.getString("error.no_files_found_for_pre_translate")));
}

ApplyPreTranslationRequest request = RequestBuilder.applyPreTranslation(
languages, fileIds, method, engineId, autoApproveOption,
duplicateTranslations, translateUntranslatedOnly, translateWithPerfectMatchOnly);
1 change: 1 addition & 0 deletions src/main/resources/messages/messages.properties
Original file line number Diff line number Diff line change
@@ -305,6 +305,7 @@ error.crowdin_not_support_file_format='%s' file format is not supported for targ
error.file_already_exists=Project already contains the file '%s'
error.uploading_file=File '%s'
error.duplicate_environment_variable=There might be a duplicate environment variable(possibly not related to Crowdin CLI) in your PATH or .env file
error.no_files_found_for_pre_translate=Couldn't find any files to Pre-Translate in the current project

error.glossary.build_glossary=Failed to build the glossary
error.glossary.not_found_by_id=Couldn't find glossary by the specified ID