Fix traduzioni
This commit is contained in:
@@ -52,14 +52,19 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
AreaFDict = Vocabulary.Where(x => x.Key.Contains("CWAreaF_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if (AreaFDict == null || AreaFDict.Count != 4)
|
||||
Dictionary<string, string> AFDict = Vocabulary.Where(x => x.Key.Contains("CWAreaF_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if (AFDict == null || AFDict.Count != 4)
|
||||
{
|
||||
List<string> tradList = new List<string>() { "CWAreaF_AreaFrame", "CWAreaF_AggSash", "CWAreaF_AggSplit", "CWAreaF_AggInglesina"};
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
AreaFDict = Vocabulary.Where(x => x.Key.Contains("CWAreaF_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
private Dictionary<string, string> AreaFDict = new();
|
||||
|
||||
@@ -55,15 +55,23 @@ namespace WebWindowComplex.Compo
|
||||
#region Protected Properties
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Dictionary<string, string> FillDict = Vocabulary.Where(x => x.Key.Contains("CWFill_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if (FillDict == null || FillDict.Count != 3)
|
||||
Dictionary<string, string> FDict = Vocabulary.Where(x => x.Key.Contains("CWFill_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if (FDict == null || FDict.Count != 3)
|
||||
{
|
||||
List<string> tradList = new List<string>() { "CWFill_Fill", "CWFill_Glass", "CWFill_Wood"};
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
FillDict = Vocabulary.Where(x => x.Key.Contains("CWFill_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
private Dictionary<string, string> FillDict = new();
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -102,9 +110,9 @@ namespace WebWindowComplex.Compo
|
||||
private string Traduci(string lemma)
|
||||
{
|
||||
string ans = lemma;
|
||||
if (Vocabulary != null && Vocabulary.ContainsKey(lemma))
|
||||
if (FillDict != null && FillDict.ContainsKey(lemma))
|
||||
{
|
||||
ans = Vocabulary.GetValueOrDefault(lemma) ?? "";
|
||||
ans = FillDict.GetValueOrDefault(lemma) ?? "";
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
@@ -80,16 +80,23 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Dictionary<string, string> FrameDict = Vocabulary.Where(x => x.Key.Contains("CWFrame_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if(FrameDict == null || FrameDict.Count != 9)
|
||||
Dictionary<string, string> fDict = Vocabulary.Where(x => x.Key.Contains("CWFrame_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if(fDict == null || fDict.Count != 9)
|
||||
{
|
||||
List<string> tradList = new List<string>() { "CWFrame_Frame", "CWFrame_Shape", "CWFrame_Dimension", "CWFrame_Threshold", "CWFrame_Tipology", "CWFrame_BottomRail", "CWFrame_Quantity", "CWFrame_Joints", "CWFrame_Element" };
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
FrameDict = Vocabulary.Where(x => x.Key.Contains("CWFrame_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
private Dictionary<string, string> FrameDict = new();
|
||||
|
||||
#region Private Properties
|
||||
private string GetImageFrameShapePath(string fileName) => $"_content/Egw.Lux.WebWindowComplex/icone/frame/shape/{fileName}.svg";
|
||||
private string GetImageJointShapePath(string fileName) => $"_content/Egw.Lux.WebWindowComplex/icone/joint/shape/All/{fileName}.svg";
|
||||
@@ -421,9 +428,9 @@ namespace WebWindowComplex.Compo
|
||||
private string Traduci(string lemma)
|
||||
{
|
||||
string ans = lemma;
|
||||
if (Vocabulary != null && Vocabulary.ContainsKey(lemma))
|
||||
if (FrameDict != null && FrameDict.ContainsKey(lemma))
|
||||
{
|
||||
ans = Vocabulary.GetValueOrDefault(lemma) ?? "";
|
||||
ans = FrameDict.GetValueOrDefault(lemma) ?? "";
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user