Package org.nuiton.i18n.plugin.bundle
Class StringFormatToMessageFormatConverter
java.lang.Object
org.nuiton.i18n.plugin.bundle.StringFormatToMessageFormatConverter
- All Implemented Interfaces:
BundleFormatConverter
@Component(role=BundleFormatConverter.class,
hint="toMessageFormat")
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:
- Florian Desbois, Tony Chemit - chemit@codelutin.com
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert format syntax to an other fromvalue.protected StringescapeQuoteChar(String value) Escape ' char with '', needed byMessageFormat.
-
Field Details
-
PATTERN
-
-
Constructor Details
-
StringFormatToMessageFormatConverter
public StringFormatToMessageFormatConverter()
-
-
Method Details
-
convert
Description copied from interface:BundleFormatConverterConvert format syntax to an other fromvalue.- Specified by:
convertin interfaceBundleFormatConverter- Parameters:
value- message with some format placeholders to convert- Returns:
- the message with other format syntax
-
escapeQuoteChar
Escape ' char with '', needed byMessageFormat.- Parameters:
value- Message that contains '- Returns:
- the message with ' escaped
-