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 24, 2024
1 parent 915a151 commit f434c6b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,11 @@ 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 f434c6b

Please sign in to comment.