Skip to content

Commit f86fce8

Browse files
committed
Add localization and UX improvements across components
Enhanced multilingual support by adding new localization entries in `.resx` files for English, German, and Chinese. Updated Razor components to replace hardcoded strings with localized resource keys, improving accessibility and user experience. Added placeholders, validation messages, and helper text for input fields in forms to guide users. Standardized `.resx` file structure and fixed encoding issues in `zh-CN` files. Introduced new strings for components like `Forgot`, `Login`, `Register`, `Profile`, `Roles`, `Products`, `Tenants`, and `PicklistSets` to support better user and tenant management workflows. Improved product and picklist management features with localized strings for attributes like "Enter product name" and "Select picklist name."
1 parent fdf2934 commit f86fce8

68 files changed

Lines changed: 902 additions & 162 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Application/Resources/Constants/AppStrings.de-DE.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,7 @@
372372
<data name="Are you sure you want to delete the item with ID: {0}?" xml:space="preserve">
373373
<value>Sind Sie sicher, dass Sie das Element mit der ID: {0} löschen möchten?</value>
374374
</data>
375+
<data name="List View" xml:space="preserve">
376+
<value>Listenansicht</value>
377+
</data>
375378
</root>

src/Application/Resources/Constants/AppStrings.en.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,7 @@
372372
<data name="Are you sure you want to delete the item with ID: {0}?" xml:space="preserve">
373373
<value>Are you sure you want to delete the item with ID: {0}?</value>
374374
</data>
375+
<data name="List View" xml:space="preserve">
376+
<value>List View</value>
377+
</data>
375378
</root>

src/Application/Resources/Constants/AppStrings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,7 @@
372372
<data name="Are you sure you want to delete the item with ID: {0}?" xml:space="preserve">
373373
<value>Are you sure you want to delete the item with ID: {0}?</value>
374374
</data>
375+
<data name="List View" xml:space="preserve">
376+
<value>List View</value>
377+
</data>
375378
</root>

src/Application/Resources/Constants/AppStrings.zh-CN.resx

Lines changed: 66 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<root>
33
<!--
4-
Microsoft ResX Schema
5-
6-
Version 2.0
7-
8-
The primary goals of this format is to allow a simple XML format
9-
that is mostly human readable. The generation and parsing of the
10-
various data types are done through the TypeConverter classes
11-
associated with the data types.
12-
13-
Example:
14-
15-
... ado.net/XML headers & schema ...
16-
<resheader name="resmimetype">text/microsoft-resx</resheader>
17-
<resheader name="version">2.0</resheader>
18-
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19-
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20-
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21-
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22-
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23-
<value>[base64 mime encoded serialized .NET Framework object]</value>
24-
</data>
25-
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26-
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27-
<comment>This is a comment</comment>
28-
</data>
29-
30-
There are any number of "resheader" rows that contain simple
31-
name/value pairs.
32-
33-
Each data row contains a name, and value. The row also contains a
34-
type or mimetype. Type corresponds to a .NET class that support
35-
text/value conversion through the TypeConverter architecture.
36-
Classes that don't support this are serialized and stored with the
37-
mimetype set.
38-
39-
The mimetype is used for serialized objects, and tells the
40-
ResXResourceReader how to depersist the object. This is currently not
41-
extensible. For a given mimetype the value must be set accordingly:
42-
43-
Note - application/x-microsoft.net.object.binary.base64 is the format
44-
that the ResXResourceWriter will generate, however the reader can
45-
read any of the formats listed below.
46-
47-
mimetype: application/x-microsoft.net.object.binary.base64
48-
value : The object must be serialized with
49-
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50-
: and then encoded with base64 encoding.
51-
52-
mimetype: application/x-microsoft.net.object.soap.base64
53-
value : The object must be serialized with
54-
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55-
: and then encoded with base64 encoding.
56-
57-
mimetype: application/x-microsoft.net.object.bytearray.base64
58-
value : The object must be serialized into a byte array
59-
: using a System.ComponentModel.TypeConverter
60-
: and then encoded with base64 encoding.
61-
-->
62-
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root" xmlns="">
4+
Microsoft ResX Schema
5+
6+
Version 2.0
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">2.0</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
6363
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
6464
<xsd:element name="root" msdata:IsDataSet="true">
6565
<xsd:complexType>
@@ -112,14 +112,10 @@
112112
<value>2.0</value>
113113
</resheader>
114114
<resheader name="reader">
115-
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
116-
PublicKeyToken=b77a5c561934e089
117-
</value>
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
118116
</resheader>
119117
<resheader name="writer">
120-
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral,
121-
PublicKeyToken=b77a5c561934e089
122-
</value>
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
123119
</resheader>
124120
<data name="More" xml:space="preserve">
125121
<value>更多操作</value>
@@ -376,15 +372,7 @@
376372
<data name="Are you sure you want to delete the item with ID: {0}?" xml:space="preserve">
377373
<value>你确认要删除ID为 {0} 的项目吗?</value>
378374
</data>
379-
</root>
380-
381-
382-
383-
384-
385-
386-
387-
388-
389-
390-
375+
<data name="List View" xml:space="preserve">
376+
<value>列表视图</value>
377+
</data>
378+
</root>

src/Server.UI/Pages/Contacts/Contacts.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<MudIcon Icon="@Icons.Material.Filled.Window" Size="Size.Large" />
3535
<MudStack Spacing="0">
3636
<MudText Typo="Typo.subtitle2" Class="mb-2">@L[_contactDto.GetClassDescription()]</MudText>
37-
<MudEnumSelect Style="min-width:120px" TEnum="ContactListView" ValueChanged="OnListViewChanged" Value="_contactsQuery.ListView" Dense="true" Label="@L["List View"]">
37+
<MudEnumSelect Style="min-width:120px" TEnum="ContactListView" ValueChanged="OnListViewChanged" Value="_contactsQuery.ListView" Dense="true" Label="@AppStrings.ListView">
3838
</MudEnumSelect>
3939
</MudStack>
4040
</MudStack>

src/Server.UI/Pages/Identity/Forgot/Forgot.razor

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@
2222
Label="@L["E-mail"]"
2323
Variant="Variant.Outlined"
2424
InputType="InputType.Email"
25-
Placeholder="name@example.com"
25+
Placeholder="@L["Enter your email address"]"
2626
Immediate="true"
27+
Required="true"
28+
RequiredError="@L["Email address is required"]"
29+
Validation="@(new EmailAddressAttribute() { ErrorMessage = L["Please enter a valid email address"] })"
2730
FullWidth="true"
2831
For="@(() => Input.Email)" />
2932
<MudButton Variant="Variant.Filled"

src/Server.UI/Pages/Identity/Login/LinkExternalLogin.razor

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
<TenantSelect @bind-Value="Input.Tenant"
2929
Label="@L["Tenant"]"
3030
Variant="Variant.Outlined"
31-
HelperText="Select your organization or tenant"
31+
HelperText="@L["Select your organization or tenant"]"
32+
Placeholder="@L["Please select a tenant"]"
3233
Required="true"
3334
For="@(() => Input.Tenant)" />
3435

@@ -38,22 +39,24 @@
3839
Variant="Variant.Outlined"
3940
Margin="Margin.Normal"
4041
InputType="InputType.Email"
41-
HelperText="Enter your professional email address"
42+
HelperText="@L["Enter your professional email address"]"
4243
Required="true"
43-
RequiredError="Email address is required"
44-
Validation="@(new EmailAddressAttribute() { ErrorMessage = "Please enter a valid email address" })"
45-
Placeholder="your.email@company.com" />
44+
RequiredError="@L["Email address is required"]"
45+
Validation="@(new EmailAddressAttribute() { ErrorMessage = L["Please enter a valid email address"] })"
46+
Placeholder="@L["Enter your email address"]" />
4647

4748
<TimeZoneAutocomplete @bind-Value="Input.TimeZoneId"
4849
T="string"
4950
Label="@L["Time Zone"]"
5051
Variant="Variant.Outlined"
52+
Placeholder="@L["Select a time zone"]"
5153
Required="true"
5254
For="@(() => Input.TimeZoneId)" />
5355
<LanguageAutocomplete @bind-Value="Input.LanguageCode"
5456
T="string"
5557
Label="@L["Language"]"
5658
Variant="Variant.Outlined"
59+
Placeholder="@L["Select a language"]"
5760
Required="true"
5861
For="@(() => Input.LanguageCode)" />
5962
<MudButton Variant="Variant.Filled"

src/Server.UI/Pages/Identity/Login/Login.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
<MudTextField @bind-Value="Input.UserName"
2929
Label="@L["User name"]"
3030
Variant="Variant.Outlined"
31+
Placeholder="@L["Enter your user name"]"
3132
For="@(() => Input.UserName)"
3233
AutoFocus="true"
3334
Required="true"
@@ -36,6 +37,7 @@
3637
<MudTextField @bind-Value="Input.Password"
3738
Label="@L["Password"]"
3839
Variant="Variant.Outlined"
40+
Placeholder="@L["Enter your password"]"
3941
For="@(() => Input.Password)"
4042
InputType="@_passwordInputType"
4143
Required="true"

src/Server.UI/Pages/Identity/Login/LoginWith2fa.razor

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<MudTextField @bind-Value="Input.TwoFactorCode"
2323
Label="@L["Authenticator code"]"
2424
Variant="Variant.Outlined"
25+
Placeholder="@L["Enter your authenticator code"]"
2526
Required="true"
2627
RequiredError="@L["Authenticator code is required."]"
2728
For="@(() => Input.TwoFactorCode)"

src/Server.UI/Pages/Identity/Login/LoginWithRecoveryCode.razor

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
Variant="Variant.Outlined"
2222
For="@(() => Input.RecoveryCode)"
2323
Required="true"
24+
Placeholder="@L["Enter your recovery code"]"
25+
RequiredError="@L["Recovery code is required."]"
2426
HelperText="@L["Enter the 8-character recovery code from your backup codes"]" />
2527

2628

0 commit comments

Comments
 (0)