diff --git a/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/Post.md b/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/Post.md new file mode 100644 index 0000000000..fd98089505 --- /dev/null +++ b/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/Post.md @@ -0,0 +1,68 @@ +# How to Use the Weixin Authentication for MVC / Razor Page Applications + +This guide demonstrates how to integrate Weixin to an ABP application that enables users to sign in using OAuth 2.0 with credentials. + +## Create a sandbox account + +If you don't have a production account, you can create a sendbox account for testing: https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index + +In this article we will use the sandbox account. + +> You should configure the callback domain name on the Weixin open platform + +## AddWeixin + +You need to install `AspNet.Security.OAuth.Weixin` package to your **.Web** project. + +In your **.Web** project, locate your **ApplicationWebModule** and modify `ConfigureAuthentication` method with the following: + +```csharp +private void ConfigureAuthentication(ServiceConfigurationContext context) +{ + var configuration = context.Services.GetConfiguration(); + context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme); + context.Services.AddAuthentication() + .AddWeixin(options => + { + options.ClientId = configuration["Weixin:ClientId"]; + options.ClientSecret = configuration["Weixin:ClientSecret"]; + }); +} +``` + +Updating `appsettings.json` to add `Weixin` section: + +````json + "Weixin": { + "ClientId": "", + "ClientSecret": "" + } +```` + +## Web page authorization + +Now you can run the application to login with Weixin. + +![login-with-weixin](login-with-weixin.jpg) + +It will redirect to weixin platform to scan the QR code. + +> The sandbox account lacks the necessary scope, so it may not work properly. + +## Official account authorization + +Updating `AddWeixin`: + +```csharp +context.Services.AddAuthentication() + .AddWeixin(options => + { + options.ClientId = configuration["Weixin:ClientId"]; + options.ClientSecret = configuration["Weixin:ClientSecret"]; + options.AuthorizationEndpoint = "https://open.weixin.qq.com/connect/oauth2/authorize"; + }); +``` + +Now you can use WeChat app to open the web application URL to login with weixin. + +![offical-account](offical-account.jpg) \ No newline at end of file diff --git a/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/login-with-weixin.jpg b/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/login-with-weixin.jpg new file mode 100644 index 0000000000..cfb248ebc4 Binary files /dev/null and b/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/login-with-weixin.jpg differ diff --git a/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/offical-account.jpg b/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/offical-account.jpg new file mode 100644 index 0000000000..8157a4e952 Binary files /dev/null and b/docs/en/Community-Articles/2022-12-29-Use-Weixin-Authentication-for-MVC-Applications/offical-account.jpg differ diff --git a/docs/en/Module-Entity-Extensions.md b/docs/en/Module-Entity-Extensions.md index 1a3c318c6b..47436a7dd9 100644 --- a/docs/en/Module-Entity-Extensions.md +++ b/docs/en/Module-Entity-Extensions.md @@ -312,12 +312,14 @@ An enum properties is shown as combobox (select) in the create/edit forms: Enum member name is shown on the table and forms by default. If you want to localize it, just create a new entry on your [localization](https://docs.abp.io/en/abp/latest/Localization) file: ````json -"UserType.SuperUser": "Super user" +"Enum:UserType.0": "Super user" ```` One of the following names can be used as the localization key: +* `Enum:UserType.0` * `Enum:UserType.SuperUser` +* `UserType.0` * `UserType.SuperUser` * `SuperUser` diff --git a/docs/en/Tutorials/Part-1.md b/docs/en/Tutorials/Part-1.md index aefed89da7..0e09804ed5 100644 --- a/docs/en/Tutorials/Part-1.md +++ b/docs/en/Tutorials/Part-1.md @@ -199,7 +199,7 @@ This will add a new migration class to the project: ![bookstore-efcore-migration](./images/bookstore-efcore-migration.png) -> If you are using Visual Studio, you may want to use the `Add-Migration Created_Book_Entity -c BookStoreDbContext` and `Update-Database -Context BookStoreDbContext` commands in the *Package Manager Console (PMC)*. In this case, ensure that {{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer"}}`Acme.BookStore.Blazor`{{else if UI=="Blazor" || UI=="NG"}}`Acme.BookStore.HttpApi.Host`{{end}} is the startup project and `Acme.BookStore.EntityFrameworkCore` is the *Default Project* in PMC. +> If you are using Visual Studio, you may want to use the `Add-Migration Created_Book_Entity` and `Update-Database` commands in the *Package Manager Console (PMC)*. In this case, ensure that `Acme.BookStore.EntityFrameworkCore` is the startup project in Visual Studio and `Acme.BookStore.EntityFrameworkCore` is the *Default Project* in PMC. {{end}} diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index a384583175..b2ce526bd5 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -725,7 +725,7 @@ Book list page change is trivial. Open the `Pages/Books/Index.js` in the `Acme.B title: l('Type'), data: "type", render: function (data) { - return l('Enum:BookType:' + data); + return l('Enum:BookType.' + data); } }, ... diff --git a/docs/en/Tutorials/Part-2.md b/docs/en/Tutorials/Part-2.md index 4f056523ce..91b0453b53 100644 --- a/docs/en/Tutorials/Part-2.md +++ b/docs/en/Tutorials/Part-2.md @@ -132,22 +132,22 @@ Open the `en.json` (*the English translations*) file and change the content as s "CreationTime": "Creation time", "AreYouSure": "Are you sure?", "AreYouSureToDelete": "Are you sure you want to delete this item?", - "Enum:BookType.Undefined": "Undefined", - "Enum:BookType.Adventure": "Adventure", - "Enum:BookType.Biography": "Biography", - "Enum:BookType.Dystopia": "Dystopia", - "Enum:BookType.Fantastic": "Fantastic", - "Enum:BookType.Horror": "Horror", - "Enum:BookType.Science": "Science", - "Enum:BookType.ScienceFiction": "Science fiction", - "Enum:BookType.Poetry": "Poetry" + "Enum:BookType.0": "Undefined", + "Enum:BookType.1": "Adventure", + "Enum:BookType.2": "Biography", + "Enum:BookType.3": "Dystopia", + "Enum:BookType.4": "Fantastic", + "Enum:BookType.5": "Horror", + "Enum:BookType.6": "Science", + "Enum:BookType.7": "Science fiction", + "Enum:BookType.8": "Poetry" } } ```` * Localization key names are arbitrary. You can set any name. We prefer some conventions for specific text types; * Add `Menu:` prefix for menu items. - * Use `Enum:.` or `.` or `` naming convention to localize the enum members. When you do it like that, ABP can automatically localize the enums in some proper cases. + * Use `Enum:.` or `.` naming convention to localize the enum members. When you do it like that, ABP can automatically localize the enums in some proper cases. If a text is not defined in the localization file, it **falls back** to the localization key (as ASP.NET Core's standard behavior). @@ -279,7 +279,7 @@ $(function () { title: l('Type'), data: "type", render: function (data) { - return l('Enum:BookType:' + data); + return l('Enum:BookType.' + data); } }, { @@ -517,7 +517,7 @@ Open the `/src/app/book/book.component.html` and replace the content as shown be - {%{{{ '::Enum:BookType:' + row.type | abpLocalization }}}%} + {%{{{ '::Enum:BookType.' + row.type | abpLocalization }}}%} diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index dc92eec337..bc5e899f2d 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -232,7 +232,7 @@ $(function () { title: l('Type'), data: "type", render: function (data) { - return l('Enum:BookType:' + data); + return l('Enum:BookType.' + data); } }, { @@ -418,7 +418,7 @@ $(function () { title: l('Type'), data: "type", render: function (data) { - return l('Enum:BookType:' + data); + return l('Enum:BookType.' + data); } }, { @@ -556,7 +556,7 @@ $(function () { title: l('Type'), data: "type", render: function (data) { - return l('Enum:BookType:' + data); + return l('Enum:BookType.' + data); } }, { diff --git a/docs/en/Tutorials/Part-7.md b/docs/en/Tutorials/Part-7.md index 08c8636203..d60d030f13 100644 --- a/docs/en/Tutorials/Part-7.md +++ b/docs/en/Tutorials/Part-7.md @@ -90,7 +90,7 @@ You can apply changes to the database using the following command, in the same c dotnet ef database update ```` -> If you are using Visual Studio, you may want to use `Add-Migration Added_Authors -c BookStoreDbContext` and `Update-Database -Context BookStoreDbContext` commands in the *Package Manager Console (PMC)*. In this case, ensure that {{if UI=="MVC"}}`Acme.BookStore.Web`{{else if UI=="BlazorServer"}}`Acme.BookStore.Blazor`{{else if UI=="Blazor" || UI=="NG"}}`Acme.BookStore.HttpApi.Host`{{end}} is the startup project and `Acme.BookStore.EntityFrameworkCore` is the *Default Project* in PMC. +> If you are using Visual Studio, you may want to use the `Add-Migration Created_Book_Entity` and `Update-Database` commands in the *Package Manager Console (PMC)*. In this case, ensure that `Acme.BookStore.EntityFrameworkCore` is the startup project in Visual Studio and `Acme.BookStore.EntityFrameworkCore` is the *Default Project* in PMC. {{else if DB=="Mongo"}} diff --git a/docs/en/UI/AspNetCore/Forms-Validation.md b/docs/en/UI/AspNetCore/Forms-Validation.md index 48d7937013..257752a517 100644 --- a/docs/en/UI/AspNetCore/Forms-Validation.md +++ b/docs/en/UI/AspNetCore/Forms-Validation.md @@ -201,6 +201,27 @@ In this case, you can add an entry to the localization file using the key `MyNam > If you use the `[DisplayName]` but not add a corresponding entity to the localization file, then ABP Framework shows the given key as the field name, `MyNameKey` for this case. So, it provides a way to specify a hard coded display name even if you don't need to use the localization system. +### Enum Localization + +Enum members are also automatically localized wherever possible. For example, when we added `` to the form (like we did in the *ABP Form Tag Helpers* section), ABP can automatically fill the localized names of Enum members. To enabled it, you should define the localized values in your localization JSON file. Example entries for the `Genre` Enum defined in the *ABP Form Tag Helpers* section: + +````json +"Enum:Genre.0": "Classic movie", +"Enum:Genre.1": "Action movie", +"Enum:Genre.2": "Fiction", +"Enum:Genre.3": "Fantasy", +"Enum:Genre.4": "Animation/Cartoon" +```` + +You can use one of the following syntaxes for the localization keys: + +* `Enum:.` +* `.` + +> Remember that if you don't specify values for your Enum, the values will be ordered, starting from `0`. + +> MVC tag helpers also support using Enum member names instead of values (so, you can define `"Enum:Genre.Action"` instead of `"Enum:Genre.1"`, for example), but it is not suggested. Because, when you serialize Enum properties to JSON and send to clients, default serializer uses Enum values instead of Enum names. So, the Enum name won't be available to clients, and it will be a problem if you want to use the same localization values on the client side. + ## See Also * [Server Side Validation](../../Validation.md) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs index 350898d41d..9e60cbc75f 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs @@ -22,17 +22,20 @@ public class AbpSelectTagHelperService : AbpTagHelperService private readonly HtmlEncoder _encoder; private readonly IAbpTagHelperLocalizer _tagHelperLocalizer; private readonly IStringLocalizerFactory _stringLocalizerFactory; + private readonly IAbpEnumLocalizer _abpEnumLocalizer; public AbpSelectTagHelperService( IHtmlGenerator generator, HtmlEncoder encoder, IAbpTagHelperLocalizer tagHelperLocalizer, - IStringLocalizerFactory stringLocalizerFactory) + IStringLocalizerFactory stringLocalizerFactory, + IAbpEnumLocalizer abpEnumLocalizer) { _generator = generator; _encoder = encoder; _tagHelperLocalizer = tagHelperLocalizer; _stringLocalizerFactory = stringLocalizerFactory; + _abpEnumLocalizer = abpEnumLocalizer; } public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) @@ -264,22 +267,12 @@ public class AbpSelectTagHelperService : AbpTagHelperService foreach (var enumValue in enumType.GetEnumValues()) { - var memberName = enumType.GetEnumName(enumValue); - var localizedMemberName = AbpInternalLocalizationHelper.LocalizeWithFallback( + var localizedMemberName = _abpEnumLocalizer.GetString(enumType, enumValue, new[] { - containerLocalizer, - _stringLocalizerFactory.CreateDefaultOrNull() - }, - new[] - { - $"Enum:{enumType.Name}.{memberName}", - $"{enumType.Name}.{memberName}", - memberName - }, - memberName - ); - + containerLocalizer, + _stringLocalizerFactory.CreateDefaultOrNull() + }); selectItems.Add(new SelectListItem { Value = enumValue.ToString(), diff --git a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs index 500a3dfd86..1e3cf13549 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/AbpCrudPageBase.cs @@ -176,6 +176,7 @@ public abstract class AbpCrudPageBase< { [Inject] protected TAppService AppService { get; set; } [Inject] protected IStringLocalizer UiLocalizer { get; set; } + [Inject] public IAbpEnumLocalizer AbpEnumLocalizer { get; set; } protected virtual int PageSize { get; } = LimitedResultRequestDto.DefaultMaxResultCount; @@ -626,7 +627,7 @@ public abstract class AbpCrudPageBase< if (propertyInfo.Type.IsEnum) { column.ValueConverter = (val) => - EnumHelper.GetLocalizedMemberName(propertyInfo.Type, val.As().ExtraProperties[propertyInfo.Name], StringLocalizerFactory); + AbpEnumLocalizer.GetString(propertyInfo.Type, val.As().ExtraProperties[propertyInfo.Name], new IStringLocalizer[]{ StringLocalizerFactory.CreateDefaultOrNull() }); } yield return column; diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/EnumHelper.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/EnumHelper.cs index 773e906640..925476ae77 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/EnumHelper.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/EnumHelper.cs @@ -10,6 +10,7 @@ namespace Volo.Abp.BlazoriseUI.Components.ObjectExtending; public static class EnumHelper { + [Obsolete("Use IAbpEnumLocalizer instead.")] public static string GetLocalizedMemberName(Type enumType, object value, IStringLocalizerFactory stringLocalizerFactory) { var memberName = enumType.GetEnumName(value); @@ -20,7 +21,9 @@ public static class EnumHelper }, new[] { + $"Enum:{enumType.Name}.{value}", $"Enum:{enumType.Name}.{memberName}", + $"{enumType.Name}.{value}", $"{enumType.Name}.{memberName}", memberName }, diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionPropertyComponentBase.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionPropertyComponentBase.cs index 4408741fef..b2a5c1e48d 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionPropertyComponentBase.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/ExtensionPropertyComponentBase.cs @@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Components; using Microsoft.Extensions.Localization; using Volo.Abp.AspNetCore.Components.Web; using Volo.Abp.Data; +using Volo.Abp.Localization; using Volo.Abp.ObjectExtending; namespace Volo.Abp.BlazoriseUI.Components.ObjectExtending; @@ -17,6 +18,9 @@ public abstract class ExtensionPropertyComponentBase : O [Inject] public IStringLocalizerFactory StringLocalizerFactory { get; set; } + [Inject] + public IAbpEnumLocalizer AbpEnumLocalizer { get; set; } + [Inject] public IValidationMessageLocalizerAttributeFinder ValidationMessageLocalizerAttributeFinder { get; set; } diff --git a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs index ddc00a4c8b..32bb53c0fa 100644 --- a/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs +++ b/framework/src/Volo.Abp.BlazoriseUI/Components/ObjectExtending/SelectExtensionProperty.razor.cs @@ -30,7 +30,7 @@ public partial class SelectExtensionProperty selectItems.Add(new SelectItem { Value = (int)enumValue, - Text = EnumHelper.GetLocalizedMemberName(PropertyInfo.Type, enumValue, StringLocalizerFactory) + Text = AbpEnumLocalizer.GetString(PropertyInfo.Type, enumValue, new []{ StringLocalizerFactory.CreateDefaultOrNull() }) }); } diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizer.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizer.cs new file mode 100644 index 0000000000..3fc053da6a --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizer.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using Microsoft.Extensions.Localization; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Localization; + +public class AbpEnumLocalizer : IAbpEnumLocalizer, ITransientDependency +{ + protected readonly IStringLocalizerFactory StringLocalizerFactory; + + public AbpEnumLocalizer(IStringLocalizerFactory stringLocalizerFactory) + { + StringLocalizerFactory = stringLocalizerFactory; + } + + public virtual string GetString(Type enumType, object enumValue) + { + return GetStringInternal(enumType, enumValue, StringLocalizerFactory.CreateDefaultOrNull()); + } + + public virtual string GetString(Type enumType, object enumValue, params IStringLocalizer[] specifyLocalizers) + { + return GetStringInternal(enumType, enumValue, specifyLocalizers); + } + + protected virtual string GetStringInternal(Type enumType, object enumValue, params IStringLocalizer[] specifyLocalizers) + { + var memberName = enumType.GetEnumName(enumValue); + var localizedString = GetStringOrNull( + specifyLocalizers, + new[] + { + $"Enum:{enumType.Name}.{enumValue}", + $"Enum:{enumType.Name}.{memberName}", + $"{enumType.Name}.{enumValue}", + $"{enumType.Name}.{memberName}", + memberName + } + ); + + return localizedString ?? memberName; + } + + protected virtual string GetStringOrNull(IStringLocalizer[] localizers, IEnumerable keys) + { + foreach (var key in keys) + { + foreach (var l in localizers) + { + if (l == null) + { + continue; + } + + var localizedString = l[key]; + if (!localizedString.ResourceNotFound) + { + return localizedString.Value; + } + } + } + + return null; + } +} diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizerExtensions.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizerExtensions.cs new file mode 100644 index 0000000000..796ba0da9d --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpEnumLocalizerExtensions.cs @@ -0,0 +1,19 @@ +using System; +using Microsoft.Extensions.Localization; + +namespace Volo.Abp.Localization; + +public static class AbpEnumLocalizerExtensions +{ + public static string GetString(this IAbpEnumLocalizer abpEnumLocalizer, object enumValue) + where TEnum : Enum + { + return abpEnumLocalizer.GetString(typeof(TEnum), enumValue); + } + + public static string GetString(this IAbpEnumLocalizer abpEnumLocalizer, object enumValue, IStringLocalizer[] specifyLocalizers) + where TEnum : Enum + { + return abpEnumLocalizer.GetString(typeof(TEnum), enumValue, specifyLocalizers); + } +} diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpInternalLocalizationHelper.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpInternalLocalizationHelper.cs index 5386ea362e..f697ba1344 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpInternalLocalizationHelper.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/AbpInternalLocalizationHelper.cs @@ -1,4 +1,5 @@ -using Microsoft.Extensions.Localization; +using System; +using Microsoft.Extensions.Localization; namespace Volo.Abp.Localization; @@ -22,6 +23,7 @@ public static class AbpInternalLocalizationHelper /// Return value if none of the localizers has none of the keys. /// /// + [Obsolete("Use IAbpEnumLocalizer instead.")] public static string LocalizeWithFallback( IStringLocalizer[] localizers, string[] keys, diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/IAbpEnumLocalizer.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/IAbpEnumLocalizer.cs new file mode 100644 index 0000000000..cb88667e1c --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/IAbpEnumLocalizer.cs @@ -0,0 +1,11 @@ +using System; +using Microsoft.Extensions.Localization; + +namespace Volo.Abp.Localization; + +public interface IAbpEnumLocalizer +{ + string GetString(Type enumType, object enumValue); + + string GetString(Type enumType, object enumValue, IStringLocalizer[] specifyLocalizers); +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpEnumLocalizer_Tests.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpEnumLocalizer_Tests.cs new file mode 100644 index 0000000000..c53236809f --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpEnumLocalizer_Tests.cs @@ -0,0 +1,47 @@ +using Microsoft.Extensions.Localization; +using Shouldly; +using Volo.Abp.Localization.TestResources.Base.Validation; +using Volo.Abp.Testing; +using Xunit; + +namespace Volo.Abp.Localization; + +public class AbpEnumLocalizer_Tests : AbpIntegratedTest +{ + private readonly IAbpEnumLocalizer _enumLocalizer; + + public AbpEnumLocalizer_Tests() + { + _enumLocalizer = GetRequiredService(); + } + + [Fact] + public void GetString_Test() + { + using (CultureHelper.Use("en")) + { + _enumLocalizer.GetString(BookType.Undefined).ShouldBe("Undefined"); + _enumLocalizer.GetString(BookType.Adventure).ShouldBe("Adventure"); + _enumLocalizer.GetString(0).ShouldBe("Undefined with value 0"); + _enumLocalizer.GetString(1).ShouldBe("Adventure with value 1"); + _enumLocalizer.GetString(BookType.Biography).ShouldBe("Biography"); + + var specifyLocalizer = new[] + { + GetRequiredService().Create() + }; + _enumLocalizer.GetString(BookType.Undefined, specifyLocalizer).ShouldBe("Undefined from ValidationResource"); + _enumLocalizer.GetString(BookType.Adventure, specifyLocalizer).ShouldBe("Adventure from ValidationResource"); + _enumLocalizer.GetString(0, specifyLocalizer).ShouldBe("Undefined with value 0 from ValidationResource"); + _enumLocalizer.GetString(1, specifyLocalizer).ShouldBe("Adventure with value 1 from ValidationResource"); + _enumLocalizer.GetString(BookType.Biography, specifyLocalizer).ShouldBe("Biography from ValidationResource"); + } + } +} + +enum BookType +{ + Undefined, + Adventure, + Biography, +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalizationTestModule.cs b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalizationTestModule.cs index 910e442968..32835cb8f4 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalizationTestModule.cs +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/AbpLocalizationTestModule.cs @@ -19,6 +19,8 @@ public class AbpLocalizationTestModule : AbpModule Configure(options => { + options.DefaultResourceType = typeof(LocalizationTestResource); + options.Resources .Add("en") .AddVirtualJson("/Volo/Abp/Localization/TestResources/Base/Validation"); @@ -35,8 +37,8 @@ public class AbpLocalizationTestModule : AbpModule options.Resources .Get() .AddVirtualJson("/Volo/Abp/Localization/TestResources/SourceExt"); - + options.GlobalContributors.Add(); }); } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en.json index 6fd963947c..20f8bd4c69 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en.json +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/en.json @@ -2,6 +2,11 @@ "culture": "en", "texts": { "ThisFieldIsRequired": "This field is required", - "MaxLenghtErrorMessage": "This field can be maximum of '{0}' chars" + "MaxLenghtErrorMessage": "This field can be maximum of '{0}' chars", + "Enum:BookType.Undefined": "Undefined from ValidationResource", + "Enum:BookType.0": "Undefined with value 0 from ValidationResource", + "BookType.Adventure": "Adventure from ValidationResource", + "BookType.1": "Adventure with value 1 from ValidationResource", + "Biography": "Biography from ValidationResource" } -} \ No newline at end of file +} diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en.json index e18b39d241..f0be979f98 100644 --- a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en.json +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/en.json @@ -6,6 +6,11 @@ "CarPlural": "Cars", "MaxLenghtErrorMessage": "This field's length can be maximum of '{0}' chars", "Universe": "Universe", - "FortyTwo": "Forty Two" + "FortyTwo": "Forty Two", + "Enum:BookType.Undefined": "Undefined", + "Enum:BookType.0": "Undefined with value 0", + "BookType.Adventure": "Adventure", + "BookType.1": "Adventure with value 1", + "Biography": "Biography" } -} \ No newline at end of file +} diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json index 35b356274a..faec2b2a22 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/cs.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Na váš e-mail bude zaslán odkaz pro resetování hesla, pomocí kterého můžete heslo resetovat. Pokud e-mail během několika minut neobdržíte, zkuste to znovu.", "PasswordResetMailSentMessage": "E-mail pro obnovení účtu byl odeslán na vaši e-mailovou adresu. Pokud tento e-mail ve své doručené poště neuvidíte do 15 minut, vyhledejte jej ve složce nevyžádané pošty. Pokud to tam najdete, označte to jako -Not Junk-.", "ResetPassword": "Obnovit heslo", - "ConfirmPassword": "Potvrďte (zopakujte) heslo", + "ConfirmPassword": "Potvrďte heslo", "ResetPassword_Information": "Zadejte prosím své nové heslo.", "YourPasswordIsSuccessfullyReset": "Vaše heslo bylo úspěšně resetováno.", "GoToTheApplication": "Přejděte do aplikace", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json index 40092d7c9d..895638aede 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/da.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Et link til at nulstille dit kodeord vil blive sendt til din email. Hvis du ikke modtager en email indenfor et par minutter, venligst prøv igen.", "PasswordResetMailSentMessage": "Gendannelse af konto er sendt til din email. Hvis du ikke har modtaget emailen indenfor 15 minutter, kig i din spam folder. Hvis du finder den dér, venligst markér den som -Ikke Spam-. ", "ResetPassword": "Nulstil Kodeord", - "ConfirmPassword": "Bekræft (gentag) kodeordet", + "ConfirmPassword": "Bekræft kodeordet", "ResetPassword_Information": "Venligst indtast dit nye kodeord.", "YourPasswordIsSuccessfullyReset": "Dit kodeord blev ændret.", "GoToTheApplication": "Gå til applikationen", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json index 1e9b741462..fb1f4b7153 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/de.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Ein Link zum Zurücksetzen des Passworts wird an Ihre E-Mail gesendet. Wenn Sie innerhalb weniger Minuten keine E-Mail erhalten, versuchen Sie es erneut.", "PasswordResetMailSentMessage": "E-Mail zur Kontowiederherstellung an Ihre E-Mail-Adresse gesendet. Wenn Sie diese E-Mail nicht innerhalb von 15 Minuten in Ihrem Posteingang sehen, suchen Sie sie in Ihrem Junk-Mail-Ordner. Wenn Sie sie dort finden, markieren Sie sie bitte als -Kein Junk-. ", "ResetPassword": "Passwort zurücksetzen", - "ConfirmPassword": "Bestätigen (wiederholen) Sie das Passwort", + "ConfirmPassword": "Bestätigen Sie das Passwort", "ResetPassword_Information": "Bitte geben Sie Ihr neues Passwort ein.", "YourPasswordIsSuccessfullyReset": "Ihr Passwort wurde erfolgreich zurückgesetzt.", "GoToTheApplication": "Gehen Sie zur Anwendung", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json index 70f319968d..6a6788300d 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/el.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Θα αποσταλεί στο email σας ένας σύνδεσμος επαναφοράς κωδικού πρόσβασης μεσα απο τον οποιο θα μπορείτε να επαναφέρετε τον κωδικό πρόσβασής σας. Εάν δεν λάβετε ένα email μέσα σε λίγα λεπτά, δοκιμάστε ξανά.", "PasswordResetMailSentMessage": "Το email ανάκτησης λογαριασμού στάλθηκε στη διεύθυνση ηλεκτρονικού ταχυδρομείου σας. Εάν δεν δείτε αυτό το μήνυμα ηλεκτρονικού ταχυδρομείου στα εισερχόμενά σας εντός 15 λεπτών, αναζητήστε το στον φάκελο ανεπιθύμητης αλληλογραφίας σας. Εάν το βρείτε εκεί, σημειώστε το ως -Not Junk-.", "ResetPassword": "Επαναφορά Κωδικού Πρόσβασης", - "ConfirmPassword": "Επιβεβαιώστε (επαναλάβετε) τον κωδικό πρόσβασης", + "ConfirmPassword": "Επιβεβαιώστε τον κωδικό πρόσβασης", "ResetPassword_Information": "Εισαγάγετε τον νέο σας κωδικό πρόσβασης.", "YourPasswordIsSuccessfullyReset": "Ο κωδικός πρόσβασής σας επαναφέρθηκε με επιτυχία", "GoToTheApplication": "Μεταβείτε στην εφαρμογή", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json index 404cd88c2c..4f1486a78e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en-GB.json @@ -47,10 +47,10 @@ "ReturnToText": "Click here to return to the application", "OrLoginWith": "Or login with:", "ForgotPassword": "Forgot password?", - "SendPasswordResetLink_Information": "A password reset link will be sent to your email to reset your password. If you don't get an email within a few minutes, please re-try.", + "SendPasswordResetLink_Information": "A password reset link will be sent to your email to reset your password. If you don't get an email within a few minutes, please retry.", "PasswordResetMailSentMessage": "Account recovery email has been sent to your e-mail address. If you receive the email within 15 minutes, check your spam/junk folder. If you find it there, please mark it as -Not Junk-.", "ResetPassword": "Reset Password", - "ConfirmPassword": "Confirm (repeat) the password", + "ConfirmPassword": "Confirm the password", "ResetPassword_Information": "Please enter your new password.", "YourPasswordIsSuccessfullyReset": "Your password has been successfully reset.", "GoToTheApplication": "Go to the application", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json index 9bd2955f3e..706f92bbd5 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json @@ -50,10 +50,10 @@ "ReturnToText": "Click here to return to the application", "OrLoginWith": "Or login with:", "ForgotPassword": "Forgot password?", - "SendPasswordResetLink_Information": "A password reset link will be sent to your email to reset your password. If you don't get an email within a few minutes, please re-try.", + "SendPasswordResetLink_Information": "A password reset link will be sent to your email to reset your password. If you don't get an email within a few minutes, please retry.", "PasswordResetMailSentMessage": "Account recovery email sent to your e-mail address. If you don't see this email in your inbox within 15 minutes, look for it in your junk mail folder. If you find it there, please mark it as -Not Junk-. ", "ResetPassword": "Reset Password", - "ConfirmPassword": "Confirm (repeat) the password", + "ConfirmPassword": "Confirm the password", "ResetPassword_Information": "Please enter your new password.", "YourPasswordIsSuccessfullyReset": "Your password is successfully reset.", "GoToTheApplication": "Go to the application", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json index b417ec4d71..e7c5ee084e 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fa.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "پیوند بازنشانی گذرواژه برای بازنشانی گذرواژه به ایمیل شما ارسال می شود. اگر در عرض چند دقیقه ایمیلی دریافت نکردید, لطفاً دوباره امتحان کنید.", "PasswordResetMailSentMessage": "ایمیل بازیابی حساب به آدرس ایمیل شما ارسال می شود. اگر این ایمیل را در عرض 15 دقیقه در صندوق ورودی خود مشاهده نکردید, آن را در پوشه نامه های ناخواسته خود جستجو کنید. اگر آن را در آنجا پیدا کردید, لطفاً آن را به عنوان علامت گذاری کنید -آشغال نیست-. ", "ResetPassword": "بازنشانی گذرواژه", - "ConfirmPassword": "تأیید (تکرار) گذرواژه", + "ConfirmPassword": "تأیید گذرواژه", "ResetPassword_Information": "لطفاً گذرواژه جدید خود را وارد کنید.", "YourPasswordIsSuccessfullyReset": "گذرواژه شما با موفقیت بازنشانی شد.", "GoToTheApplication": "رفتن به برنامه", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json index b917834a53..f074deeabd 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fi.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Salasanan vaihtamislinkki lähetetään sähköpostiisi salasanan vaihtamiseksi. Jos et saa sähköpostia muutamassa minuutissa, yritä uudelleen.", "PasswordResetMailSentMessage": "Tilin palauttamisen sähköposti lähetetään sähköpostiosoitteeseesi. Jos et näe tätä sähköpostia postilaatikossa 15 minuutin kuluessa, etsi se roskapostikansiostasi. Jos löydät sen sieltä, merkitse se nimellä -Ei roskaa.", "ResetPassword": "Nollaa salasana", - "ConfirmPassword": "Vahvista (toista) salasana", + "ConfirmPassword": "Vahvista salasana", "ResetPassword_Information": "Anna uusi salasanasi.", "YourPasswordIsSuccessfullyReset": "Salasanasi on palautettu.", "GoToTheApplication": "Siirry sovellukseen", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json index d357e7fafd..b1e547652d 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/fr.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Un lien de réinitialisation du mot de passe sera envoyé à votre adresse e-mail pour réinitialiser votre mot de passe. Si vous ne recevez pas d'e-mail dans quelques minutes, veuillez réessayer.", "PasswordResetMailSentMessage": "E-mail de récupération de compte envoyé à votre adresse e-mail. Si vous ne voyez pas cet e-mail dans votre boîte de réception dans les 15 minutes, recherchez-le dans votre dossier de courrier indésirable. Si vous le trouvez là-bas, veuillez le marquer comme -Pas indésirable-.", "ResetPassword": "Réinitialiser le mot de passe", - "ConfirmPassword": "Confirmer (répéter) le mot de passe", + "ConfirmPassword": "Confirmer le mot de passe", "ResetPassword_Information": "Entrez votre nouveau mot de passe.", "YourPasswordIsSuccessfullyReset": "Votre mot de passe a été réinitialisé avec succès.", "GoToTheApplication": "Accédez à l’application", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json index 0dedd78fb9..fd93420216 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hi.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "पासवर्ड रीसेट करने के लिए आपके ईमेल पर एक पासवर्ड रीसेट लिंक भेजा जाएगा। यदि आपको कुछ मिनटों के भीतर ईमेल नहीं मिलता है, तो कृपया पुनः प्रयास करें।", "PasswordResetMailSentMessage": "खाता पुनर्प्राप्ति ईमेल आपके ई-मेल पते पर भेजी जाती है। यदि आप 15 मिनट के भीतर अपने इनबॉक्स में यह ईमेल नहीं देखते हैं, तो इसे अपने जंक मेल फ़ोल्डर में देखें। यदि आप इसे वहां पाते हैं, तो कृपया इसे चिह्नित करें -नहीं जोड़-।", "ResetPassword": "पासवर्ड रीसेट", - "ConfirmPassword": "पासवर्ड की पुष्टि करें (दोहराएं)", + "ConfirmPassword": "पासवर्ड की पुष्टि करें", "ResetPassword_Information": "कृपया अपना नया पासवर्ड दर्ज करें।", "YourPasswordIsSuccessfullyReset": "आपका पासवर्ड सफलतापूर्वक रीसेट हो गया है।", "GoToTheApplication": "एप्लिकेशन पर जाएं", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json index 5a49982146..665755a2dd 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hr.json @@ -53,7 +53,7 @@ "SendPasswordResetLink_Information": "Link za ponovno postavljanje lozinke bit će poslan na vašu e-poštu kako bi ste ponovno postavili lozinku. Ako ne dobijete e-poruku u roku od nekoliko minuta, pokušajte ponovo.", "PasswordResetMailSentMessage": "Poruka e-pošte za oporavak računa poslana je na vašu adresu e-pošte. Ako ne vidite ovu e-poruku u pristigloj pošti u roku od 15 minuta, potražite je u mapi bezvrijedne pošte. Ako poruku pronađete tamo, označite je kao -Nije smeće-. ", "ResetPassword": "Resetiranje lozinke", - "ConfirmPassword": "Potvrdite (ponovite) lozinku", + "ConfirmPassword": "Potvrdite lozinku", "ResetPassword_Information": "Unesite svoju novu lozinku.", "YourPasswordIsSuccessfullyReset": "Vaša lozinka je uspješno poništena.", "GoToTheApplication": "Idite na aplikaciju", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json index 30f578cb08..3c97fd290d 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Jelszó-visszaállítási linket küldünk az e-mailre a jelszó visszaállításához. Ha néhány percen belül nem kap e-mailt, próbálkozzon újra.", "PasswordResetMailSentMessage": "A fiók-helyreállítási e-mailt az Ön e-mail címére küldtük. Ha 15 percen belül nem látja ezt az e-mailt a beérkező levelek között, keresse meg a levélszemét mappájában. Ha ott találja, kérjük, jelölje meg: -Nem szemét-.", "ResetPassword": "Jelszó visszaállítása", - "ConfirmPassword": "Erősítse meg (ismételje meg) a jelszót", + "ConfirmPassword": "Erősítse meg a jelszót", "ResetPassword_Information": "Kérjük, írja be új jelszavát.", "YourPasswordIsSuccessfullyReset": "Jelszavát sikeresen visszaállította.", "GoToTheApplication": "Lépjen az alkalmazáshoz", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json index 744b483dba..e309962242 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/is.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Hlekkur til að endurstilla lykilorð verður sendur á netfangið þitt til að endurstilla lykilorðið þitt. Ef þú færð ekki tölvupóst innan nokkurra mínútna skaltu reyna aftur.", "PasswordResetMailSentMessage": "Hlekkur til að endurstilla aðganginn þinn verður sendur á netfangið þitt.Ef þú sérð ekki þennan tölvupóst í pósthólfinu þínu innan 15 mínútna skaltu leita að honum í ruslpóstmöppunni þinni. Ef þú finnur það þarna skaltu merkja það sem -Ekki rusl-.", "ResetPassword": "Endur stilla lykilorð", - "ConfirmPassword": "Staðfestu (endurtaktu) lykilorðið", + "ConfirmPassword": "Staðfestu lykilorðið", "ResetPassword_Information": "Sláðu inn nýja lykilorðið þitt.", "YourPasswordIsSuccessfullyReset": "Lykilorðið þitt var endurstillt.", "GoToTheApplication": "Farðu í forritið", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json index 830a01e507..6e4521c8f7 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/it.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Un link per reimpostare la password verrà inviato alla tua e-mail. Se non ricevi l'e-mail entro pochi minuti, riprova.", "PasswordResetMailSentMessage": "E-mail di recupero dell'account inviata al tuo indirizzo e-mail. Se non vedi questa e-mail nella tua posta in arrivo entro 15 minuti, cercala tra la posta indesiderata e in tal caso, contrassegna il messaggio come -No SPAM-.", "ResetPassword": "Resetta la password", - "ConfirmPassword": "Conferma (ripeti) la password", + "ConfirmPassword": "Conferma la password", "ResetPassword_Information": "Per favore inserisci la tua nuova password.", "YourPasswordIsSuccessfullyReset": "La tua password è stata reimpostata con successo.", "GoToTheApplication": "Vai all'applicazione", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json index 3238f1ceb9..b804e517a9 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/nl.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Er wordt een link voor het opnieuw instellen van uw wachtwoord naar uw e-mailadres gestuurd. Als u binnen een paar minuten geen e-mail ontvangt, probeer het dan opnieuw.", "PasswordResetMailSentMessage": "Er is een link voor het opnieuw instellen van uw wachtwoord naar uw e-mailadres gestuurd. Als u deze e-mail niet binnen 15 minuten in uw inbox ziet, zoek hem dan in uw map met ongewenste e-mail. Als u de mail daar vindt, markeer hem dan als niet ongewenst.", "ResetPassword": "Wachtwoord opnieuw instellen", - "ConfirmPassword": "Bevestig (herhaal) het wachtwoord", + "ConfirmPassword": "Bevestig het wachtwoord", "ResetPassword_Information": "Voer uw nieuwe wachtwoord in.", "YourPasswordIsSuccessfullyReset": "Uw wachtwoord is succesvol opnieuw ingesteld.", "GoToTheApplication": "Ga naar de applicatie", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json index 39bf144303..c3596c8aa5 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pl-PL.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Link do resetowania hasła zostanie wysłany na Twój adres e-mail, aby zresetować hasło. Jeśli nie otrzymasz e-maila w ciągu kilku minut, spróbuj ponownie.", "PasswordResetMailSentMessage": "E-mail odzyskiwania konta wysłany na Twój adres e-mail. Jeśli nie zobaczysz tego e-maila w skrzynce odbiorczej w ciągu 15 minut, poszukaj go w folderze ze spamem. Jeśli go tam znajdziesz, oznacz go jako -Nie śmieci-.", "ResetPassword": "Zresetuj hasło", - "ConfirmPassword": "Potwierdź (powtórz) hasło", + "ConfirmPassword": "Potwierdź hasło", "ResetPassword_Information": "Wprowadź nowe hasło.", "YourPasswordIsSuccessfullyReset": "Twoje hasło zostało pomyślnie zresetowane.", "GoToTheApplication": "Przejdź do aplikacji", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json index bf912a3d61..732d804bbe 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/pt-BR.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Um link de redefinição de senha será enviado ao seu e-mail para redefinir sua senha. Se você não receber um e-mail em alguns minutos, tente novamente.", "PasswordResetMailSentMessage": "E-mail de recuperação de conta enviado para o seu endereço de e-mail. Se você não vir este e-mail em sua caixa de entrada em 15 minutos, procure-o na pasta de lixo eletrônico. Se você encontrá-lo lá, marque-o como -Não é Lixo Eletrônico-.", "ResetPassword": "Redefinir senha", - "ConfirmPassword": "Confirme (repita) a senha", + "ConfirmPassword": "Confirme a senha", "ResetPassword_Information": "Por favor insira sua nova senha.", "YourPasswordIsSuccessfullyReset": "Sua senha foi redefinida com sucesso.", "GoToTheApplication": "Vá para o aplicativo", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json index 29de263594..c2a75c3401 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ro-RO.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Un link pentru resetarea parolei va fi trimis pe emailul dumneavoastră. Dacă nu primiţi un email în decurs de câteva minute, vă rugăm să reîncercaţi.", "PasswordResetMailSentMessage": "Emailul de recuperare al contului a fost trimis la adresa dumneavoastră de email. Dacă nu vedeţi acest email în decurs de 15 minute, cautaţi-l în dosarul de junk/spam. Dacă îl găsiţi acolo, vă rugăm să îl marcaţi ca -Not Junk-/-Not Spam-. ", "ResetPassword": "Resetaţi parola", - "ConfirmPassword": "Confirmaţi (repetaţi) parola", + "ConfirmPassword": "Confirmaţi parola", "ResetPassword_Information": "Vă rugăm să vă introduceţi noua parola.", "YourPasswordIsSuccessfullyReset": "Parola a fost resetată cu succes.", "GoToTheApplication": "Navigaţi la aplicaţie", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json index 2894feb09d..88250e8d03 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/ru.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "На вашу электронную почту будет отправлена ссылка для сброса пароля. Если вы не получите письмо в течение нескольких минут, повторите попытку.", "PasswordResetMailSentMessage": "Письмо для восстановления учетной записи отправлено на ваш адрес электронной почты. Если вы не видите это письмо в своем почтовом ящике в течение 15 минут, поищите его в папке нежелательной почты. Если вы найдете его там, отметьте его как «Не мусор».", "ResetPassword": "Сброс пароля", - "ConfirmPassword": "Подтвердите (повторите) пароль", + "ConfirmPassword": "Подтвердите пароль", "ResetPassword_Information": "Пожалуйста, введите ваш новый пароль.", "YourPasswordIsSuccessfullyReset": "Ваш пароль успешно сброшен.", "GoToTheApplication": "Зайти в приложение", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json index 37a1777351..6ca224455a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sk.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Na váš email vám bude odoslaný odkaz na obnovenie hesla. Ak do niekoľkých minút nedostanete email, skúste to znova.", "PasswordResetMailSentMessage": "Email o obnovení účtu bol odoslaný na vašu emailovú adresu. Ak tento email neuvidíte v doručenej pošte do 15 minút, pozrite sa do priečinku nevyžiadanej pošty (spam). Ak ho tam nájdete, označte ho ako -Nie je spam-.", "ResetPassword": "Obnoviť heslo", - "ConfirmPassword": "Potvrďte (zopakujte) heslo", + "ConfirmPassword": "Potvrďte heslo", "ResetPassword_Information": "Zadajte svoje nové heslo.", "YourPasswordIsSuccessfullyReset": "Vaše heslo bolo úspešne obnovené.", "GoToTheApplication": "Prejdite do aplikácie", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json index f8e68ca7e5..322e04cf76 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/sl.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "Na vaš e-poštni naslov bo poslana povezava za ponastavitev gesla za ponastavitev gesla. Če v nekaj minutah ne dobite e-poštnega sporočila, poskusite znova.", "PasswordResetMailSentMessage": "E-poštno sporočilo za obnovitev računa je bilo poslano na vaš e-poštni naslov. Če v 15 minutah tega e-poštnega sporočila ne vidite v mapi »Prejeto«, ga poiščite v mapi z neželeno pošto. Če ga najdete tam, ga prosimo označite kot -Ni neželeno-. ", "ResetPassword": "Ponastavitev gesla", - "ConfirmPassword": "Potrditev (ponovitev) gesla", + "ConfirmPassword": "Potrditev gesla", "ResetPassword_Information": "Prosimo vnesite vaše novo geslo.", "YourPasswordIsSuccessfullyReset": "Vaše geslo je uspešno ponastavljeno.", "GoToTheApplication": "Pojdite na aplikacijo", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json index 13ac03fe5d..c63eb86cef 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json @@ -53,7 +53,7 @@ "SendPasswordResetLink_Information": "E-posta adresinize bir şifre sıfırlama bağlantısı gönderilecektir. Birkaç dakika içerisinde bir e-posta almazsanız lütfen tekrar deneyin.", "PasswordResetMailSentMessage": "E-posta adresinize bir şifre sıfırlama bağlantısı gönderilmiştir. Lütfen e-posta adresinizi kontrol ediniz. Eğer 15 dakika içinde, bu e-postayı gelen kutusunda bulamazsanız, gereksiz veya istenmeyen e-posta kutularına bakınız.", "ResetPassword": "Şifre Yenileme", - "ConfirmPassword": "Şifre (tekrar)", + "ConfirmPassword": "Şifre Onay", "ResetPassword_Information": "Lütfen yeni şifrenizi belirleyin.", "YourPasswordIsSuccessfullyReset": "Şifreniz başarıyla sıfırlandı.", "GoToTheApplication": "Uygulamaya git", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json index de82983e22..e10ae3ebe1 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/vi.json @@ -50,7 +50,7 @@ "SendPasswordResetLink_Information": "Một liên kết đặt lại mật khẩu sẽ được gửi đến email của bạn để đặt lại mật khẩu của bạn. Nếu bạn không nhận được email trong vòng vài phút, vui lòng thử lại.", "PasswordResetMailSentMessage": "Email khôi phục tài khoản đã được gửi đến địa chỉ e-mail của bạn. Nếu bạn không thấy email này trong hộp thư đến của mình trong vòng 15 phút, hãy tìm nó trong thư mục thư rác của bạn. Nếu bạn tìm thấy nó ở đó, vui lòng đánh dấu nó là -Không phải rác-.", "ResetPassword": "Đặt lại mật khẩu", - "ConfirmPassword": "Xác nhận (lặp lại) mật khẩu", + "ConfirmPassword": "Xác nhận mật khẩu", "ResetPassword_Information": "Vui lòng nhập mật khẩu mới của bạn.", "YourPasswordIsSuccessfullyReset": "Mật khẩu của bạn đã được đặt lại thành công.", "GoToTheApplication": "Đi tới ứng dụng", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json index 9b723be748..37c8177620 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hans.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "密码重置链接将发送到您的电子邮件以重置密码. 如果您在几分钟内没有收到电子邮件,请重试.", "PasswordResetMailSentMessage": "帐户恢复电子邮件已发送到您的电子邮件地址. 如果您在15分钟内未在收件箱中看到此电子邮件,请检查垃圾邮件,并标记为非垃圾邮件.", "ResetPassword": "重设密码", - "ConfirmPassword": "确认(重复)密码", + "ConfirmPassword": "确认密码", "ResetPassword_Information": "请输入您的新密码.", "YourPasswordIsSuccessfullyReset": "您的密码已经被重置成功.", "GoToTheApplication": "转到应用程序", diff --git a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json index 794bf2afb2..4a13985c8a 100644 --- a/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/zh-Hant.json @@ -51,7 +51,7 @@ "SendPasswordResetLink_Information": "密碼重置鏈接將發送到您的電子郵件以重置密碼. 如果您在幾分鐘內沒有收到電子郵件,請重試.", "PasswordResetMailSentMessage": "帳戶恢復電子郵件已發送到您的電子郵件地址. 如果您在15分鐘內未在收件箱中看到此電子郵件,請檢查垃圾郵件,並標記為非垃圾郵件.", "ResetPassword": "重設密碼", - "ConfirmPassword": "確認(重復)密碼", + "ConfirmPassword": "確認密碼", "ResetPassword_Information": "請輸入您的新密碼.", "YourPasswordIsSuccessfullyReset": "您的密碼已經被重置成功.", "GoToTheApplication": "轉到應用程序", diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml index c076f6fa19..ca38284046 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Pages/FeatureManagement/FeatureManagementModal.cshtml @@ -130,7 +130,7 @@ } else { - + @L["NoFeatureFoundMessage"] } diff --git a/npm/ng-packs/package.json b/npm/ng-packs/package.json index 2fe293f895..e3bc100cd0 100644 --- a/npm/ng-packs/package.json +++ b/npm/ng-packs/package.json @@ -109,7 +109,7 @@ "lerna": "^4.0.0", "lint-staged": "^13.0.3", "ng-packagr": "15.0.1", - "ng-zorro-antd": "^14.0.0", + "ng-zorro-antd": "^15.0.0", "nx": "15.2.1", "postcss": "^8.3.9", "postcss-import": "14.1.0", diff --git a/npm/ng-packs/packages/components/package.json b/npm/ng-packs/packages/components/package.json index 566ff5e492..b1e9c57ef0 100644 --- a/npm/ng-packs/packages/components/package.json +++ b/npm/ng-packs/packages/components/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "chart.js": "^3.5.1", - "ng-zorro-antd": "^14.0.0", + "ng-zorro-antd": "^15.0.0", "tslib": "^2.0.0" }, "publishConfig": { diff --git a/npm/ng-packs/packages/theme-shared/src/lib/components/password/password.component.html b/npm/ng-packs/packages/theme-shared/src/lib/components/password/password.component.html index 3272e2bec9..b3ef2b68f4 100644 --- a/npm/ng-packs/packages/theme-shared/src/lib/components/password/password.component.html +++ b/npm/ng-packs/packages/theme-shared/src/lib/components/password/password.component.html @@ -6,14 +6,13 @@ [(ngModel)]="value" /> -