This commit is contained in:
@@ -160,8 +160,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
private Dictionary<Guid, string> TagMap = new Dictionary<Guid, string>();
|
private Dictionary<Guid, string> TagMap = new Dictionary<Guid, string>();
|
||||||
private Dictionary<string, string> CustomFieldLocaleKeys = new Dictionary<string, string>();//holds custom field Raven as key and v7 custom text for that field for later export
|
private Dictionary<string, string> CustomFieldLocaleKeys = new Dictionary<string, string>();//holds custom field Raven as key and v7 custom text for that field for later export
|
||||||
private string ImportTag = "v7-import";
|
private string ImportTag = "v7-import";
|
||||||
List<string> InUseLocales = new List<string>();
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dump the objects into a temporary directory as a series of JSON files
|
/// 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
|
/// 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();
|
Map.Clear();
|
||||||
TagMap.Clear();
|
TagMap.Clear();
|
||||||
CustomFieldLocaleKeys.Clear();
|
CustomFieldLocaleKeys.Clear();
|
||||||
InUseLocales.Clear();
|
|
||||||
|
|
||||||
//admin user (not exported but is there already)
|
//admin user (not exported but is there already)
|
||||||
Map.Add(User.AdministratorID, 1);
|
Map.Add(User.AdministratorID, 1);
|
||||||
@@ -313,9 +312,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
#region Export administrator wiki and attached files if present
|
#region Export administrator wiki and attached files if present
|
||||||
{
|
{
|
||||||
User admin = User.GetItem(User.AdministratorID);
|
User admin = User.GetItem(User.AdministratorID);
|
||||||
progress.Op("Administrator account");
|
progress.Op("Administrator account");
|
||||||
|
|
||||||
InUseLocales.Add(admin.DefaultLanguage);
|
|
||||||
//Attachments and wiki
|
//Attachments and wiki
|
||||||
string AdminWikiContent = null;
|
string AdminWikiContent = null;
|
||||||
var hasWiki = WikiPage.HasWiki(User.AdministratorID);
|
var hasWiki = WikiPage.HasWiki(User.AdministratorID);
|
||||||
@@ -360,10 +357,7 @@ namespace AyaNova.PlugIn.V8
|
|||||||
if (i.ID == User.AdministratorID) continue;
|
if (i.ID == User.AdministratorID) continue;
|
||||||
|
|
||||||
User c = User.GetItem(i.ID);
|
User c = User.GetItem(i.ID);
|
||||||
|
|
||||||
if (!InUseLocales.Contains(c.DefaultLanguage))
|
|
||||||
InUseLocales.Add(c.DefaultLanguage);
|
|
||||||
|
|
||||||
dynamic d = new JObject();
|
dynamic d = new JObject();
|
||||||
d.name = c.FirstName + " " + c.LastName;
|
d.name = c.FirstName + " " + c.LastName;
|
||||||
progress.Op("User " + d.name);
|
progress.Op("User " + d.name);
|
||||||
@@ -489,21 +483,10 @@ namespace AyaNova.PlugIn.V8
|
|||||||
int CurrentLocaleHash = util.GetOrderIndependentHashCode<string>(allStrings);
|
int CurrentLocaleHash = util.GetOrderIndependentHashCode<string>(allStrings);
|
||||||
allStrings.Clear();
|
allStrings.Clear();
|
||||||
if (StockLocaleHashes.Contains(CurrentLocaleHash)) continue;
|
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());
|
// 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
|
//todo: all locales except English default need to be dealt with
|
||||||
//above skiplocales is incorrect
|
//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?
|
//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
|
//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
|
//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
|
#endregion locales
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user