public class TranslationFileSet extends AbstractFileSet
Mojo configuration class describing a set of translation files.| Modifier and Type | Field and Description |
|---|---|
protected String |
baseFileName
Required.
|
protected String |
commentTag
The comment character or character combination to use for comment lines
when exporting files from Crowdin if
addComment is true. |
protected String |
crowdinPath
The path from the Crowdin (branch) root folder to the files of this
TranslationFileSet. |
protected Integer |
escapeQuotes
Applies to
FileType.properties files only. |
protected Integer |
escapeSpecialCharacters
Applies to
FileType.properties files only. |
protected List<String> |
excludes
Paths to exclude using a basic filter where
? |
protected String |
exportPattern
The value to use in the
"Resulting file name when exported"
setting at Crowdin. |
protected FileExportOptions.JavaScriptExportQuotes |
exportQuotes
Applies to
FileType.js files only. |
protected List<String> |
includes
Paths to include using a basic filter where
? |
protected File |
languageFilesFolder
Required.
|
protected Boolean |
replaceModifiedContext
Whether or not to overwrite context when updating the source file, even
if the context has been modified on Crowdin.
|
protected String |
targetFileName
The file path relative to
languageFilesFolder to use when
deploying the translation files. |
protected String |
title
The title as it should appear to translators at Crowdin.
|
protected UpdateOption |
updateOption
The update behavior for updates string when pushing.
|
protected Boolean |
writeBOM
Whether or not to write a BOM (Byte Order Mark) at the beginning of the
file when deploying translations files.
|
addComment, charset, comment, conversions, encoding, escapeUnicode, lineSeparator, sortLines, type| Constructor and Description |
|---|
TranslationFileSet() |
| Modifier and Type | Method and Description |
|---|---|
String |
getBaseFileName() |
String |
getCommentTag() |
String |
getCrowdinPath() |
Integer |
getEscapeQuotes() |
Integer |
getEscapeSpecialCharacters() |
List<String> |
getExcludes() |
String |
getExportPattern() |
FileExportOptions.JavaScriptExportQuotes |
getExportQuotes() |
List<String> |
getIncludes() |
File |
getLanguageFilesFolder() |
Boolean |
getReplaceModifiedContext() |
String |
getTargetFileName() |
String |
getTitle() |
UpdateOption |
getUpdateOption() |
Boolean |
getWriteBOM() |
protected void |
initializeInstance()
Since the constructor is called automagically by Maven, verification and
initialization of defaults is done here.
|
void |
setCommentTag(String commentTag)
Sets the comment tag.
|
String |
toString() |
getAddComment, getCharset, getComment, getConversions, getEncoding, getEscapeUnicode, getLineSeparator, getSortLines, getType, initialize, setCharset, setEncoding, setTypeprotected File languageFilesFolder
protected String crowdinPath
TranslationFileSet. Only specify it the files are located in a
subfolder at Crowdin.protected String baseFileName
protected String title
protected String commentTag
addComment is true.protected String exportPattern
"Resulting file name when exported"
setting at Crowdin.
The following variables are available:
ISO 639-1
(i.e. uk)ISO 639-2/T
(i.e. ukr)@Nullable protected String targetFileName
languageFilesFolder to use when
deploying the translation files. If left blank,
exportPattern will be used.
The following variables are available:
ISO 639
language code (i.e en or ceb)ISO 639-1
(i.e. uk)ISO 639-2/T
(i.e. ukr)exportPattern to be
supported.@Nullable protected Integer escapeQuotes
FileType.properties files only.
The escapeQuotes API parameter to use.
Valid values are:
{0})@Nullable protected Integer escapeSpecialCharacters
FileType.properties files only.
The escapeSpecialCharacters API parameter to use. It defines
whether any special characters (=, :, ! and
#) should be escaped by backslash in the exported translations.
Valid values are:
@Nullable protected FileExportOptions.JavaScriptExportQuotes exportQuotes
FileType.js files only.
The exportQuotes API parameter to use. It defines what type of
quotes to use when exporting JavaScript translations.
Valid values are:
protected UpdateOption updateOption
protected Boolean replaceModifiedContext
@Nullable protected List<String> includes
? and * are
wildcards and the rest are literals. If one or more includes are
configured the file set becomes a white-list where anything not included
is excluded.@Nullable protected List<String> excludes
? and * are
wildcards and the rest are literals.@Nullable protected Boolean writeBOM
true.public String getCommentTag()
public void setCommentTag(String commentTag)
commentTag - the comment tag to set.public File getLanguageFilesFolder()
public String getCrowdinPath()
TranslationFileSet or null it the files are
in the root of the Crowdin (branch) file structure.public String getBaseFileName()
public String getTitle()
@Nonnull public String getExportPattern()
@Nullable public String getTargetFileName()
languageFilesFolder to use
when deploying translation files. If left blank,
exportPattern will be used.@Nullable public Integer getEscapeQuotes()
escapeQuotes value.@Nullable public FileExportOptions.JavaScriptExportQuotes getExportQuotes()
exportQuotes value.@Nullable public Integer getEscapeSpecialCharacters()
escapeSpecialCharacters value.public UpdateOption getUpdateOption()
UpdateOption.@Nullable public Boolean getReplaceModifiedContext()
replaceModifiedContext value.@Nullable public List<String> getIncludes()
List of string patterns for paths to include. The
patterns use a basic filter where ? and * are
wildcards and the rest are literals. If one or more inclusions
are configured the file set becomes a white-list where anything
not included is excluded.@Nullable public List<String> getExcludes()
List of string patterns for paths to exclude. The
patterns use a basic filter where ? and * are
wildcards and the rest are literals.@Nullable public Boolean getWriteBOM()
true if a Unicode BOM should be written to the start of
the deployed file, false otherwise. null if not
specified.protected void initializeInstance()
throws org.apache.maven.plugin.MojoExecutionException
AbstractFileSetinitializeInstance in class AbstractFileSetorg.apache.maven.plugin.MojoExecutionException - If the initialization fails.Copyright © 2024. All rights reserved.