This commit is contained in:
2020-04-30 22:54:46 +00:00
parent 53b853bf91
commit b8f98f0e1b

View File

@@ -493,6 +493,8 @@ namespace AyaNova.PlugIn.V8
if (StockLocaleHashes.Contains(CurrentLocaleHash)) continue; if (StockLocaleHashes.Contains(CurrentLocaleHash)) continue;
progress.Op("Locale " + i.Locale + " is customized"); progress.Op("Locale " + i.Locale + " is customized");
//collection to hold items sent to server
List<UpdateTranslationItem> exportItems = new List<UpdateTranslationItem>();
//Iterate all RAVEN languages //Iterate all RAVEN languages
for (int x = 1; x < 5; x++)//first four translations are the stock ones 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."); 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); //collect
//update it exportItems.Add(new UpdateTranslationItem
await util.PutAsync("Translation/UpdateTranslationItemDisplayText",
JObject.FromObject(new UpdateTranslationItem
{ {
Id = v8TransItem.Id, Id = v8TransItem.Id,
ConcurrencyToken = v8TransItem.ConcurrencyToken, ConcurrencyToken = v8TransItem.ConcurrencyToken,
NewText = v7item.Value NewText = v7item.Value
} });
).ToString());
} }
//update it
progress.SubOp("Posting translation to server ");
await util.PutAsync("Translation/UpdateTranslationItemsDisplayText",
JArray.FromObject(exportItems).ToString());
} }
} }