Update the localized content section to use the total item count

This commit is contained in:
Thorsten Sommer 2025-04-26 18:49:51 +02:00
parent 9fee51551c
commit 78414f331e
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 4 additions and 2 deletions

View File

@ -92,7 +92,7 @@ else if (!this.isLoading && string.IsNullOrWhiteSpace(this.loadingIssue))
{ {
<hr style="width: 100%; border-width: 0.25ch;" class="mt-6 mb-6"/> <hr style="width: 100%; border-width: 0.25ch;" class="mt-6 mb-6"/>
<MudText Typo="Typo.h6"> <MudText Typo="Typo.h6">
Localized Content (@this.localizedContent.Count entries of @this.addedContent.Count) Localized Content (@this.localizedContent.Count entries of @this.NumTotalItems)
</MudText> </MudText>
<MudTable Items="@this.localizedContent" Hover="@true" Filter="@this.FilterFunc" Class="border-dashed border rounded-lg mb-6"> <MudTable Items="@this.localizedContent" Hover="@true" Filter="@this.FilterFunc" Class="border-dashed border rounded-lg mb-6">
<ToolBarContent> <ToolBarContent>

View File

@ -249,6 +249,8 @@ public partial class AssistantI18N : AssistantBaseCore<SettingsDialogI18N>
return null; return null;
} }
private int NumTotalItems => (this.selectedLanguagePlugin?.Content.Count ?? 0) + this.addedContent.Count - this.removedContent.Count;
private async Task LocalizeTextContent() private async Task LocalizeTextContent()
{ {
await this.form!.Validate(); await this.form!.Validate();