Skip to content

Commit

Permalink
Make sure to not import the source comment when import translations f…
Browse files Browse the repository at this point in the history
…rom Phrase TMS

That happened because the localized files contain the original string description from the Android source file, and those were getting re-imported with the translation
  • Loading branch information
aurambaj committed Jun 22, 2024
1 parent c539331 commit 4fe80c3
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,10 @@ public PollableFuture<Void> pull(
List<TextUnitDTO> textUnitDTOS =
mapper.mapToTextUnits(AndroidStringDocumentReader.fromText(fileContent));

// make sure that the source comment does not get replicated to all translations. Eventually we may want to
// communicate some comments, but anyway it should not be the source comment
textUnitDTOS.forEach(t -> t.setComment(null));

textUnitBatchImporterService.importTextUnits(textUnitDTOS, false, true);
}

Expand Down

0 comments on commit 4fe80c3

Please sign in to comment.