Package org.exoplatform.crowdin.utils
Class XMLResourceBundleUtils
java.lang.Object
org.exoplatform.crowdin.utils.XMLResourceBundleUtils
Created by The eXo Platform SAS 30 Sep 2013 Reuse from
org.exoplatform.services.resources.XMLResourceBundleParser with modifications
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.maven.plugin.logging.LoggetLog()static StringinjectTranslation(InputStream crowdinFile, String resourceTranslationFilePath, String resourceMasterFilePath) Inject translation from crowdin to code base resource translationstatic StringinjectTranslation(Reader crowdinFile, String resourceTranslationFilePath, String resourceMasterFilePath) Inject translation from crowdin to code base resource translationstatic StringinjectTranslation(InputSource crowdinFile, String resourceTranslationFilePath, String resourceMasterFilePath) Inject translation from crowdin to code base resource translationRead data from XML InputStreamreadXMLToMap(Reader in) Read data from XML Readerstatic StringsaveMapToXMLFile(String xmlTranslationResouceFilePath, String xmlMasterResourceFilePath, Map<String, List<String>> crowdinMapData) Inject translation from a Map (crowdinMapData) to xmlFile (xmlTranslationResouceFilePath)static voidsetLog(org.apache.maven.plugin.logging.Log varLog)
-
Constructor Details
-
XMLResourceBundleUtils
public XMLResourceBundleUtils()
-
-
Method Details
-
setLog
public static void setLog(org.apache.maven.plugin.logging.Log varLog) -
getLog
public static org.apache.maven.plugin.logging.Log getLog() -
readXMLToMap
Read data from XML InputStream- Parameters:
in-- Returns:
- a
Map<String, List<String>>that contains all xpath:node-data of XML InputStream
-
readXMLToMap
Read data from XML Reader- Parameters:
in-- Returns:
- a
Map<String, List<String>>that contains all xpath:node-data of XML InputStream
-
readXMLToMap
-
saveMapToXMLFile
public static String saveMapToXMLFile(String xmlTranslationResouceFilePath, String xmlMasterResourceFilePath, Map<String, List<String>> crowdinMapData) Inject translation from a Map (crowdinMapData) to xmlFile (xmlTranslationResouceFilePath)- Parameters:
xmlTranslationResouceFilePath-xmlMasterResourceFilePath-crowdinMapData-- Returns:
-
injectTranslation
public static String injectTranslation(InputSource crowdinFile, String resourceTranslationFilePath, String resourceMasterFilePath) Inject translation from crowdin to code base resource translation- Parameters:
crowdinFile-resourceTranslationFilePath-resourceMasterFilePath-- Returns:
-
injectTranslation
public static String injectTranslation(InputStream crowdinFile, String resourceTranslationFilePath, String resourceMasterFilePath) Inject translation from crowdin to code base resource translation- Parameters:
crowdinFile-resourceTranslationFilePath-resourceMasterFilePath-- Returns:
-
injectTranslation
public static String injectTranslation(Reader crowdinFile, String resourceTranslationFilePath, String resourceMasterFilePath) Inject translation from crowdin to code base resource translation- Parameters:
crowdinFile-resourceTranslationFilePath-resourceMasterFilePath-- Returns:
-