Skip to content

Commit

Permalink
adding french localization matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimmy Dinis committed Jan 19, 2018
1 parent 0ea80af commit 93b920c
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 93b920c

Please sign in to comment.