public interface PropertyScanner
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE
the unique id of the type of resources that this scanner is responsible for
|
| Modifier and Type | Method and Description |
|---|---|
File |
computeTranslationPath(File template,
Locale templateLocale,
Locale translationLocale)
computes the location of the translation file for the given template and locale
|
PropertyConverter |
createConverter(org.eclipse.emf.common.util.URI resource)
creates a new PropertyConverter for the given file
|
File |
findTemplate(File propertyFile,
ScanConfiguration config)
retrieves the translation template for the given translation (used for mono lingual resources)
|
Map<Locale,File> |
findTranslations(File template,
ScanConfiguration config)
finds all existing translation files for the given template
|
String[] |
getDefaultExcludes()
returns the default excludes for the file scan
|
String[] |
getDefaultIncludes()
returns the default includes for the file scan
|
String |
getEncoding()
determines which encoding should be used to write and write resources
|
Locale |
getLocale(File propertyFile)
extracts the locale from the given file
|
boolean |
isBilingual() |
boolean |
isTemplate(File propertyFile,
String masterLocale)
checks if the given file is a translation template
|
boolean |
isTranslation(File propertyFile,
ScanConfiguration config)
checks if the given file is a translation file
|
static final String TYPE
boolean isTemplate(File propertyFile, String masterLocale)
propertyFile - config - boolean isTranslation(File propertyFile, ScanConfiguration config)
propertyFile - config - File findTemplate(File propertyFile, ScanConfiguration config)
propertyFile - config - null if not availableMap<Locale,File> findTranslations(File template, ScanConfiguration config)
template - config - File computeTranslationPath(File template, Locale templateLocale, Locale translationLocale)
template - templateLocale - translationLocale - Locale getLocale(File propertyFile)
propertyFile - boolean isBilingual()
true if this scanner is responsible for bi-lingual files (like XLFIFF) and false if is responsible for mono-lingual
files like java propertiesPropertyConverter createConverter(org.eclipse.emf.common.util.URI resource)
file - String[] getDefaultIncludes()
String[] getDefaultExcludes()
String getEncoding()
Copyright © 2013–2014 Jabylon. All rights reserved.