private static void StartApp(string inputPath, string outputPath) { var loader = new XmlLoader(); var document = loader.Load(inputPath); var fixer = new UpdateMistakesFixer(document); Console.WriteLine("Fixing update translation mistakes"); fixer.FixAll(); loader.Save(outputPath, document); Console.WriteLine("Finished..."); }
private static async Task StartApp(string englishPath, string translatedPath, string outputPath) { Console.WriteLine("Initializing update..."); var loader = new XmlLoader(); var englishDoc = loader.Load(englishPath); var translatedDoc = loader.Load(translatedPath); var needingTranslationDoc = CreateNeedingTranslationOnlyDoc(englishDoc, translatedDoc); var translator = new Translator(); var localizationManager = new DivinityLocalizationTranslator(translator, needingTranslationDoc); var fixer = new UpdateMistakesFixer(needingTranslationDoc); Console.WriteLine("Translating new lines..."); await localizationManager.TranslateAll(() => {}); Console.WriteLine("Fixing general translation mistakes"); fixer.FixAll(); Console.WriteLine("Building final artifact..."); var finalArtifact = CreateDocumentWithUnionOfTwo(needingTranslationDoc, translatedDoc); loader.Save(outputPath, finalArtifact); Console.WriteLine("Finished..."); }