Skip to content

Commit

Permalink
Documentation and renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
maallen committed Oct 25, 2024
1 parent 0ff342e commit f7dbb90
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ public enum Status {
*/
REVIEW_NEEDED,

/** Indicates that the text unit has been machine translated in Mojito automatically. */
MT_TRANSLATED,

/**
* Indicates that the text unit has been machine translated in Mojito automatically and has been
* sent for third party review.
*/
MT_REVIEW_NEEDED,
/** A string that doesn't need any work to be performed on it. */
APPROVED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ NativeCriteria getCriteriaForSearch(TextUnitSearcherParameters searchParameters)
"tm_text_unit_pending_mt", "tmtupmt", "tmtupmt.tm_text_unit_id", "tu.id"));
}

if (searchParameters.isRetrieveUploadedFileUri()) {
if (searchParameters.shouldRetrieveUploadedFileUri()) {
// Retrieve the uploadedFileUri from the ThirdPartyTextUnit table (used when pushing AI
// translations to third party)
c.addJoin(
Expand Down Expand Up @@ -261,7 +261,7 @@ NativeCriteria getCriteriaForSearch(TextUnitSearcherParameters searchParameters)
.addProjection("tu.created_date", "tmTextUnitCreatedDate")
.addProjection("atu.do_not_translate", "doNotTranslate");

if (searchParameters.isRetrieveUploadedFileUri()) {
if (searchParameters.shouldRetrieveUploadedFileUri()) {
projection.addProjection("tptu.uploaded_file_uri", "uploadedFileUri");
}
c.setProjection(projection);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class TextUnitSearcherParameters {
String skipAssetPathWithPattern;
boolean isExcludeUnexpiredPendingMT = false;
Duration aiTranslationExpiryDuration;
boolean isRetrieveUploadedFileUri = false;
boolean shouldRetrieveUploadedFileUri = false;

public String getName() {
return name;
Expand Down Expand Up @@ -348,11 +348,11 @@ public void setAiTranslationExpiryDuration(Duration aiTranslationExpiryDuration)
this.aiTranslationExpiryDuration = aiTranslationExpiryDuration;
}

public boolean isRetrieveUploadedFileUri() {
return isRetrieveUploadedFileUri;
public boolean shouldRetrieveUploadedFileUri() {
return shouldRetrieveUploadedFileUri;
}

public void setIsRetrieveUploadedFileUri(boolean retrieveUploadedFileUri) {
this.isRetrieveUploadedFileUri = retrieveUploadedFileUri;
this.shouldRetrieveUploadedFileUri = retrieveUploadedFileUri;
}
}

0 comments on commit f7dbb90

Please sign in to comment.