From 4fe80c3e7efddc569e1b4f838f466b1c9ed234c2 Mon Sep 17 00:00:00 2001 From: Jean Aurambault Date: Sat, 22 Jun 2024 15:03:14 -0700 Subject: [PATCH] Make sure to not import the source comment when import translations from 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 --- .../l10n/mojito/service/thirdparty/ThirdPartyTMSPhrase.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSPhrase.java b/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSPhrase.java index a0993ca715..6671722a32 100644 --- a/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSPhrase.java +++ b/webapp/src/main/java/com/box/l10n/mojito/service/thirdparty/ThirdPartyTMSPhrase.java @@ -301,6 +301,10 @@ public PollableFuture pull( List 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); }