Skip to content

Commit f4187ff

Browse files
committed
Minor bug fix Translation Context
1 parent 30db45b commit f4187ff

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/Context/JsonFormTranslationContext.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using Orbyss.Blazor.JsonForms.Interpretation.Interfaces;
77
using Orbyss.Blazor.JsonForms.Utils;
88
using Orbyss.Components.Json.Models;
9-
using System.Linq;
109
using System.Text.Json;
1110

1211
namespace Orbyss.Blazor.JsonForms.Context
@@ -107,7 +106,7 @@ public string TranslateErrors(string? language, IEnumerable<ErrorType> errors, U
107106

108107
var translation = GetTranslationObject(language);
109108

110-
if (string.IsNullOrWhiteSpace(language) || translation is null)
109+
if (translation is null)
111110
{
112111
return propertyName.ToHumanReadableName();
113112
}

src/Orbyss.Blazor.JsonForms.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
<PackageIcon>icon.png</PackageIcon>
2929

3030
<PackageReleaseNotes>
31-
- Reorganized the Date/Time form component instances.
32-
- Added clearer exception handling in ControlTypeInterpreter
31+
*Release: 8 August, 2025*
32+
- Found minor bug in TranslationContext; when language was null, the property name for labels was returned right away.
33+
Now, we will first check if there are any translations, and only when there is not other option left will we return the property name
3334
</PackageReleaseNotes>
3435
</PropertyGroup>
3536

0 commit comments

Comments
 (0)