Modifica traduzioni
This commit is contained in:
@@ -52,7 +52,7 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Dictionary<string, string> AreaFDict = Vocabulary.Where(x => x.Key.Contains("CWAreaF_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
AreaFDict = Vocabulary.Where(x => x.Key.Contains("CWAreaF_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if (AreaFDict == null || AreaFDict.Count != 4)
|
||||
{
|
||||
List<string> tradList = new List<string>() { "CWAreaF_AreaFrame", "CWAreaF_AggSash", "CWAreaF_AggSplit", "CWAreaF_AggInglesina"};
|
||||
@@ -62,6 +62,8 @@ namespace WebWindowComplex.Compo
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
private Dictionary<string, string> AreaFDict = new();
|
||||
|
||||
#region Private Methods
|
||||
|
||||
/// <summary>
|
||||
@@ -99,9 +101,9 @@ namespace WebWindowComplex.Compo
|
||||
private string Traduci(string lemma)
|
||||
{
|
||||
string ans = lemma;
|
||||
if (Vocabulary != null && Vocabulary.ContainsKey(lemma))
|
||||
if (AreaFDict != null && AreaFDict.ContainsKey(lemma))
|
||||
{
|
||||
ans = Vocabulary.GetValueOrDefault(lemma) ?? "";
|
||||
ans = AreaFDict.GetValueOrDefault(lemma) ?? "";
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="d-flex flex-column">
|
||||
<div class="card text-center shadow rounded">
|
||||
<div class="col-md-12 d-grid gap-4 p-2 d-md-flex justify-content-end flex-wrap">
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">@Traduci("CW_Close")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">@Traduci("CWTableC_Close")</button>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<div class="fs-3">@Traduci("CWTableC_MissingParam")</div>
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="d-flex flex-column">
|
||||
<div class="card text-center shadow rounded">
|
||||
<div class="col-md-12 d-grid gap-4 p-2 d-md-flex justify-content-end flex-wrap">
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">@Traduci("CW_Close")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">@Traduci("CWTableC_Close")</button>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<div class="fs-3">@Traduci("CWTableC_MissingJWD")</div>
|
||||
@@ -93,9 +93,9 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-md-12 col-lg-6 d-grid gap-4 px-4 d-md-flex justify-content-md-end align-items-center flex-wrap">
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoReset">@Traduci("CW_Reset")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoSave">@Traduci("CW_Save")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">@Traduci("CW_Close")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoReset">@Traduci("CWTableC_Reset")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoSave">@Traduci("CWTableC_Save")</button>
|
||||
<button class="btn btn-lg btn-primary px-4" style="font-size: 1rem;" @onclick="DoClose">@Traduci("CWTableC_Close")</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -161,8 +161,6 @@ namespace WebWindowComplex
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
// Ricava il percorso assoluto sul disco del server
|
||||
string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"Data", "Lemmi.json");
|
||||
|
||||
if (File.Exists(filePath))
|
||||
@@ -174,12 +172,6 @@ namespace WebWindowComplex
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
|
||||
//if (Vocabulary == null || Vocabulary.Count == 0)
|
||||
//{
|
||||
// List<string> tradList = new List<string>() { "ConfWind_MissingParam", "ConfWind_MissingJWD", "ConfWind_ValidError", "ConfWind_ConfigError", "ConfWind_Tree", "ConfWind_General", "ConfWind_Reset", "ConfWind_Save", "ConfWind_Close", "ConfWind_AllFill", "ConfWind_AllGlass", "ConfWind_AllWood" };
|
||||
// await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -325,12 +317,23 @@ namespace WebWindowComplex
|
||||
//PendReq.Remove("Profile");
|
||||
//await EC_PendantAction.InvokeAsync(PendReq);
|
||||
}
|
||||
if(Vocabulary != null)
|
||||
{
|
||||
TableCDict = Vocabulary.Where(x => x.Key.Contains("CWTableC_")).ToDictionary(x => x.Key, y => y.Value);
|
||||
if (TableCDict == null || TableCDict.Count != 10)
|
||||
{
|
||||
List<string> tradList = new List<string>() { "CWTableC_Reset", "CWTableC_Save", "CWTableC_Close", "CWTableC_MissingParam", "CWTableC_MissingJWD", "CWTableC_ValidError", "CWTableC_ConfigError", "CWTableC_MissingValue", "CWTableC_Tree", "CWTableC_General" };
|
||||
await EC_ReqTraduzione.InvokeAsync(tradList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private Dictionary<string, string> TableCDict = new();
|
||||
|
||||
private bool reqBool = false;
|
||||
|
||||
private bool waitShape = false;
|
||||
@@ -2315,9 +2318,9 @@ namespace WebWindowComplex
|
||||
private string Traduci(string lemma)
|
||||
{
|
||||
string ans = lemma;
|
||||
if (Vocabulary != null && Vocabulary.ContainsKey(lemma))
|
||||
if (TableCDict != null && TableCDict.ContainsKey(lemma))
|
||||
{
|
||||
ans = Vocabulary.GetValueOrDefault(lemma) ?? "";
|
||||
ans = TableCDict.GetValueOrDefault(lemma) ?? "";
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Version>3.1.8.1413</Version>
|
||||
<Version>3.1.8.1414</Version>
|
||||
<Authors>Annamaria Sassi</Authors>
|
||||
<Company>Egalware</Company>
|
||||
<Description>Componente gestione Configurazioni avanzate Window per LUX</Description>
|
||||
@@ -218,6 +218,17 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user