Skip to content
Open
Changes from 1 commit
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 @@ -538,11 +538,21 @@ public CommentCollection<Comment> getTranslationObjectCommentCollection(String s

@Override
public void addTranslationObjectComment(String strTranslationJobID, TranslationObject translationObject,
Comment comment) throws TranslationException {
log.trace("BootstrapTranslationServiceImpl.addTranslationObjectComment");

throw new TranslationException("This function is not implemented",
TranslationException.ErrorCode.SERVICE_NOT_IMPLEMENTED);
Comment comment) throws TranslationException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the margin change intentional?

log.trace("BootstrapTranslationServiceImpl.addTranslationObjectComment");
String annotation = comment.getAnnotationData();
String author = comment.getAuthorName();
String fileName = String.format("%s_%s.txt");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The specifiers are missing. Did you mean to pass annotation and author?

String objectPath = String.format("%s.%s", getObjectPath(translationObject), exportFormat);
String message = comment.getMessage();
String body = String.format("%s\n\n%s", objectPath, message);
InputStream inputStream = new ByteArrayInputStream(body.getBytes());
String labels = String.format("%s,comment", strTranslationJobID);
try {
liltApiClient.uploadFile(fileName, labels, inputStream);
} catch (Exception e) {
log.warn("error during addTranslationObjectComment {}", e);
}
}

@Override
Expand Down