import linguadde.TranslationAdder;
import linguadde.readerWriter.JsonReader;
import linguadde.replacer.JsonReplacer;

import java.io.File;

public class Main {
    public static void main(String[] args) {
        new TranslationAdder()
                .importTranslationData(new File("").getAbsolutePath() + "/data/translations.csv")
                .readData(new File("").getAbsolutePath() + "/data/leakage.json", new JsonReader())
                .translate(new JsonReplacer())
                .writeData(new File("").getAbsolutePath() + "/result/leakage.json")
                .printErrors();


        /*String jsonStr = JsonReader.read(new File("").getAbsolutePath() + "/data/leakage.json");
        jsonStr = JsonReplacer.replaceJson(langData, jsonStr);
        JsonReader.write(jsonStr, new File("").getAbsolutePath() + "/result/leakage.json");

        String xmlStr = XmlReader.read(new File("").getAbsolutePath() + "/data/fr.xliff");
        xmlStr = JsonReplacer.replaceXml(langData, xmlStr);
        XmlReader.write(xmlStr, new File("").getAbsolutePath() + "/result/fr.xliff");*/
    }
}

@@ -93,19 +93,99 @@
 e.re
-placer.Json
+aderWriter.XmlReader;%0Aimport linguadde.replacer.JsonReplacer;%0Aimport linguadde.replacer.Xml
 Repl
@@ -285,16 +285,52 @@
 %0A       
+ TranslationAdder translationAdder =
  new Tra
@@ -442,21 +442,44 @@
 ns.csv%22)
+;%0A
 %0A    
+    translationAdder%0A
         
@@ -482,16 +482,20 @@
         
+    
 .readDat
@@ -699,16 +699,18 @@
 e.json%22)
+;%0A
 %0A       
@@ -714,76 +714,50 @@
     
-        .printErrors();%0A%0A%0A        /*String jsonStr = JsonReader
+translationAdder%0A                
 .read
+Data
 (new
@@ -797,218 +797,108 @@
 ata/
-leakage.json%22);%0A        jsonStr = JsonReplacer.replaceJson(langData, jsonStr);%0A        JsonReader.write(jsonStr, new File(%22%22).getAbsolutePath() + %22/result/leakage.json%22);%0A%0A        String xmlStr = XmlReader.read
+fr.xliff%22, new XmlReader())%0A                .translate(new XmlReplacer())%0A                .writeData
 (new
@@ -921,36 +921,38 @@
 olutePath() + %22/
-data
+result
 /fr.xliff%22);%0A   
@@ -948,24 +948,25 @@
 liff%22);%0A
+%0A
         
 xmlStr =
@@ -961,147 +961,39 @@
     
-xmlStr = JsonReplacer.replaceXml(langData, xmlStr);%0A        XmlRea
+translationAd
 der.
-write(xmlStr, new File(%22%22).getAbsolutePath() + %22/result/fr.xliff%22);*/
+printErrors();
 %0A   

Refactor main