This commit is contained in:
@@ -3077,30 +3077,7 @@ namespace AyaNova.PlugIn.V8
|
||||
progress.Op("Start Locales export");
|
||||
progress.SubOp("");
|
||||
progress.Append("Exporting customized Locales");
|
||||
////checksum locales
|
||||
////if a recognized checksum then don't import because it means it wasn't modified from stock
|
||||
///*
|
||||
// Stock fresh trial db (fb) values:
|
||||
// Locale Custom English [signature: -1965948581]
|
||||
// Locale Deutsch [signature: -564065723]
|
||||
// Locale English [signature: -1965948581]
|
||||
// Locale Español [signature: -1122936791]
|
||||
// Locale Français [signature: -679171126]
|
||||
|
||||
//Do not use these keys in hash calculation which were added / modified during various schema updates
|
||||
// Global.Label.UseInventory.Description
|
||||
// Locale.Label.LocaleFile
|
||||
// UnitNameDisplayFormats.Label.ModelSerial
|
||||
// UnitNameDisplayFormats.Label.SerialModel
|
||||
// UnitNameDisplayFormats.Label.SerialModelVendor
|
||||
// UnitNameDisplayFormats.Label.VendorModelSerial
|
||||
// O.PartBin
|
||||
//*/
|
||||
//List<int> StockLocaleHashes = new List<int>();
|
||||
//StockLocaleHashes.Add(-1965948581);
|
||||
//StockLocaleHashes.Add(-564065723);
|
||||
//StockLocaleHashes.Add(-1122936791);
|
||||
//StockLocaleHashes.Add(-679171126);
|
||||
|
||||
|
||||
//Get a list of RAVEN translations and ID's
|
||||
var a = await util.GetAsync("translation/list");
|
||||
@@ -3120,24 +3097,7 @@ namespace AyaNova.PlugIn.V8
|
||||
// //continue;
|
||||
//#endif
|
||||
if (!util.LocaleIsCustomized(i.Locale, lt, progress)) continue;
|
||||
////calculate hash
|
||||
//List<string> allStrings = new List<string>();
|
||||
//foreach (var entry in lt.LT)
|
||||
//{
|
||||
// if(entry.Key=="Global.Label.UseInventory.Description") continue;
|
||||
// if(entry.Key=="Locale.Label.LocaleFile") continue;
|
||||
// if(entry.Key=="UnitNameDisplayFormats.Label.ModelSerial") continue;
|
||||
// if(entry.Key=="UnitNameDisplayFormats.Label.SerialModel") continue;
|
||||
// if(entry.Key=="UnitNameDisplayFormats.Label.SerialModelVendor") continue;
|
||||
// if(entry.Key=="UnitNameDisplayFormats.Label.VendorModelSerial") continue;
|
||||
// if (entry.Key == "O.PartBin") continue;
|
||||
|
||||
// allStrings.Add(entry.Value);
|
||||
//}
|
||||
//int CurrentLocaleHash = util.GetOrderIndependentHashCode<string>(allStrings);
|
||||
//allStrings.Clear();
|
||||
//if (StockLocaleHashes.Contains(CurrentLocaleHash)) continue;
|
||||
//progress.Append("Locale " + i.Locale + " is customized [signature: "+CurrentLocaleHash.ToString()+"]; exporting");
|
||||
|
||||
|
||||
//collection to hold items sent to server
|
||||
List<UpdateTranslationItem> exportItems = new List<UpdateTranslationItem>();
|
||||
@@ -3172,17 +3132,12 @@ namespace AyaNova.PlugIn.V8
|
||||
break;
|
||||
}
|
||||
|
||||
//MAKE A DUPLICATE
|
||||
//name like this: "My custom (Espanol)" etc one for each target stock language
|
||||
|
||||
//MAKE A DUPLICATE
|
||||
var exportName = GetUniqueName(i.Locale + " (" + RavenLocaleName + ")");
|
||||
progress.SubOp("");
|
||||
progress.Op("Exporting " + i.Locale + " to " + exportName);
|
||||
|
||||
// var t = new util.NameIdItem { Name = exportName, Id = x };
|
||||
progress.Op("Exporting " + i.Locale + " to " + exportName);
|
||||
a = await util.PostAsync("translation/duplicate/" + x.ToString());
|
||||
var targetTranslationId = util.IdFromResponse(a);
|
||||
// var ctoken = util.CTokenFromResponse(a);
|
||||
|
||||
//now set the name
|
||||
dynamic dTransName = new JObject();
|
||||
@@ -3192,7 +3147,6 @@ namespace AyaNova.PlugIn.V8
|
||||
dTransName.stock = false;
|
||||
dTransName.cjkIndex = a.ObjectResponse["data"]["cjkIndex"];
|
||||
var vtemp = await util.PutAsync("translation", dTransName.ToString());
|
||||
// vtemp["data"]["concurrency"]
|
||||
var ctoken = util.CTokenFromResponse(vtemp);
|
||||
// "id": 5,
|
||||
//"concurrency": 92149,
|
||||
@@ -3222,8 +3176,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
if (!DuplicateAvoidanceList.Contains(v8key)) { DuplicateAvoidanceList.Add(v8key); }
|
||||
else continue;
|
||||
//System.Diagnostics.Debug.WriteLine("v7key:" + v7item.Key + " -> v8key: " + v8key);
|
||||
|
||||
|
||||
TranslationItem v8TransItem = trans.FirstOrDefault(m => m.Key == v8key);
|
||||
|
||||
if (v8TransItem == null)
|
||||
@@ -3406,10 +3359,8 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
//RateRate*
|
||||
s = s.Replace("RateRate", "Rate");
|
||||
|
||||
if (s.StartsWith("WorkorderStatus.Label."))
|
||||
s = s.Replace("WorkorderStatus.Label.", "");
|
||||
|
||||
s = s.Replace("WorkOrderStatusCompletedStatus", "CompletedStatus");
|
||||
s = s.Replace("WorkOrderStatusName", "StatusName");
|
||||
|
||||
//FUTURE
|
||||
// s = s.Replace("WASXXX", "NOWXXXX");
|
||||
|
||||
Reference in New Issue
Block a user