public class TranslationFileSet extends AbstractFileSet
Mojo configuration class describing a set of translation files.| Modifier and Type | Field and Description |
|---|---|
protected String |
baseFileName
The base language file that should be uploaded to Crowdin.
|
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
The
escape_quotes API parameter to use. |
protected List<String> |
excludes
Paths to exclude using a basic filter where
? |
protected String |
fileNameWhenExported
The value to use in the
"Resulting file name when exported"
setting at Crowdin. |
protected List<String> |
includes
Paths to include using a basic filter where
? |
protected File |
languageFilesFolder
The folder where the language files are located.
|
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.
|
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() |
List<String> |
getExcludes() |
String |
getFileNameWhenExported() |
List<String> |
getIncludes() |
File |
getLanguageFilesFolder() |
String |
getTargetFileName() |
String |
getTitle() |
UpdateOption |
getUpdateOption() |
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 fileNameWhenExported
"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,
fileNameWhenExported 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)fileNameWhenExported to be
supported.@Nullable protected Integer escapeQuotes
escape_quotes API parameter to use. Valid values are:
{0})protected UpdateOption updateOption
@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.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 getFileNameWhenExported()
@Nullable public String getTargetFileName()
languageFilesFolder to use
when deploying translation files. If left blank,
fileNameWhenExported will be used.public UpdateOption getUpdateOption()
UpdateOption.@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.protected void initializeInstance()
throws org.apache.maven.plugin.MojoExecutionException
AbstractFileSetinitializeInstance in class AbstractFileSetorg.apache.maven.plugin.MojoExecutionException - If the initialization fails.Copyright © 2018. All rights reserved.