diff --git a/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/plain/FrenchIncLocalizationMatcher.java b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/plain/FrenchIncLocalizationMatcher.java new file mode 100644 index 00000000..788fce99 --- /dev/null +++ b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/plain/FrenchIncLocalizationMatcher.java @@ -0,0 +1,20 @@ +package com.mercury.platform.core.utils.interceptor.plain; + +import org.apache.commons.lang3.StringUtils; + +public class FrenchIncLocalizationMatcher extends LocalizationMatcher { + @Override + public boolean isSuitableFor(String message) { + return message.contains("@De"); + } + + @Override + public boolean isIncoming() { + return true; + } + + @Override + public String trimString(String message) { + return StringUtils.substringAfter(message, "@De "); + } +} diff --git a/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/plain/FrenchOutLocalizationMatcher.java b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/plain/FrenchOutLocalizationMatcher.java new file mode 100644 index 00000000..b2adfedd --- /dev/null +++ b/app-core/src/main/java/com/mercury/platform/core/utils/interceptor/plain/FrenchOutLocalizationMatcher.java @@ -0,0 +1,20 @@ +package com.mercury.platform.core.utils.interceptor.plain; + +import org.apache.commons.lang3.StringUtils; + +public class FrenchOutLocalizationMatcher extends LocalizationMatcher { + @Override + public boolean isSuitableFor(String message) { + return message.contains("@À"); + } + + @Override + public boolean isIncoming() { + return false; + } + + @Override + public String trimString(String message) { + return StringUtils.substringAfter(message, "@À "); + } +}