Skip to content

Commit

Permalink
Merge pull request #244 from Jimmy-Dinis/frenchLocalizationMatcher
Browse files Browse the repository at this point in the history
adding french localization matcher
  • Loading branch information
Exslims authored Jan 22, 2018
2 parents 0ea80af + 93b920c commit 3ff01c0
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 ");
}
}
Original file line number Diff line number Diff line change
@@ -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, "@À ");
}
}

0 comments on commit 3ff01c0

Please sign in to comment.