org.apache.maven.plugins
diff --git a/qaf-core/src/main/java/com/qmetry/qaf/automation/util/FileUtil.java b/qaf-core/src/main/java/com/qmetry/qaf/automation/util/FileUtil.java
index 951b4344..ce412818 100644
--- a/qaf-core/src/main/java/com/qmetry/qaf/automation/util/FileUtil.java
+++ b/qaf-core/src/main/java/com/qmetry/qaf/automation/util/FileUtil.java
@@ -42,6 +42,7 @@
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.LocaleUtils;
public class FileUtil extends FileUtils {
private static int counter = -1; /* Protected by tmpFileLock */
@@ -302,4 +303,12 @@ public static String getRelativePath(File fileOrFolder, File baseFolder) {
return baseFolder.toURI().relativize(fileOrFolder.toURI()).getPath();
}
+ public static boolean isLocale(String name) {
+ String ext = getExtention(name);
+ try {
+ return StringUtil.isNotBlank(ext) && LocaleUtils.toLocale(ext).toString().equalsIgnoreCase(ext);
+ } catch (Exception e) {
+ return false;
+ }
+ }
}
diff --git a/qaf-tools/src/main/java/com/qmetry/qaf/automation/tools/MultiPropertiesEditorHelper.java b/qaf-tools/src/main/java/com/qmetry/qaf/automation/tools/MultiPropertiesEditorHelper.java
new file mode 100644
index 00000000..bfbfe342
--- /dev/null
+++ b/qaf-tools/src/main/java/com/qmetry/qaf/automation/tools/MultiPropertiesEditorHelper.java
@@ -0,0 +1,133 @@
+package com.qmetry.qaf.automation.tools;
+
+import static com.qmetry.qaf.automation.util.FileUtil.checkCreateDir;
+import static com.qmetry.qaf.automation.util.FileUtil.getExtention;
+import static com.qmetry.qaf.automation.util.FileUtil.isLocale;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.commons.configuration.PropertiesConfiguration;
+
+import com.google.common.io.Files;
+import com.qmetry.qaf.automation.util.StringUtil;
+
+public class MultiPropertiesEditorHelper {
+
+ /**
+ * Example return value:
+ *
+ *
+ * [
+ * {"key":"some.prop","en_US":"valForUS","fr_FR":"valInFR"},
+ * {"key":"another.prop","en_US":"val2ForUS","fr_FR":"val2InFR"},
+ * ...
+ * ]
+ *
+ *
+ * @param filePath
+ * @return
+ */
+
+ @SuppressWarnings("unchecked")
+ public static Collection