This commit is contained in:
@@ -510,21 +510,18 @@ namespace AyaNova.PlugIn.V8
|
||||
//iterate v7 locale items
|
||||
foreach (var v7item in lt.LT)
|
||||
{
|
||||
//skip over wikipage it's been dropped as it's an international term
|
||||
if (v7item.Key == "O.WikiPage") continue;
|
||||
//skip not used
|
||||
if (v7item.Key == "UI.Command.LocalizedTextDesign") continue;
|
||||
|
||||
|
||||
progress.SubOp("Processing key: " + v7item.Key);
|
||||
|
||||
var v8key = Translatev7TranslationKey(v7item.Key);
|
||||
TranslationItem v8TransItem = trans.FirstOrDefault(m => m.Key == v8key);
|
||||
if (v8TransItem == null)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException("On exporting custom locale " + i.Locale + " source key " + v7item.Key + ", destination key " + v8key + " was not found.");
|
||||
if (v8key == "**SKIP**") continue;
|
||||
|
||||
TranslationItem v8TransItem = trans.FirstOrDefault(m => m.Key == v8key);
|
||||
|
||||
if (v8TransItem == null)
|
||||
{
|
||||
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);
|
||||
//update it
|
||||
await util.PutAsync("Translation/UpdateTranslationItemDisplayText",
|
||||
@@ -550,7 +547,7 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
|
||||
|
||||
source key UI.Label.DateRange.InTheLastYear, destination key DateRangeInTheLastYear was not found
|
||||
source key , destination key ToolbarClientsToolBar was not found.
|
||||
|
||||
|
||||
|
||||
@@ -586,6 +583,15 @@ namespace AyaNova.PlugIn.V8
|
||||
/// <returns></returns>
|
||||
public string Translatev7TranslationKey(string oldKey)
|
||||
{
|
||||
|
||||
//skip keys definitely not in destination
|
||||
switch (oldKey)
|
||||
{
|
||||
case "O.WikiPage": //skip over wikipage it's been dropped as it's an international term
|
||||
case "UI.Command.LocalizedTextDesign":
|
||||
case "UI.Toolbar.ClientsToolBar":
|
||||
return "**SKIP**";
|
||||
}
|
||||
string s = oldKey.Replace(".Label.", ".");
|
||||
if (s.StartsWith("O."))
|
||||
s = s.Replace("O.", "");
|
||||
@@ -667,8 +673,8 @@ namespace AyaNova.PlugIn.V8
|
||||
|
||||
//items that came up after moving this to v8 export plugin
|
||||
s = s.Replace("DateRangeInTheLastYear", "DateRangePastYear");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//FUTURE
|
||||
// s = s.Replace("WASXXX", "NOWXXXX");
|
||||
|
||||
Reference in New Issue
Block a user