This commit is contained in:
2019-01-17 18:28:52 +00:00
parent b7a07176cc
commit 3add6dc16f
2 changed files with 22 additions and 3 deletions

View File

@@ -20,6 +20,9 @@ SERVER
- Resource localization edit all Custom field locale keys for all langauges and change to be 1 to 16 (remove 0 and add 6 more)
- So, for example ClientCustom0 becomes ClientCustom1 and make sure the display values are identical as right now there are "My Custom0" and "Custom Field 8" in the same bunch
- Copy from WidgetCustom1 to 16 if necessary or for reference
- Fixup the imported local customs too
- Importv7Locale: add code to fixup the imported locale with any keys it's missing from the stock english resource key set on import
- Resource localization edit wherever possible to change "Common*" such as "CommonActive" to remove the "common" part wherever possible.
- Also check if used anywhere in client or at server and rename there too

View File

@@ -165,7 +165,7 @@ namespace AyaNova.Biz
}
//Get the keys for a list of keys provided, static format for calling from other internal classes
internal static async Task<Dictionary<string,string>> GetSubsetStatic(List<string> param, long localeId)
internal static async Task<Dictionary<string, string>> GetSubsetStatic(List<string> param, long localeId)
{
#if (DEBUG)
TrackRequestedKey(param);
@@ -420,10 +420,26 @@ namespace AyaNova.Biz
s = s.Replace("PurchaseOrderPurchaseOrder", "PurchaseOrder", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("WorkorderItemMiscExpenseExpense", "WorkorderItemMiscExpense", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("WorkorderItemTravelTravel", "WorkorderItemTravel", StringComparison.InvariantCultureIgnoreCase);
//Custom fields were 0 to 9, now 1 to 16
s = s.Replace("Custom9", "Custom10", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom8", "Custom9", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom7", "Custom8", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom6", "Custom7", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom5", "Custom6", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom4", "Custom5", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom3", "Custom4", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom2", "Custom3", StringComparison.InvariantCultureIgnoreCase);
if (!s.EndsWith("Custom10"))
s = s.Replace("Custom1", "Custom2", StringComparison.InvariantCultureIgnoreCase);
s = s.Replace("Custom0", "Custom1", StringComparison.InvariantCultureIgnoreCase);
//separate code will handle adding the new keys that didn't exist in v7 (custom 11 - 16)
return s;
}
//ocaleBiz::ImportV7 - old Key "Locale.Label.UI.DestLocale" translates to new Key "LocaleDestLocale" which is not valid!
//LocaleBiz::ImportV7 - old Key "Locale.Label.UI.DestLocale" translates to new Key "LocaleDestLocale" which is not valid!
//LocaleUIDestLocale
@@ -490,7 +506,7 @@ namespace AyaNova.Biz
var v = RxExtractLocaleName.Match(SourceLocaleFileName);
var SourceLocaleName = v.Groups[1].ToString();
//ENsure doesn't already exist
//Ensure doesn't already exist
if (LocaleExists(SourceLocaleName))
{
//If there are any validation errors, log in joblog and move on