This commit is contained in:
2020-04-10 22:23:20 +00:00
parent 2b492a37a1
commit 911031a42f
2 changed files with 16 additions and 4 deletions

View File

@@ -106,14 +106,25 @@ namespace AyaNova.Api.Controllers
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(AyaType).ToString()).ToLowerInvariant())
{
//this is intended primarily for developers, not for UI facing so no need to localize or pretty it up
//bullshit, it's just extra work not translated and developers only need the number, not the enumeration name which is for here only
var values = Enum.GetValues(typeof(AyaType));
foreach (AyaType t in values)
TranslationKeysToFetch.Add(t.ToString());
var LT = TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, TranslationId).Result;
foreach (AyaType t in values)
{
string name = t.ToString();
if (t.HasAttribute(typeof(CoreBizObjectAttribute)))
string tName = t.ToString();
string name = string.Empty;
if (LT.ContainsKey(tName))
{
name += " [CoreBizObject]";
name = LT[tName];
}
else
{
name = tName;
}
ReturnList.Add(new NameIdItem() { Name = name, Id = (long)t });
}

View File

@@ -50,9 +50,10 @@ namespace AyaNova.Biz
//AyaNova.Biz.BizObjectFactory
//AyaNova.Biz.BizRoles
//AyaNova.Biz.BizObjectNameFetcherDIRECT
//and in the CLIENT in ayatype.js
//and need TRANSLATION KEYS because any type could show in the event log at teh client end
}