From 37618278b4da93d23bd9a6259c4aed2728212c54 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 30 Apr 2020 16:05:05 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/V8.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index c95c477..3538049 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -465,13 +465,22 @@ namespace AyaNova.PlugIn.V8 progress.Append("Exporting " + l.Count.ToString() + " Locales"); foreach (LocaleList.LocaleListInfo i in l) { + + if (!progress.KeepGoing) return; if (i.Locale != "English") { LocalizedTextTable lt = LocalizedTextTable.Load(i.Locale); + List allStrings = new List(); + foreach (var entry in lt.LT) { + allStrings.Add(entry.Value); + } + + progress.Append("Locale: " + i.Locale + " hash code: " + util.GetOrderIndependentHashCode(allStrings)); + //todo: all locales except English default need to be dealt with //above skiplocales is incorrect - + //todo: do the language ones by fetching the equivalent language and then bring over from here (if modified) //maybe there's a way to tell if the stock locales have been edited and skip them if not? Modified date? //no, need to checksum them I think @@ -486,10 +495,10 @@ namespace AyaNova.PlugIn.V8 //need a key translator so can give old and get new then just update it's value - dynamic d = new JObject(); - d.id = 1; - d.name = i.Locale; - var a = util.PostAsync("Translation/Duplicate", d.ToString()); + //dynamic d = new JObject(); + //d.id = 1; + //d.name = i.Locale; + //var a = util.PostAsync("Translation/Duplicate", d.ToString());