Skip to content

Commit

Permalink
Added unit tests for third party ai translation push
Browse files Browse the repository at this point in the history
  • Loading branch information
maallen committed Oct 21, 2024
1 parent 1cd24c2 commit 2a80b49
Show file tree
Hide file tree
Showing 3 changed files with 348 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ private SmartlingFile uploadAiTranslationFile(
logger.debug("Process translation batch for file: {}", fileName);
List<TextUnitDTO> fileBatch = batch;
SmartlingFile file = new SmartlingFile();
file.setFileName(fileName);
file.setFileName(fileName + "_" + localeTag);

try {
logger.debug("Save target file to: {}", file.getFileName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public class StubSmartlingResultProcessor extends SmartlingResultProcessor {

List<SmartlingFile> pushFiles = new ArrayList<>();
List<SmartlingFile> pushTranslationFiles = new ArrayList<>();
List<SmartlingFile> pushAITranslationFiles = new ArrayList<>();
SmartlingOptions options;

public StubSmartlingResultProcessor() {}
Expand All @@ -27,4 +28,11 @@ public String processPushTranslations(List<SmartlingFile> files, SmartlingOption
this.options = options;
return "";
}

@Override
public String processPushAiTranslations(List<SmartlingFile> files, SmartlingOptions options) {
this.pushAITranslationFiles = files;
this.options = options;
return "";
}
}
Loading

0 comments on commit 2a80b49

Please sign in to comment.