From f434c6b088369f04f7bddcf99501c516fdc2c3a7 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 | 5 +++++ 1 file changed, 5 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..208ee0a6af 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,11 @@ 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); }