diff --git a/source/Plugins/AyaNova.Plugin.V8/V8.cs b/source/Plugins/AyaNova.Plugin.V8/V8.cs index 5712fed..bb2a91a 100644 --- a/source/Plugins/AyaNova.Plugin.V8/V8.cs +++ b/source/Plugins/AyaNova.Plugin.V8/V8.cs @@ -160,8 +160,7 @@ namespace AyaNova.PlugIn.V8 private Dictionary TagMap = new Dictionary(); private Dictionary CustomFieldLocaleKeys = new Dictionary();//holds custom field Raven as key and v7 custom text for that field for later export private string ImportTag = "v7-import"; - List InUseLocales = new List(); - + /// /// Dump the objects into a temporary directory as a series of JSON files /// then zip it all up into a single archive file and then erase the temporary folder @@ -180,7 +179,7 @@ namespace AyaNova.PlugIn.V8 Map.Clear(); TagMap.Clear(); CustomFieldLocaleKeys.Clear(); - InUseLocales.Clear(); + //admin user (not exported but is there already) Map.Add(User.AdministratorID, 1); @@ -313,9 +312,7 @@ namespace AyaNova.PlugIn.V8 #region Export administrator wiki and attached files if present { User admin = User.GetItem(User.AdministratorID); - progress.Op("Administrator account"); - - InUseLocales.Add(admin.DefaultLanguage); + progress.Op("Administrator account"); //Attachments and wiki string AdminWikiContent = null; var hasWiki = WikiPage.HasWiki(User.AdministratorID); @@ -360,10 +357,7 @@ namespace AyaNova.PlugIn.V8 if (i.ID == User.AdministratorID) continue; User c = User.GetItem(i.ID); - - if (!InUseLocales.Contains(c.DefaultLanguage)) - InUseLocales.Add(c.DefaultLanguage); - + dynamic d = new JObject(); d.name = c.FirstName + " " + c.LastName; progress.Op("User " + d.name); @@ -489,21 +483,10 @@ namespace AyaNova.PlugIn.V8 int CurrentLocaleHash = util.GetOrderIndependentHashCode(allStrings); allStrings.Clear(); if (StockLocaleHashes.Contains(CurrentLocaleHash)) continue; - progress.Op("Locale " + i.Locale + " is customized, exporting"); + progress.SubOp("Locale " + i.Locale + " is customized, exporting"); // progress.Append("Locale: " + i.Locale + " hash code: " + CurrentLocaleHash.ToString()); - /* - - - - Dev db values: - Locale: Custom English hash code: -673510828 - Locale: Deutsch hash code: -257973661 - Locale: English hash code: 740187325 - Locale: Español hash code: -373723947 - Locale: Français hash code: -224208815 - - */ + //todo: all locales except English default need to be dealt with //above skiplocales is incorrect @@ -512,7 +495,6 @@ namespace AyaNova.PlugIn.V8 //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 - //todo: determine what users are set to for locales and only import those ones!!! //todo: somehow identify where a custom list not of our own comes from originally so can start with that list @@ -531,6 +513,8 @@ namespace AyaNova.PlugIn.V8 } + progress.Op(""); + progress.SubOp(""); } #endregion locales