diff --git a/src/main/java/com/crowdin/cli/commands/actions/UploadTranslationsAction.java b/src/main/java/com/crowdin/cli/commands/actions/UploadTranslationsAction.java index 5554bcced..2a40031ab 100644 --- a/src/main/java/com/crowdin/cli/commands/actions/UploadTranslationsAction.java +++ b/src/main/java/com/crowdin/cli/commands/actions/UploadTranslationsAction.java @@ -176,7 +176,10 @@ public void act(Outputter out, PropertiesWithFiles pb, ProjectClient client) { request.setStorageId(storageId); } catch (Exception e) { containsErrors.set(true); - throw new RuntimeException(RESOURCE_BUNDLE.getString("error.upload_translation_to_storage"), e); + throw new RuntimeException(String.format( + RESOURCE_BUNDLE.getString("error.upload_translation_to_storage"), + StringUtils.removeStart(translationFile.getAbsolutePath(), pb.getBasePath()) + ), e); } try { for (Language lang : langs) { @@ -190,7 +193,10 @@ public void act(Outputter out, PropertiesWithFiles pb, ProjectClient client) { } } catch (Exception e) { containsErrors.set(true); - throw new RuntimeException(RESOURCE_BUNDLE.getString("error.upload_translation"), e); + throw new RuntimeException(String.format( + RESOURCE_BUNDLE.getString("error.upload_translation"), + StringUtils.removeStart(translationFile.getAbsolutePath(), pb.getBasePath()) + ), e); } if (!plainView) { out.println(OK.withIcon(String.format( diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index ae4785463..0c8de930e 100755 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -401,8 +401,8 @@ error.read_resource_file=Couldn't read from the file '%s'. Try to run the applic error.not_found_branch=The branch with the specified name doesn't exist in the project. Try specifying another branch name error.source_not_exists_in_project=Failed to upload translations for the source '%s' since file '%s' is missing in the project. Run the 'crowdin push' to upload the missing source error.translation_not_exists='%s' translation file doesn't exist in the specified place -error.upload_translation_to_storage=Failed to upload the translation file to the storage. Please contact our support team for help -error.upload_translation=Failed to upload the translation file. Please contact our support team for help +error.upload_translation_to_storage=Failed to upload the translation file '%s' to the storage. Please contact our support team for help +error.upload_translation=Failed to upload the translation file '%s'. Please contact our support team for help error.configuration_file_is_invalid=Configuration file is invalid. Check the following parameters in your configuration file: error.configuration_is_invalid=Configuration is invalid. Check the following parameters: error.params_are_invalid=Some command options are invalid. Check the following parameters: