-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from pagox/master
added german localization matcher
- Loading branch information
Showing
5 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
.../java/com/mercury/platform/core/utils/interceptor/plain/GermanIncLocalizationMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 GermanIncLocalizationMatcher extends LocalizationMatcher { | ||
@Override | ||
public boolean isSuitableFor(String message) { | ||
return message.contains("@Von"); | ||
} | ||
|
||
@Override | ||
public boolean isIncoming() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public String trimString(String message) { | ||
return StringUtils.substringAfter(message, "@Von "); | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
.../java/com/mercury/platform/core/utils/interceptor/plain/GermanOutLocalizationMatcher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 GermanOutLocalizationMatcher extends LocalizationMatcher { | ||
@Override | ||
public boolean isSuitableFor(String message) { | ||
return message.contains("@An"); | ||
} | ||
|
||
@Override | ||
public boolean isIncoming() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public String trimString(String message) { | ||
return StringUtils.substringAfter(message, "@An "); | ||
} | ||
} |