diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 4858e57..3066e07 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -493,6 +493,8 @@ namespace AyaNova.PlugIn.V8 if (StockLocaleHashes.Contains(CurrentLocaleHash)) continue; progress.Op("Locale " + i.Locale + " is customized"); + //collection to hold items sent to server + List exportItems = new List(); //Iterate all RAVEN languages for (int x = 1; x < 5; x++)//first four translations are the stock ones @@ -526,18 +528,21 @@ namespace AyaNova.PlugIn.V8 throw new ArgumentOutOfRangeException("On exporting custom locale " + i.Locale + " source key " + v7item.Key + ", destination key " + v8key + " was not found."); } - progress.SubOp("Posting key: " + v7item.Key); - //update it - await util.PutAsync("Translation/UpdateTranslationItemDisplayText", - JObject.FromObject(new UpdateTranslationItem + //collect + exportItems.Add(new UpdateTranslationItem { Id = v8TransItem.Id, ConcurrencyToken = v8TransItem.ConcurrencyToken, NewText = v7item.Value - } - ).ToString()); - + }); } + + + //update it + progress.SubOp("Posting translation to server "); + await util.PutAsync("Translation/UpdateTranslationItemsDisplayText", + JArray.FromObject(exportItems).ToString()); + } }