i18n:generateI18nEnumHelper
Nom complet :
org.nuiton.i18n:i18n-maven-plugin:4.1:generateI18nEnumHelper
Description :
Generate a i18n enum class helper. Created on 28/08/16.
Attributs :
- Exige un projet Maven pour être exécuté.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Depuis la version :
3.6. - S'associe par défaut dans la phase du cycle de vie :
generate-sources.
Paramètres requis
| Nom | Type | Depuis | Description |
|---|---|---|---|
<bundles> |
String |
3.6 |
Locales to treate, separated by comma. Example :
fr_FR,en_GB Valeur par défaut : fr_FR,en_GB.Propriété utilisateur : i18n.bundles. |
<className> |
String |
3.6 |
Name of the generated class. Valeur par défaut : I18nEnumHelper.Propriété utilisateur : i18n.className. |
<encoding> |
String |
3.6 |
Encoding used to load and store properties. Valeur par défaut : ${project.build.sourceEncoding}.Propriété utilisateur : i18n.encoding. |
<enumerationSets> |
List |
3.6 |
List of enumerations set to scan to generate i18n keys.
<enumerationSets>
<enumerationSet>
<name>label</name>
<pattern>myPrefix.@CLASS_NAME@.@NAME@</pattern>
<enums>
<org.nuiton.Enum1>
<org.nuiton.Enum2>
<...>
</enums>
</enumerationSet>
</enumerationSets>
enum org.nuiton.Enum1 { A,B }, will
generate i18n keys:
public static String getLabel(Enum)
public static String getLabel(Locale, Enum)
|
<outputdirectory> |
File |
3.6 |
The root directory where to generated. Valeur par défaut : ${basedir}/target/generated-sources/java.Propriété utilisateur : i18n.outputdirectory. |
Paramètres optionnels
| Nom | Type | Depuis | Description |
|---|---|---|---|
<packageName> |
String |
3.6 |
To set the package fully qualified name of the generated class. By
default, will use groupId.artifactId (with - replaced
by .).Propriété utilisateur : i18n.packageName. |
<silent> |
boolean |
1.0.0-rc-5 |
Silent flag to see only errors in console. Valeur par défaut : false.Propriété utilisateur : i18n.silent. |
<verbose> |
boolean |
3.6 |
Verbose flag. Note : if not setted, we used the
maven.verbose property.Valeur par défaut : ${maven.verbose}.Propriété utilisateur : i18n.verbose. |
Détails des paramètres
<bundles>
Locales to treate, separated by comma. Example :
fr_FR,en_GB
- Type :
java.lang.String - Depuis :
3.6 - Exigé :
Oui - Propriété utilisateur :
i18n.bundles - Défaut :
fr_FR,en_GB
<className>
Name of the generated class.
- Type :
java.lang.String - Depuis :
3.6 - Exigé :
Oui - Propriété utilisateur :
i18n.className - Défaut :
I18nEnumHelper
<encoding>
Encoding used to load and store properties.
- Type :
java.lang.String - Depuis :
3.6 - Exigé :
Oui - Propriété utilisateur :
i18n.encoding - Défaut :
${project.build.sourceEncoding}
<enumerationSets>
List of enumerations set to scan to generate i18n keys.
Example with enum
<enumerationSets>
<enumerationSet>
<name>label</name>
<pattern>myPrefix.@CLASS_NAME@.@NAME@</pattern>
<enums>
<org.nuiton.Enum1>
<org.nuiton.Enum2>
<...>
</enums>
</enumerationSet>
</enumerationSets>
enum org.nuiton.Enum1 { A,B }, will
generate i18n keys:
- myPrefix.org.nuiton.Enum1.A
- myPrefix.org.nuiton.Enum1.B
@CLASS_NAME@for enumeration class fully qualified name@CLASS_SIMPLE_NAME@for enumeration class simple name@NAME@for enumeration name@ORDINAL@for enumeration ordinal
public static String getLabel(Enum)
public static String getLabel(Locale, Enum)
- Type :
java.util.List - Depuis :
3.6 - Exigé :
Oui
<outputdirectory>
The root directory where to generated.
- Type :
java.io.File - Depuis :
3.6 - Exigé :
Oui - Propriété utilisateur :
i18n.outputdirectory - Défaut :
${basedir}/target/generated-sources/java
<packageName>
To set the package fully qualified name of the generated class. By
default, will use groupId.artifactId (with
- replaced
by .).- Type :
java.lang.String - Depuis :
3.6 - Exigé :
Non - Propriété utilisateur :
i18n.packageName
<silent>
Silent flag to see only errors in console.
- Type :
boolean - Depuis :
1.0.0-rc-5 - Exigé :
Non - Propriété utilisateur :
i18n.silent - Défaut :
false
<verbose>
Verbose flag. Note : if not setted, we used the
maven.verbose property.- Type :
boolean - Depuis :
3.6 - Exigé :
Non - Propriété utilisateur :
i18n.verbose - Défaut :
${maven.verbose}

