org.nuiton.i18n.plugin.bundle
Class StringFormatToMessageFormatConverter
java.lang.Object
org.nuiton.i18n.plugin.bundle.StringFormatToMessageFormatConverter
- All Implemented Interfaces:
- BundleFormatConverter
public class StringFormatToMessageFormatConverter
- extends Object
- implements BundleFormatConverter
Implementation of BundleFormatConverter to convert Formatter
syntax to a MessageFormat syntax.
Created: 05/05/11
- Since:
- 2.4
- Author:
- fdesbois , tchemit
- Plexus component:
- role:
- "org.nuiton.i18n.plugin.bundle.BundleFormatConverter"
- role-hint:
- "toMessageFormat"
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PATTERN
protected static Pattern PATTERN
StringFormatToMessageFormatConverter
public StringFormatToMessageFormatConverter()
convert
public String convert(String value)
- Description copied from interface:
BundleFormatConverter
- Convert format syntax to an other from
value.
- Specified by:
convert in interface BundleFormatConverter
- Parameters:
value - message with some format placeholders to convert
- Returns:
- the message with other format syntax
escapeQuoteChar
protected String escapeQuoteChar(String value)
- Escape ' char with '', needed by
MessageFormat.
- Parameters:
value - Message that contains '
- Returns:
- the message with ' escaped
Copyright © 2007-2011 CodeLutin. All Rights Reserved.