public class FileMappingRuleHandler extends Object
Constructor and Description |
---|
FileMappingRuleHandler(FileMappingRule rule,
ProjectType projectType,
ConfigurableProjectOptions opts) |
Modifier and Type | Method and Description |
---|---|
String |
getRelativeTransFilePathForSourceDoc(DocNameWithExt docNameWithExt,
LocaleMapping localeMapping,
com.google.common.base.Optional<String> translationFileExtension)
Apply the rule and return relative path of the translation file.
|
boolean |
isApplicable(DocNameWithExt docNameWithExt)
Check whether the parsed rule is applicable to a source document.
|
static boolean |
isRuleValid(String rule) |
protected static EnumMap<org.zanata.client.commands.FileMappingRuleHandler.Placeholders,String> |
parseToMap(String sourceFile,
LocaleMapping localeMapping,
com.google.common.base.Optional<String> translationFileExtension) |
public FileMappingRuleHandler(FileMappingRule rule, ProjectType projectType, ConfigurableProjectOptions opts)
public static boolean isRuleValid(String rule)
public boolean isApplicable(DocNameWithExt docNameWithExt)
docNameWithExt
- source document name with extensionpublic String getRelativeTransFilePathForSourceDoc(DocNameWithExt docNameWithExt, @Nonnull LocaleMapping localeMapping, com.google.common.base.Optional<String> translationFileExtension)
docNameWithExt
- source document name with extensionlocaleMapping
- locale mappingCopyright © 2017 Zanata Project. All rights reserved.