diff --git a/Directory.Packages.props b/Directory.Packages.props index 84a87de48c..09c9a476fd 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -34,14 +34,10 @@ - - - - - - - + + + diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json index e60ed4cf59..91f0fd81a3 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json @@ -1889,6 +1889,6 @@ "FaqIyzicoPaymentIssuesExplanation8": "ABP website doesn't save or process your credit card. We use payment gateways for this and the entire transaction is handled by payment gateways. We have no authority to interfere with the payment process or fix the payment steps. If you have further questions or need additional support, feel free to contact us at abp.io/contact.", "BiographyContainsUrlValidationMessage": "Biography cannot contain URL.", "CreatePostSEOTitleInfo": "SEO URL is a clean, readable, keyword-rich URL that helps both users and search engines understand what this post is about. Keep it short with 60 characters. SEO titles over 60 characters will be truncated. Use hyphens (-) to separate words (not underscores). Include target keywords near the start. Lowercase only. No stop words unless needed (e.g: \"and\", \"or\", \"the\").", - "SEOTitle": "SEO Title" + "SEOTitle": "SEO URL" } } diff --git a/docs/en/framework/architecture/modularity/basics.md b/docs/en/framework/architecture/modularity/basics.md index f92e6edc3b..2b3aaad214 100644 --- a/docs/en/framework/architecture/modularity/basics.md +++ b/docs/en/framework/architecture/modularity/basics.md @@ -1,7 +1,5 @@ # Modularity -## Introduction - ABP was designed to support to build fully modular applications and systems where every module may have entities, services, database integration, APIs, UI components and so on; * This document introduces the basics of the module system. diff --git a/docs/en/framework/fundamentals/configuration.md b/docs/en/framework/fundamentals/configuration.md index 7611017b7e..997d347d2a 100644 --- a/docs/en/framework/fundamentals/configuration.md +++ b/docs/en/framework/fundamentals/configuration.md @@ -1,3 +1,52 @@ # Configuration -ASP.NET Core has an flexible and extensible key-value based configuration system. In fact, the configuration system is a part of Microsoft.Extensions libraries and it is independent from ASP.NET Core. That means it can be used in any type of application. See [Microsoft's documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/) to learn the configuration infrastructure. ABP is 100% compatible with the configuration system. \ No newline at end of file +ASP.NET Core has an flexible and extensible key-value based configuration system. The configuration system is a part of Microsoft.Extensions libraries and it is independent from ASP.NET Core. That means it can be used in any type of application. + +See [Microsoft's documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/) to learn the configuration infrastructure. ABP is 100% compatible with the configuration system. + +## Getting the Configuration + +You may need to get the `IConfiguration` service in various places in your codebase. The following section shows two common ways. + +### In Module Classes + +You typically need to get configuration while initializing your application. You can get the `IConfiguration` service using the `ServiceConfigurationContext.Configuration` property inside your [module class](../architecture/modularity/basics.md) as the following example: + +````csharp +public class MyAppModule : AbpModule +{ + public override void ConfigureServices(ServiceConfigurationContext context) + { + var connectionString = context.Configuration["ConnectionStrings:Default"]; + } +} +```` + +`context.Configuration` is a shortcut property for the `context.Services.GetConfiguration()` method. In general, prefer using `context.Configuration` for simplicity and readability when working within module classes. Use `context.Services.GetConfiguration()` in other contexts where you have an `IServiceCollection` object but do not have access to the `context.Configuration` property. (`IServiceCollection.GetConfiguration` is an extension method that can be used whenever you have an `IServiceCollection` object). + +### In Your Services + +You can directly [inject](dependency-injection.md) the `IConfiguration` service into your services: + +````csharp +public class MyService : ITransientDependency +{ + private readonly IConfiguration _configuration; + + public MyService(IConfiguration configuration) + { + _configuration = configuration; + } + + public string? GetConnectionString() + { + return _configuration["ConnectionStrings:Default"]; + } +} +```` + +## See Also + +* [Microsoft's Configuration Documentation](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/configuration/) +* [The Options Pattern](options.md) + diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelper.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelper.cs index 62cae94413..af1538bbde 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelper.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpInputTagHelper.cs @@ -47,11 +47,13 @@ public class AbpInputTagHelper : AbpTagHelper } if (isCheckBox) { - output.Attributes.AddClass("custom-checkbox"); - output.Attributes.AddClass("custom-control"); + if (!TagHelper.UseSwitchCheckBox) + { + output.Attributes.AddClass("custom-checkbox"); + output.Attributes.AddClass("custom-control"); + } + else + { + output.Attributes.AddClass("form-switch"); + } + output.Attributes.AddClass("form-check"); } } @@ -266,7 +274,7 @@ public class AbpInputTagHelperService : AbpTagHelperService } protected virtual async Task GetLabelAsHtmlAsync(TagHelperContext context, TagHelperOutput output, TagHelperOutput inputTag, bool isCheckbox) - { + { if (IsOutputHidden(inputTag) || TagHelper.SuppressLabel) { return string.Empty; @@ -395,7 +403,7 @@ public class AbpInputTagHelperService : AbpTagHelperService } innerOutput.Content.AppendHtml($" "); } - + innerOutput.Content.AppendHtml(GetRequiredSymbol(context, output)); return innerOutput.Render(_encoder); diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs index de5f60ee4e..632bfa416e 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/AbpCachingModule.cs @@ -1,7 +1,5 @@ using Microsoft.Extensions.DependencyInjection; using System; -using Microsoft.Extensions.Caching.Hybrid; -using Microsoft.Extensions.DependencyInjection.Extensions; using Volo.Abp.Caching.Hybrid; using Volo.Abp.Json; using Volo.Abp.Modularity; diff --git a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/Hybrid/AbpHybridCache.cs b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/Hybrid/AbpHybridCache.cs index 2894af9f3d..66506a0b56 100644 --- a/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/Hybrid/AbpHybridCache.cs +++ b/framework/src/Volo.Abp.Caching/Volo/Abp/Caching/Hybrid/AbpHybridCache.cs @@ -75,7 +75,7 @@ public class AbpHybridCache : IHybridCache : IHybridCache>.Instance; KeyNormalizer = keyNormalizer; @@ -215,10 +215,15 @@ public class AbpHybridCache : IHybridCache(bytes, 0, bytes.Length));; + // Because HybridCache wraps the cache in L2(distributed cache), we can’t unwrap it directly and can only retrieve the value through its API + return await HybridCache.GetOrCreateAsync( + key: NormalizeKey(key), + factory: async cancel => await factory(), + options: optionsFactory?.Invoke(), + tags: null, + cancellationToken: token); } value = await factory(); diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ServiceConfigurationContext.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ServiceConfigurationContext.cs index 6141777cec..f1e55b85d8 100644 --- a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ServiceConfigurationContext.cs +++ b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/ServiceConfigurationContext.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using JetBrains.Annotations; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; namespace Volo.Abp.Modularity; @@ -8,6 +9,13 @@ public class ServiceConfigurationContext { public IServiceCollection Services { get; } + public IConfiguration Configuration { + get { + return _configuration ??= Services.GetConfiguration(); + } + } + private IConfiguration? _configuration; + public IDictionary Items { get; } /// @@ -29,4 +37,4 @@ public class ServiceConfigurationContext Services = Check.NotNull(services, nameof(services)); Items = new Dictionary(); } -} +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs index b25bd9ec6e..d151dc78df 100644 --- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs @@ -103,7 +103,7 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza { continue; } - + if (dictionaries.ContainsKey(dictionary.CultureName)) { throw new AbpException($"{file.GetVirtualOrPhysicalPathOrNull()} dictionary has a culture name '{dictionary.CultureName}' which is already defined! Localization resource: {_resource.ResourceName}"); @@ -121,7 +121,14 @@ public abstract class VirtualFileLocalizationResourceContributorBase : ILocaliza { using (var stream = file.CreateReadStream()) { - return CreateDictionaryFromFileContent(Utf8Helper.ReadStringFromStream(stream)); + try + { + return CreateDictionaryFromFileContent(Utf8Helper.ReadStringFromStream(stream)); + } + catch (Exception e) + { + throw new AbpException("Invalid localization file format: " + (file.GetVirtualOrPhysicalPathOrNull() ?? file.Name), e); + } } } diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj index e2328fdca3..524533f890 100644 --- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj +++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj @@ -16,9 +16,9 @@ - - - + + + diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj index a33c1c74f8..1b9925261b 100644 --- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj +++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj index a3f84bb18a..a1a1a47d2c 100644 --- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj +++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css index 881028a09d..d216a348af 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/wwwroot/libs/abp/css/theme.css @@ -82,10 +82,6 @@ div.dataTables_wrapper div.dataTables_length label { /* TEMP */ -.navbar-dark .navbar-nav .nav-link { - color: #000 !important; -} - .navbar-nav > .nav-item > .nav-link, .navbar-nav > .nav-item > .dropdown > .nav-link { color: #fff !important; diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml index 564bf1acd2..1e5f1b1fe7 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Account.cshtml @@ -35,6 +35,7 @@ + @if (!ThemingOptions.Value.BaseUrl.IsNullOrWhiteSpace()) { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml index c56c563017..6823d2b938 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Application.cshtml @@ -44,6 +44,7 @@ + @if (!ThemingOptions.Value.BaseUrl.IsNullOrWhiteSpace()) { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml index d88d1b7144..c2b2ae447c 100644 --- a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Themes/Basic/Layouts/Empty.cshtml @@ -42,6 +42,7 @@ + @if (!ThemingOptions.Value.BaseUrl.IsNullOrWhiteSpace()) { diff --git a/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/favicon.svg b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/favicon.svg new file mode 100644 index 0000000000..7610fe9a37 --- /dev/null +++ b/modules/basic-theme/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/wwwroot/themes/basic/favicon.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj index 61c0d81d02..f5c1f561af 100644 --- a/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj +++ b/modules/blob-storing-database/test/Volo.Abp.BlobStoring.Database.MongoDB.Tests/Volo.Abp.BlobStoring.Database.MongoDB.Tests.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj index 7dcac50e69..c71d73c65d 100644 --- a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj +++ b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj index 9c8dc44660..a537cf8943 100644 --- a/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj +++ b/modules/cms-kit/test/Volo.CmsKit.MongoDB.Tests/Volo.CmsKit.MongoDB.Tests.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj index 90df72d01d..2087f2118c 100644 --- a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj +++ b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj @@ -8,9 +8,9 @@ - - - + + + diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj index 2f7f5ee7d0..d11f989f7d 100644 --- a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj +++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj @@ -15,9 +15,9 @@ - - - + + + diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDynamicClaimsPrincipalContributorCache.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDynamicClaimsPrincipalContributorCache.cs index 6051914adc..c0b5023386 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDynamicClaimsPrincipalContributorCache.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDynamicClaimsPrincipalContributorCache.cs @@ -58,9 +58,9 @@ public class IdentityDynamicClaimsPrincipalContributorCache : ITransientDependen return emptyCacheItem; } - return await DynamicClaimCache.GetOrAddAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, tenantId), async () => + using (CurrentTenant.Change(tenantId)) { - using (CurrentTenant.Change(tenantId)) + return await DynamicClaimCache.GetOrAddAsync(AbpDynamicClaimCacheItem.CalculateCacheKey(userId, tenantId), async () => { Logger.LogDebug($"Filling dynamic claims cache for user: {userId}"); @@ -82,11 +82,11 @@ public class IdentityDynamicClaimsPrincipalContributorCache : ITransientDependen } return dynamicClaims; - } - }, () => new DistributedCacheEntryOptions - { - AbsoluteExpirationRelativeToNow = CacheOptions.Value.CacheAbsoluteExpiration - }); + }, () => new DistributedCacheEntryOptions + { + AbsoluteExpirationRelativeToNow = CacheOptions.Value.CacheAbsoluteExpiration + }); + } } public virtual async Task ClearAsync(Guid userId, Guid? tenantId = null) diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj index 311ee9fa69..f764dc3b93 100644 --- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj +++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj @@ -21,9 +21,9 @@ - - - + + + diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj index 07377805af..289276595e 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj @@ -21,9 +21,9 @@ - - - + + + diff --git a/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo.Abp.OpenIddict.MongoDB.Tests.csproj b/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo.Abp.OpenIddict.MongoDB.Tests.csproj index d5f8903293..60a422fd38 100644 --- a/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo.Abp.OpenIddict.MongoDB.Tests.csproj +++ b/modules/openiddict/test/Volo.Abp.OpenIddict.MongoDB.Tests/Volo.Abp.OpenIddict.MongoDB.Tests.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj index 0f9e0169e8..f42d7c0385 100644 --- a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj +++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj @@ -20,9 +20,9 @@ - - - + + + diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json index b5ef3930fb..ec35f5286f 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ar.json @@ -20,7 +20,7 @@ "Menu:Emailing": "إرسال بالبريد الإلكتروني", "Menu:TimeZone": "وحدة زمنية", "DisplayName:Timezone": "وحدة زمنية", - "TimezoneHelpText": "يُستخدم هذا الإعداد على مستوى التطبيق أو على أساس المستأجر. ستحاول الوحدة الزمنية الافتراضية استخدام وحدة زمنية المتصفح أو وحدة زمنية الخادم.", + "TimezoneHelpText": "تتيح لك هذه الميزة تعيين منطقة زمنية افتراضية لخادمك، بينما يمكن للمستخدمين اختيار منطقتهم الزمنية الخاصة. إذا اختلفت المنطقة الزمنية للمستخدم عن المنطقة الزمنية للخادم، فسيتم تعديل جميع الأوقات وفقًا لذلك. على سبيل المثال، مع تعيين الخادم على أوروبا/لندن(00:00) ومستخدم في أوروبا/باريس(+01:00)، سيتم تعديل الأوقات بساعة واحدة لذلك المستخدم. سيؤدي اختيار 'المنطقة الزمنية الافتراضية' إلى استخدام المنطقة الزمنية للخادم أو المتصفح تلقائيًا.", "DefaultTimeZone": "الوحدة الزمنية الافتراضية", "SmtpHost": "مضيف", "SmtpPort": "ميناء", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json index 0ad113214a..cd9d4d78d1 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/cs.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Zasílání e-mailem", "Menu:TimeZone": "Časové Pásmo", "DisplayName:Timezone": "Časové pásmo", - "TimezoneHelpText": "Toto nastavení se používá pro celou aplikaci nebo pro klienty. Výchozí časové pásmo se pokusí použít časové pásmo prohlížeče nebo serveru.", + "TimezoneHelpText": "Tato funkce vám umožňuje nastavit výchozí časové pásmo pro váš server, zatímco uživatelé si mohou vybrat své vlastní. Pokud se časové pásmo uživatele liší od časového pásma serveru, všechny časy budou odpovídajícím způsobem upraveny. Například, když je server nastaven na Evropa/Londýn(00:00) a uživatel je v Evropa/Paříž(+01:00), časy budou pro tohoto uživatele upraveny o 1 hodinu. Výběrem 'Výchozí časové pásmo' se automaticky použije časové pásmo serveru nebo prohlížeče.", "DefaultTimeZone": "Výchozí časové pásmo", "SmtpHost": "Hostitel", "SmtpPort": "Přístav", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json index a36781a157..7f8debc508 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/de.json @@ -20,7 +20,7 @@ "Menu:Emailing": "E-Mail senden", "Menu:TimeZone": "Zeitzone", "DisplayName:Timezone": "Zeitzone", - "TimezoneHelpText": "Diese Einstellung wird anwendungsweit oder mandantenbasiert verwendet.", + "TimezoneHelpText": "Diese Funktion ermöglicht es Ihnen, eine Standardzeitzone für Ihren Server festzulegen, während Benutzer ihre eigene auswählen können. Wenn sich die Zeitzone eines Benutzers von der des Servers unterscheidet, werden alle Zeiten entsprechend angepasst. Zum Beispiel: Wenn der Server auf Europa/London(00:00) eingestellt ist und ein Benutzer in Europa/Paris(+01:00) ist, werden die Zeiten für diesen Benutzer um 1 Stunde angepasst. Die Auswahl von 'Standardzeitzone' verwendet automatisch die Zeitzone des Servers oder Browsers.", "DefaultTimeZone": "Standardzeitzone", "DefaultTimeZoneInfo": "Die Standardzeitzone wird versuchen, die Zeitzone des Browsers oder des Servers zu verwenden.", "SmtpHost": "Gastgeber", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json index 1afbfa81cb..84933fe44b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/en.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Emailing", "Menu:TimeZone": "Time Zone", "DisplayName:Timezone": "Time zone", - "TimezoneHelpText": "This setting is used for application-wide or tenant-based. The default timezone will try to use the browser's or the server's timezone.", + "TimezoneHelpText": "This feature allows you to set a default time zone for your server, while users can select their own. If a user's time zone differs from the server's, all times will adjust accordingly. For example, with the server set to Europe/London(00:00) and a user in Europe/Paris(+01:00), times will be adjusted by 1 hour for that user. Selecting 'Default Timezone' will automatically use the server's or browser's time zone.", "DefaultTimeZone": "Default time zone", "SmtpHost": "Host", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json index 202404917c..bfc0ab6a3b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/es.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Configuración", "Menu:TimeZone": "Zona Horaria", "DisplayName:Timezone": "Zona horaria", - "TimezoneHelpText": "Esta configuración se utiliza para toda la aplicación o basada en inquilinos. La zona horaria predeterminada intentará usar la zona horaria del navegador o del servidor.", + "TimezoneHelpText": "Esta función le permite establecer una zona horaria predeterminada para su servidor, mientras que los usuarios pueden seleccionar la suya propia. Si la zona horaria de un usuario difiere de la del servidor, todas las horas se ajustarán en consecuencia. Por ejemplo, con el servidor configurado en Europa/Londres(00:00) y un usuario en Europa/París(+01:00), las horas se ajustarán 1 hora para ese usuario. Al seleccionar 'Zona horaria predeterminada' se utilizará automáticamente la zona horaria del servidor o del navegador.", "DefaultTimeZone": "Zona horaria predeterminada", "SmtpHost": "Host", "SmtpPort": "Puerto", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json index 24ffd3fd5c..f9b52baf2b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fi.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Sähköpostiviestit", "Menu:TimeZone": "Aikavyöhyke", "DisplayName:Timezone": "Aikavyöhyke", - "TimezoneHelpText": "Tätä asetusta käytetään sovelluksenlaajuisesti tai vuokraajakohtaisesti. Oletusaikavyöhyke yrittää käyttää selaimen tai palvelimen aikavyöhykettä.", + "TimezoneHelpText": "Tämä ominaisuus antaa sinun asettaa oletusaikavyöhykkeen palvelimellesi, kun taas käyttäjät voivat valita oman aikavyöhykkeensä. Jos käyttäjän aikavyöhyke poikkeaa palvelimen aikavyöhykkeestä, kaikki ajat mukautetaan vastaavasti. Esimerkiksi, kun palvelin on asetettu Eurooppa/Lontoo(00:00) ja käyttäjä on Eurooppa/Pariisi(+01:00), ajat mukautetaan tunnilla kyseiselle käyttäjälle. 'Oletusaikavyöhyke' -valinta käyttää automaattisesti palvelimen tai selaimen aikavyöhykettä.", "DefaultTimeZone": "Oletusaikavyöhyke", "SmtpHost": "Isäntä", "SmtpPort": "Portti", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json index eb2c2f6620..758e9a090c 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/fr.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Envoi par e-mail", "Menu:TimeZone": "Fuseau Horaire", "DisplayName:Timezone": "Fuseau horaire", - "TimezoneHelpText": "Ce paramètre est utilisé à l'échelle de l'application ou basé sur le client. Le fuseau horaire par défaut tentera d'utiliser le fuseau horaire du navigateur ou du serveur.", + "TimezoneHelpText": "Cette fonctionnalité vous permet de définir un fuseau horaire par défaut pour votre serveur, tandis que les utilisateurs peuvent sélectionner le leur. Si le fuseau horaire d'un utilisateur diffère de celui du serveur, tous les horaires seront ajustés en conséquence. Par exemple, avec le serveur réglé sur Europe/Londres(00:00) et un utilisateur en Europe/Paris(+01:00), les horaires seront ajustés d'une heure pour cet utilisateur. La sélection de 'Fuseau horaire par défaut' utilisera automatiquement le fuseau horaire du serveur ou du navigateur.", "DefaultTimeZone": "Fuseau horaire par défaut", "SmtpHost": "Hôte", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json index ae23e424f2..8dacb200e4 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hi.json @@ -20,7 +20,7 @@ "Menu:Emailing": "ईमेल से भेजना", "Menu:TimeZone": "समय क्षेत्र", "DisplayName:Timezone": "समय क्षेत्र", - "TimezoneHelpText": "इस सेटिंग का उपयोग एप्लिकेशन-व्यापी या किरायेदार-आधारित के लिए किया जाता है। डिफ़ॉल्ट समय क्षेत्र ब्राउज़र या सर्वर के समय क्षेत्र का उपयोग करने का प्रयास करेगा।", + "TimezoneHelpText": "यह सुविधा आपको अपने सर्वर के लिए एक डिफ़ॉल्ट समय क्षेत्र सेट करने की अनुमति देती है, जबकि उपयोगकर्ता अपना स्वयं का चुन सकते हैं। यदि किसी उपयोगकर्ता का समय क्षेत्र सर्वर के समय क्षेत्र से भिन्न है, तो सभी समय तदनुसार समायोजित किए जाएंगे। उदाहरण के लिए, सर्वर को यूरोप/लंदन(00:00) पर सेट किए जाने पर और एक उपयोगकर्ता यूरोप/पेरिस(+01:00) में होने पर, उस उपयोगकर्ता के लिए समय 1 घंटे के लिए समायोजित किया जाएगा। 'डिफ़ॉल्ट समय क्षेत्र' का चयन स्वचालित रूप से सर्वर या ब्राउज़र के समय क्षेत्र का उपयोग करेगा।", "DefaultTimeZone": "डिफ़ॉल्ट समय क्षेत्र", "SmtpHost": "मेज़बान", "SmtpPort": "बंदरगाह", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json index 02347180a6..133233a10f 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hr.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Slanje e-poštom", "Menu:TimeZone": "Vremenska Zona", "DisplayName:Timezone": "Vremenska zona", - "TimezoneHelpText": "Ova se postavka koristi za cijelu aplikaciju ili zakupce.", + "TimezoneHelpText": "Ova značajka omogućuje vam postavljanje zadanog vremenskog pojasa za vaš poslužitelj, dok korisnici mogu odabrati svoj vlastiti. Ako se vremenski pojas korisnika razlikuje od vremenskog pojasa poslužitelja, sva vremena će se prilagoditi u skladu s tim. Na primjer, kada je poslužitelj postavljen na Europa/London(00:00) i korisnik je u Europa/Pariz(+01:00), vremena će se prilagoditi za 1 sat za tog korisnika. Odabirom 'Zadani vremenski pojas' automatski će se koristiti vremenski pojas poslužitelja ili preglednika.", "DefaultTimeZone": "Zadana vremenska zona", "DefaultTimeZoneInfo": "Zadana vremenska zona pokušat će koristiti vremensku zonu preglednika ili poslužitelja.", "SmtpHost": "Domaćin", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json index 1273c17f50..4aed2b5688 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json @@ -20,7 +20,7 @@ "Menu:Emailing": "E-mailezés", "Menu:TimeZone": "Időzóna", "DisplayName:Timezone": "Időzóna", - "TimezoneHelpText": "Ez a beállítás az egész alkalmazásra vagy a bérlőre vonatkozik. Az alapértelmezett időzóna megpróbálja használni a böngésző vagy a szerver időzónáját.", + "TimezoneHelpText": "Ez a funkció lehetővé teszi, hogy alapértelmezett időzónát állítson be a szerveréhez, miközben a felhasználók sajátot választhatnak. Ha egy felhasználó időzónája eltér a szerver időzónájától, az összes idő ennek megfelelően módosul. Például, ha a szerver Európa/London(00:00) időzónára van állítva, és egy felhasználó Európa/Párizs(+01:00) időzónában van, az időket 1 órával módosítják ennél a felhasználónál. Az 'Alapértelmezett időzóna' kiválasztása automatikusan a szerver vagy a böngésző időzónáját használja.", "DefaultTimeZone": "Alapértelmezett időzóna", "SmtpHost": "Házigazda", "SmtpPort": "Kikötő", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json index d6b1bd1f21..2106b156bc 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/is.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Senda tölvupóst", "Menu:TimeZone": "Tímabelti", "DisplayName:Timezone": "Tímabelti", - "TimezoneHelpText": "Þessi stilling er notuð fyrir allt forrit eða leigjanda. Sjálfgefna tímabeltið mun reyna að nota tímabelti vafrans eða þjónsins.", + "TimezoneHelpText": "Þessi eiginleiki gerir þér kleift að setja sjálfgefna tímabelti fyrir þjóninn þinn, á meðan notendur geta valið sitt eigið. Ef tímabelti notanda er frábrugðið tímabelti þjónsins, verða allir tímar aðlagaðir í samræmi við það. Til dæmis, þegar þjónninn er stilltur á Evrópa/London(00:00) og notandi er í Evrópa/París(+01:00), verða tímar aðlagaðir um 1 klukkutíma fyrir þann notanda. Með því að velja 'Sjálfgefið tímabelti' verður sjálfkrafa notað tímabelti þjónsins eða vafrans.", "DefaultTimeZone": "Sjálfgefitt tímabelti", "SmtpHost": "Smtp Host", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json index 4f27439374..487078c449 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/it.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Invio di e-mail", "Menu:TimeZone": "Fuso Orario", "DisplayName:Timezone": "Fuso orario", - "TimezoneHelpText": "Questa impostazione viene utilizzata per l'intera applicazione o in base al tenant. Il fuso orario predefinito tenterà di utilizzare il fuso orario del browser o del server.", + "TimezoneHelpText": "Questa funzione ti permette di impostare un fuso orario predefinito per il tuo server, mentre gli utenti possono selezionare il proprio. Se il fuso orario di un utente differisce da quello del server, tutti gli orari verranno adeguati di conseguenza. Ad esempio, con il server impostato su Europa/Londra(00:00) e un utente in Europa/Parigi(+01:00), gli orari verranno adeguati di 1 ora per quell'utente. Selezionando 'Fuso orario predefinito' verrà utilizzato automaticamente il fuso orario del server o del browser.", "DefaultTimeZone": "Fuso orario predefinito", "SmtpHost": "Host", "SmtpPort": "Porta", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json index 806b8006c3..06f07346e5 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/nl.json @@ -20,7 +20,7 @@ "Menu:Emailing": "E-mail", "Menu:TimeZone": "Tijdzone", "DisplayName:Timezone": "Tijdzone", - "TimezoneHelpText": "Deze instelling wordt gebruikt voor de hele toepassing of op tenantbasis. De standaardtijdzone zal proberen de tijdzone van de browser of de server te gebruiken.", + "TimezoneHelpText": "Deze functie stelt u in staat om een standaardtijdzone in te stellen voor uw server, terwijl gebruikers hun eigen tijdzone kunnen kiezen. Als de tijdzone van een gebruiker verschilt van die van de server, worden alle tijden dienovereenkomstig aangepast. Bijvoorbeeld, met de server ingesteld op Europa/Londen(00:00) en een gebruiker in Europa/Parijs(+01:00), worden de tijden met 1 uur aangepast voor die gebruiker. Door 'Standaardtijdzone' te selecteren wordt automatisch de tijdzone van de server of browser gebruikt.", "DefaultTimeZone": "Standaardtijdzone", "SmtpHost": "Host", "SmtpPort": "Poort", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json index 5b5c3c5c43..35038ee043 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pl-PL.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Wysyłanie e-maili", "Menu:TimeZone": "Strefa Czasowa", "DisplayName:Timezone": "Strefa czasowa", - "TimezoneHelpText": "To ustawienie jest używane w przypadku całej aplikacji lub opartej na dzierżawie. Domyślna strefa czasowa spróbuje użyć strefy czasowej przeglądarki lub serwera.", + "TimezoneHelpText": "Ta funkcja pozwala ustawić domyślną strefę czasową dla serwera, podczas gdy użytkownicy mogą wybrać własną. Jeśli strefa czasowa użytkownika różni się od strefy czasowej serwera, wszystkie czasy zostaną odpowiednio dostosowane. Na przykład, gdy serwer jest ustawiony na Europa/Londyn(00:00), a użytkownik jest w Europie/Paryżu(+01:00), czasy zostaną dostosowane o 1 godzinę dla tego użytkownika. Wybranie opcji 'Domyślna strefa czasowa' automatycznie wykorzysta strefę czasową serwera lub przeglądarki.", "DefaultTimeZone": "Domyślna strefa czasowa", "SmtpHost": "Gospodarz", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json index 5baf3abff9..9a8cf0317b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/pt-BR.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Enviando por e-mail", "Menu:TimeZone": "Fuso Horário", "DisplayName:Timezone": "Fuso horário", - "TimezoneHelpText": "Essa configuração é usada para todo o aplicativo ou com base em locatário. O fuso horário padrão tentará usar o fuso horário do navegador ou do servidor.", + "TimezoneHelpText": "Este recurso permite que você defina um fuso horário padrão para seu servidor, enquanto os usuários podem selecionar o seu próprio. Se o fuso horário de um usuário for diferente do fuso horário do servidor, todos os horários serão ajustados de acordo. Por exemplo, com o servidor definido como Europa/Londres(00:00) e um usuário na Europa/Paris(+01:00), os horários serão ajustados em 1 hora para esse usuário. Selecionar 'Fuso horário padrão' usará automaticamente o fuso horário do servidor ou do navegador.", "DefaultTimeZone": "Fuso horário padrão", "SmtpHost": "Hospedeiro", "SmtpPort": "Porta", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json index b14d3703dd..8029a43734 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ro-RO.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Emailing", "Menu:TimeZone": "Fus Orar", "DisplayName:Timezone": "Fus orar", - "TimezoneHelpText": "Această setare este utilizată pentru aplicație sau pentru chiriași. Fusul orar implicit va încerca să folosească fusul orar al browserului sau al serverului.", + "TimezoneHelpText": "Această funcționalitate vă permite să setați un fus orar implicit pentru serverul dvs., în timp ce utilizatorii pot selecta propriul lor. Dacă fusul orar al unui utilizator diferă de cel al serverului, toate orele vor fi ajustate în consecință. De exemplu, cu serverul setat la Europa/Londra(00:00) și un utilizator în Europa/Paris(+01:00), orele vor fi ajustate cu 1 oră pentru acel utilizator. Selectarea 'Fus orar implicit' va folosi automat fusul orar al serverului sau browserului.", "DefaultTimeZone": "Fus orar implicit", "SmtpHost": "Host", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json index 788a4e23d1..0ab1535a3b 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/ru.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Отправка по электронной почте", "Menu:TimeZone": "Часовой пояс", "DisplayName:Timezone": "Часовой пояс", - "TimezoneHelpText": "Этот параметр используется для всего приложения или на уровне клиента. Часовой пояс по умолчанию попытается использовать часовой пояс браузера или сервера.", + "TimezoneHelpText": "Эта функция позволяет вам установить часовой пояс по умолчанию для вашего сервера, в то время как пользователи могут выбрать свой собственный. Если часовой пояс пользователя отличается от часового пояса сервера, все время будет соответствующим образом скорректировано. Например, если сервер установлен на Европа/Лондон(00:00), а пользователь находится в Европа/Париж(+01:00), время будет скорректировано на 1 час для этого пользователя. При выборе 'Часовой пояс по умолчанию' будет автоматически использоваться часовой пояс сервера или браузера.", "DefaultTimeZone": "Часовой пояс по умолчанию", "SmtpHost": "Хозяин", "SmtpPort": "Порт", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json index 13b8dce96b..1c68a43ae5 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sk.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Posielanie emailov", "Menu:TimeZone": "Časové Pásmo", "DisplayName:Timezone": "Časové pásmo", - "TimezoneHelpText": "Toto nastavenie sa používa pre celú aplikáciu alebo pre nájomníkov. Predvolené časové pásmo sa pokúsi použiť časové pásmo prehliadača alebo servera.", + "TimezoneHelpText": "Táto funkcia vám umožňuje nastaviť predvolené časové pásmo pre váš server, zatiaľ čo používatelia si môžu vybrať svoje vlastné. Ak sa časové pásmo používateľa líši od časového pásma servera, všetky časy sa príslušne upravia. Napríklad, keď je server nastavený na Európa/Londýn(00:00) a používateľ je v Európa/Paríž(+01:00), časy sa pre tohto používateľa upravia o 1 hodinu. Výberom 'Predvolené časové pásmo' sa automaticky použije časové pásmo servera alebo prehliadača.", "DefaultTimeZone": "Predvolené časové pásmo", "SmtpHost": "Host", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json index d79e045fd7..4805b28994 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/sl.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Pošiljanje po e-pošti", "Menu:TimeZone": "Časovni Pas", "DisplayName:Timezone": "Časovni pas", - "TimezoneHelpText": "Ta nastavitev se uporablja za celotno aplikacijo ali za najemnika. Privzeto časovno pas bo poskusilo uporabiti časovni pas brskalnika ali strežnika.", + "TimezoneHelpText": "Ta funkcija vam omogoča nastavitev privzetega časovnega pasu za vaš strežnik, medtem ko lahko uporabniki izberejo svojega. Če se časovni pas uporabnika razlikuje od časovnega pasu strežnika, se vsi časi ustrezno prilagodijo. Na primer, ko je strežnik nastavljen na Evropa/London(00:00) in je uporabnik v Evropa/Pariz(+01:00), se časi za tega uporabnika prilagodijo za 1 uro. Z izbiro 'Privzeti časovni pas' se samodejno uporabi časovni pas strežnika ali brskalnika.", "DefaultTimeZone": "Privzeto časovno pas", "SmtpHost": "Gostitelj", "SmtpPort": "pristanišče", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json index ad2cbbb8ef..3b7fc2ac5f 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/tr.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Email", "Menu:TimeZone": "Zaman Dilimi", "DisplayName:Timezone": "Zaman dilimi", - "TimezoneHelpText": "Bu ayar uygulama genelinde veya müşteri tabanlı olarak kullanılır. Varsayılan saat dilimi, tarayıcının veya sunucunun saat dilimini kullanmaya çalışacaktır.", + "TimezoneHelpText": "Bu özellik, kullanıcılar kendi saat dilimlerini seçebilirken, sunucunuz için varsayılan bir saat dilimi ayarlamanıza olanak tanır. Bir kullanıcının saat dilimi sunucunun saat diliminden farklıysa, tüm saatler buna göre ayarlanacaktır. Örneğin, sunucu Avrupa/Londra(00:00) olarak ayarlandığında ve bir kullanıcı Avrupa/Paris(+01:00)'te olduğunda, o kullanıcı için saatler 1 saat ayarlanacaktır. 'Varsayılan Saat Dilimi' seçimi otomatik olarak sunucunun veya tarayıcının saat dilimini kullanacaktır.", "DefaultTimeZone": "Varsayılan saat dilimi", "SmtpHost": "Sunucu", "SmtpPort": "Port", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json index 200c437d44..a9cc466fdb 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/vi.json @@ -20,7 +20,7 @@ "Menu:Emailing": "Gửi email", "Menu:TimeZone": "Múi Giờ", "DisplayName:Timezone": "Múi giờ", - "TimezoneHelpText": "Cài đặt này được sử dụng cho toàn bộ ứng dụng hoặc dựa trên đối tượng thuê. Múi giờ mặc định sẽ cố gắng sử dụng múi giờ của trình duyệt hoặc máy chủ.", + "TimezoneHelpText": "Tính năng này cho phép bạn đặt múi giờ mặc định cho máy chủ của mình, trong khi người dùng có thể chọn múi giờ của riêng họ. Nếu múi giờ của người dùng khác với múi giờ của máy chủ, tất cả thời gian sẽ được điều chỉnh tương ứng. Ví dụ: với máy chủ được đặt ở Châu Âu/Luân Đôn(00:00) và người dùng ở Châu Âu/Paris(+01:00), thời gian sẽ được điều chỉnh 1 giờ cho người dùng đó. Chọn 'Múi giờ mặc định' sẽ tự động sử dụng múi giờ của máy chủ hoặc trình duyệt.", "DefaultTimeZone": "Múi giờ mặc định", "SmtpHost": "Tổ chức", "SmtpPort": "Hải cảng", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json index 76e9cd3526..3aad0b9e8a 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hans.json @@ -20,7 +20,7 @@ "Menu:Emailing": "邮件", "Menu:TimeZone": "时区", "DisplayName:Timezone": "时区", - "TimezoneHelpText": "此设置用于应用程序范围或基于租户。默认时区将尝试使用浏览器的时区或服务器的时区。", + "TimezoneHelpText": "此功能允许您为服务器设置默认时区,同时用户可以选择自己的时区。如果用户的时区与服务器的时区不同,所有时间将相应调整。例如,如果服务器设置为欧洲/伦敦(00:00),而用户在欧洲/巴黎(+01:00),则该用户的时间将调整1小时。选择'默认时区'将自动使用服务器或浏览器的时区。", "DefaultTimeZone": "默认时区", "SmtpHost": "主机", "SmtpPort": "端口", diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json index 8ce6679659..77c586efe4 100644 --- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/zh-Hant.json @@ -20,7 +20,7 @@ "Menu:Emailing": "信箱", "Menu:TimeZone": "時區", "DisplayName:Timezone": "時區", - "TimezoneHelpText": "此設置用於應用程序範圍或基於租戶。預設時區將嘗試使用瀏覽器的時區或伺服器的時區。", + "TimezoneHelpText": "此功能允許您為伺服器設置預設時區,同時用戶可以選擇自己的時區。如果用戶的時區與伺服器的時區不同,所有時間將相應調整。例如,如果伺服器設置為歐洲/倫敦(00:00),而用戶在歐洲/巴黎(+01:00),則該用戶的時間將調整1小時。選擇'預設時區'將自動使用伺服器或瀏覽器的時區。", "DefaultTimeZone": "預設時區", "SmtpHost": "主機", "SmtpPort": "Port", diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj index 9c2c2f36a9..9bbb27387d 100644 --- a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj +++ b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj index 2913a0ed53..4ad25e0218 100644 --- a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj +++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html index a1ce082608..cca0f284f9 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html +++ b/npm/ng-packs/packages/components/extensible/src/lib/components/extensible-table/extensible-table.component.html @@ -49,18 +49,33 @@ @if (!row['_' + prop.name].component) { -
+ } @else { +
+ [ngClass]="entityPropTypeClasses[prop.type]" + [class.pointer]="prop.action" + > + } } @else { ' @@ -156,12 +154,6 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn switch (prop.type) { case ePropType.Boolean: return this.getIcon(value); - case ePropType.Date: - return this.getDate(value, getShortDateFormat(this.config)); - case ePropType.Time: - return this.getDate(value, getShortTimeFormat(this.config)); - case ePropType.DateTime: - return this.getDate(value, getShortDateShortTimeFormat(this.config)); case ePropType.Enum: return this.getEnum(value, prop.enumList || []); default: @@ -196,6 +188,10 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn provide: PROP_DATA_STREAM, useValue: value, }, + { + provide: ROW_RECORD, + useValue: record, + }, ], parent: this.#injector, }); @@ -231,8 +227,8 @@ export class ExtensibleTableComponent implements OnChanges, AfterViewIn ngAfterViewInit(): void { this.list?.requestStatus$?.pipe(filter(status => status === 'loading')).subscribe(() => { - this.data = []; - this.cdr.markForCheck(); - }); + this.data = []; + this.cdr.markForCheck(); + }); } } diff --git a/npm/ng-packs/packages/components/extensible/src/lib/tokens/extensions.token.ts b/npm/ng-packs/packages/components/extensible/src/lib/tokens/extensions.token.ts index 0a2df45a00..bafaf29908 100644 --- a/npm/ng-packs/packages/components/extensible/src/lib/tokens/extensions.token.ts +++ b/npm/ng-packs/packages/components/extensible/src/lib/tokens/extensions.token.ts @@ -18,6 +18,9 @@ export const PROP_DATA_STREAM = new InjectionToken>('PROP_DATA_S type EntityPropTypeClassMap = { [key in ePropType]: string; }; + +export const ROW_RECORD = new InjectionToken('ROW_RECORD'); + export type EntityPropTypeClass = Partial; export const ENTITY_PROP_TYPE_CLASSES = new InjectionToken( 'ENTITY_PROP_TYPE_CLASSES', diff --git a/npm/ng-packs/packages/core/ng-package.json b/npm/ng-packs/packages/core/ng-package.json index b73dba2fb7..9f9100d2fa 100644 --- a/npm/ng-packs/packages/core/ng-package.json +++ b/npm/ng-packs/packages/core/ng-package.json @@ -9,6 +9,7 @@ "angular-oauth2-oidc", "just-compare", "just-clone", - "ts-toolbelt" + "ts-toolbelt", + "luxon" ] } diff --git a/npm/ng-packs/packages/core/package.json b/npm/ng-packs/packages/core/package.json index b5efd135b9..7a10820ead 100644 --- a/npm/ng-packs/packages/core/package.json +++ b/npm/ng-packs/packages/core/package.json @@ -11,7 +11,8 @@ "just-clone": "^6.0.0", "just-compare": "^2.0.0", "ts-toolbelt": "^9.0.0", - "tslib": "^2.0.0" + "tslib": "^2.0.0", + "luxon": "^3.0.0" }, "publishConfig": { "access": "public" diff --git a/npm/ng-packs/packages/core/src/lib/core.module.ts b/npm/ng-packs/packages/core/src/lib/core.module.ts index 45d1a64ba4..22cd1183a4 100644 --- a/npm/ng-packs/packages/core/src/lib/core.module.ts +++ b/npm/ng-packs/packages/core/src/lib/core.module.ts @@ -3,6 +3,7 @@ import { provideHttpClient, withInterceptorsFromDi, withXsrfConfiguration, + HTTP_INTERCEPTORS, } from '@angular/common/http'; import { ModuleWithProviders, NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @@ -30,6 +31,7 @@ import { ShortTimePipe } from './pipes/short-time.pipe'; import { ShortDatePipe } from './pipes/short-date.pipe'; import { SafeHtmlPipe } from './pipes/safe-html.pipe'; import { provideAbpCoreChild, provideAbpCore, withOptions } from './providers'; +import { UtcToLocalPipe } from './pipes'; const CORE_DIRECTIVES = [ AutofocusDirective, diff --git a/npm/ng-packs/packages/core/src/lib/interceptors/index.ts b/npm/ng-packs/packages/core/src/lib/interceptors/index.ts index d7479a7684..ddcc17e23d 100644 --- a/npm/ng-packs/packages/core/src/lib/interceptors/index.ts +++ b/npm/ng-packs/packages/core/src/lib/interceptors/index.ts @@ -1 +1,2 @@ export * from './api.interceptor'; +export * from './timezone.interceptor'; diff --git a/npm/ng-packs/packages/core/src/lib/interceptors/timezone.interceptor.ts b/npm/ng-packs/packages/core/src/lib/interceptors/timezone.interceptor.ts new file mode 100644 index 0000000000..7e3a887361 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/interceptors/timezone.interceptor.ts @@ -0,0 +1,26 @@ +import { inject, Injectable } from '@angular/core'; +import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; +import { TimezoneService } from '../services'; +import { Observable } from 'rxjs'; + +@Injectable({ + providedIn: 'root', +}) +export class TimezoneInterceptor implements HttpInterceptor { + protected readonly timezoneService = inject(TimezoneService); + + intercept(req: HttpRequest, next: HttpHandler): Observable> { + if (!this.timezoneService.isUtcClockEnabled) { + return next.handle(req); + } + const timezone = this.timezoneService.timezone; + if (timezone) { + req = req.clone({ + setHeaders: { + __timezone: timezone, + }, + }); + } + return next.handle(req); + } +} diff --git a/npm/ng-packs/packages/core/src/lib/localization.module.ts b/npm/ng-packs/packages/core/src/lib/localization.module.ts index a82cbbb10b..0a69e236c7 100644 --- a/npm/ng-packs/packages/core/src/lib/localization.module.ts +++ b/npm/ng-packs/packages/core/src/lib/localization.module.ts @@ -1,5 +1,6 @@ import { NgModule } from '@angular/core'; import { LocalizationPipe } from './pipes/localization.pipe'; +import { LazyLocalizationPipe } from './pipes'; /** * @deprecated Use `LocalizationPipe` directly as a standalone pipe. @@ -7,7 +8,7 @@ import { LocalizationPipe } from './pipes/localization.pipe'; */ @NgModule({ - exports: [LocalizationPipe], - imports: [LocalizationPipe], + exports: [LocalizationPipe, LazyLocalizationPipe], + imports: [LocalizationPipe, LazyLocalizationPipe], }) export class LocalizationModule {} diff --git a/npm/ng-packs/packages/core/src/lib/pipes/index.ts b/npm/ng-packs/packages/core/src/lib/pipes/index.ts index 1a981ca041..cbfc8f77e9 100644 --- a/npm/ng-packs/packages/core/src/lib/pipes/index.ts +++ b/npm/ng-packs/packages/core/src/lib/pipes/index.ts @@ -5,3 +5,5 @@ export * from './to-injector.pipe'; export * from './short-date.pipe'; export * from './short-time.pipe'; export * from './short-date-time.pipe'; +export * from './utc-to-local.pipe'; +export * from './lazy-localization.pipe'; diff --git a/npm/ng-packs/packages/core/src/lib/pipes/lazy-localization.pipe.ts b/npm/ng-packs/packages/core/src/lib/pipes/lazy-localization.pipe.ts new file mode 100644 index 0000000000..b715b25ad8 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/pipes/lazy-localization.pipe.ts @@ -0,0 +1,41 @@ +import { inject, Injectable, Pipe, PipeTransform } from '@angular/core'; +import { + Observable, + of, + filter, + take, + switchMap, + map, + startWith, + distinctUntilChanged, +} from 'rxjs'; +import { ConfigStateService, LocalizationService } from '../services'; + +@Injectable() +@Pipe({ + name: 'abpLazyLocalization', +}) +export class LazyLocalizationPipe implements PipeTransform { + private localizationService = inject(LocalizationService); + private configStateService = inject(ConfigStateService); + + transform(key: string, ...params: (string | string[])[]): Observable { + if (!key) { + return of(''); + } + + const flatParams = params.reduce( + (acc, val) => (Array.isArray(val) ? acc.concat(val) : [...acc, val]), + [], + ); + + return this.configStateService.getAll$().pipe( + filter(config => !!config.localization), + take(1), + switchMap(() => this.localizationService.get(key, ...flatParams)), + map(translation => (translation && translation !== key ? translation : '')), + startWith(''), + distinctUntilChanged(), + ); + } +} diff --git a/npm/ng-packs/packages/core/src/lib/pipes/utc-to-local.pipe.ts b/npm/ng-packs/packages/core/src/lib/pipes/utc-to-local.pipe.ts new file mode 100644 index 0000000000..1f06aba74f --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/pipes/utc-to-local.pipe.ts @@ -0,0 +1,50 @@ +import { Pipe, PipeTransform, Injectable, inject, LOCALE_ID } from '@angular/core'; +import { ConfigStateService, LocalizationService, TimeService, TimezoneService } from '../services'; +import { getShortDateFormat, getShortDateShortTimeFormat, getShortTimeFormat } from '../utils'; + +@Injectable() +@Pipe({ + name: 'abpUtcToLocal', +}) +export class UtcToLocalPipe implements PipeTransform { + protected readonly timezoneService = inject(TimezoneService); + protected readonly timeService = inject(TimeService); + protected readonly configState = inject(ConfigStateService); + protected readonly localizationService = inject(LocalizationService); + protected readonly locale = inject(LOCALE_ID); + + transform( + value: string | Date | null | undefined, + type: 'date' | 'datetime' | 'time', + ): string | Date { + if (!value) return ''; + + const date = new Date(value); + if (isNaN(date.getTime())) return ''; + + const format = this.getFormat(type); + + try { + if (this.timezoneService.isUtcClockEnabled) { + const timeZone = this.timezoneService.timezone; + return this.timeService.formatDateWithStandardOffset(date, format, timeZone); + } else { + return this.timeService.formatWithoutTimeZone(date, format); + } + } catch (err) { + return value; + } + } + + private getFormat(propType: 'date' | 'datetime' | 'time'): string { + switch (propType) { + case 'date': + return getShortDateFormat(this.configState); + case 'time': + return getShortTimeFormat(this.configState); + case 'datetime': + default: + return getShortDateShortTimeFormat(this.configState); + } + } +} diff --git a/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts b/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts index 2b44117acb..fafb51ff6d 100644 --- a/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts +++ b/npm/ng-packs/packages/core/src/lib/providers/core-module-config.provider.ts @@ -1,6 +1,7 @@ import { makeEnvironmentProviders, Provider, inject, provideAppInitializer } from '@angular/core'; import { TitleStrategy } from '@angular/router'; import { + HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, withXsrfConfiguration, @@ -24,6 +25,7 @@ import { DEFAULT_DYNAMIC_LAYOUTS } from '../constants'; import { LocalizationService, LocalStorageListenerService, AbpTitleStrategy } from '../services'; import { DefaultQueueManager, getInitialData, localeInitializer } from '../utils'; import { CookieLanguageProvider, IncludeLocalizationResourcesProvider, LocaleProvider } from './'; +import { TimezoneInterceptor } from '../interceptors'; export enum CoreFeatureKind { Options, @@ -128,6 +130,11 @@ export function provideAbpCore(...features: CoreFeature[]) { provide: TitleStrategy, useExisting: AbpTitleStrategy, }, + { + provide: HTTP_INTERCEPTORS, + useClass: TimezoneInterceptor, + multi: true, + }, ]; for (const feature of features) { diff --git a/npm/ng-packs/packages/core/src/lib/services/index.ts b/npm/ng-packs/packages/core/src/lib/services/index.ts index c47bef3106..6b006be74e 100644 --- a/npm/ng-packs/packages/core/src/lib/services/index.ts +++ b/npm/ng-packs/packages/core/src/lib/services/index.ts @@ -23,3 +23,5 @@ export * from './window.service'; export * from './internet-connection-service'; export * from './local-storage-listener.service'; export * from './title-strategy.service'; +export * from './timezone.service'; +export * from './time.service'; diff --git a/npm/ng-packs/packages/core/src/lib/services/time.service.ts b/npm/ng-packs/packages/core/src/lib/services/time.service.ts new file mode 100644 index 0000000000..4161d55d07 --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/services/time.service.ts @@ -0,0 +1,107 @@ +import { inject, Injectable, LOCALE_ID } from '@angular/core'; +import { DateTime } from 'luxon'; + +@Injectable({ + providedIn: 'root', +}) +export class TimeService { + private locale = inject(LOCALE_ID); + + /** + * Returns the current date and time in the specified timezone. + * + * @param zone - An IANA timezone name (e.g., 'Europe/Istanbul', 'UTC'); defaults to the system's local timezone. + * @returns A Luxon DateTime instance representing the current time in the given timezone. + */ + now(zone = 'local'): DateTime { + return DateTime.now().setZone(zone); + } + + /** + * Converts the input date to the specified timezone, applying any timezone and daylight saving time (DST) adjustments. + * + * This method: + * 1. Parses the input value into a Luxon DateTime object. + * 2. Applies the specified IANA timezone, including any DST shifts based on the given date. + * + * @param value - The ISO string or Date object to convert. + * @param zone - An IANA timezone name (e.g., 'America/New_York'). + * @returns A Luxon DateTime instance adjusted to the specified timezone and DST rules. + */ + toZone(value: string | Date, zone: string): DateTime { + return DateTime.fromISO(value instanceof Date ? value.toISOString() : value, { + zone, + }); + } + + /** + * Formats the input date by applying timezone and daylight saving time (DST) adjustments. + * + * This method: + * 1. Converts the input date to the specified timezone. + * 2. Formats the result using the given format and locale, reflecting any timezone or DST shifts. + * + * @param value - The ISO string or Date object to format. + * @param format - The format string (default: 'ff'). + * @param zone - Optional IANA timezone name (e.g., 'America/New_York'); defaults to the system's local timezone. + * @returns A formatted date string adjusted for the given timezone and DST rules. + */ + format(value: string | Date, format = 'ff', zone = 'local'): string { + return this.toZone(value, zone).setLocale(this.locale).toFormat(format); + } + + /** + * Formats a date using the standard time offset (ignoring daylight saving time) for the specified timezone. + * + * This method: + * 1. Converts the input date to UTC. + * 2. Calculates the standard UTC offset for the given timezone (based on January 1st to avoid DST). + * 3. Applies the standard offset manually to the UTC time. + * 4. Formats the result using the specified format and locale, without applying additional timezone shifts. + * + * @param value - The ISO string or Date object to format. + * @param format - The Luxon format string (default: 'ff'). + * @param zone - Optional IANA timezone name (e.g., 'America/New_York'); if omitted, system local timezone is used. + * @returns A formatted date string adjusted by standard time (non-DST). + */ + formatDateWithStandardOffset(value: string | Date, format = 'ff', zone?: string): string { + const utcDate = + typeof value === 'string' + ? DateTime.fromISO(value, { zone: 'UTC' }) + : DateTime.fromJSDate(value, { zone: 'UTC' }); + + if (!utcDate.isValid) return ''; + + const targetZone = zone ?? DateTime.local().zoneName; + + const januaryDate = DateTime.fromObject( + { year: utcDate.year, month: 1, day: 1 }, + { zone: targetZone }, + ); + const standardOffset = januaryDate.offset; + const dateWithStandardOffset = utcDate.plus({ minutes: standardOffset }); + + return dateWithStandardOffset.setZone('UTC').setLocale(this.locale).toFormat(format); + } + + /** + * Formats the input date using its original clock time, without converting based on timezone or DST + * + * This method: + * 1. Converts the input date to ISO string. + * 2. Calculates the date time in UTC, keeping the local time. + * 3. Formats the result using the specified format and locale, without shifting timezones. + * + * @param value - The ISO string or Date object to format. + * @param format - The format string (default: 'ff'). + * @returns A formatted date string without applying timezone. + */ + formatWithoutTimeZone(value: string | Date, format = 'ff'): string { + const isoString = value instanceof Date ? value.toISOString() : value; + + const dateTime = DateTime.fromISO(isoString) + .setZone('utc', { keepLocalTime: true }) + .setLocale(this.locale); + return dateTime.toFormat(format); + } +} diff --git a/npm/ng-packs/packages/core/src/lib/services/timezone.service.ts b/npm/ng-packs/packages/core/src/lib/services/timezone.service.ts new file mode 100644 index 0000000000..2d6c103dcd --- /dev/null +++ b/npm/ng-packs/packages/core/src/lib/services/timezone.service.ts @@ -0,0 +1,63 @@ +import { inject, Injectable } from '@angular/core'; +import { DOCUMENT } from '@angular/common'; +import { ConfigStateService } from './config-state.service'; + +@Injectable({ + providedIn: 'root', +}) +export class TimezoneService { + protected readonly configState = inject(ConfigStateService); + protected readonly document = inject(DOCUMENT); + private readonly cookieKey = '__timezone'; + private timeZoneNameFromSettings: string | null | undefined; + public isUtcClockEnabled: boolean | undefined; + + constructor() { + this.configState.getOne$('setting').subscribe(settings => { + this.timeZoneNameFromSettings = settings?.values?.['Abp.Timing.TimeZone']; + }); + this.configState.getOne$('clock').subscribe(clock => { + this.isUtcClockEnabled = clock?.kind === 'Utc'; + }); + } + + /** + * Returns the effective timezone to be used across the application. + * + * This value is determined based on the clock kind setting in the configuration: + * - If clock kind is not equal to Utc, the browser's local timezone is returned. + * - If clock kind is equal to Utc, the configured timezone (`timeZoneNameFromSettings`) is returned if available; + * otherwise, the browser's timezone is used as a fallback. + * + * @returns The IANA timezone name (e.g., 'Europe/Istanbul', 'America/New_York'). + */ + get timezone(): string { + if (!this.isUtcClockEnabled) { + return this.getBrowserTimezone(); + } + return this.timeZoneNameFromSettings || this.getBrowserTimezone(); + } + + /** + * Retrieves the browser's local timezone based on the user's system settings. + * + * @returns The IANA timezone name (e.g., 'Europe/Istanbul', 'America/New_York'). + */ + getBrowserTimezone(): string { + return Intl.DateTimeFormat().resolvedOptions().timeZone; + } + + /** + * Sets the application's timezone in a cookie to persist the user's selected timezone. + * + * This method sets the cookie only if the clock kind setting is set to UTC. + * The cookie is stored using the key defined by `this.cookieKey` and applied to the root path (`/`). + * + * @param timezone - The IANA timezone name to be stored (e.g., 'Europe/Istanbul'). + */ + setTimezone(timezone: string): void { + if (this.isUtcClockEnabled) { + this.document.cookie = `${this.cookieKey}=${timezone}; path=/`; + } + } +} diff --git a/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html b/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html index 77e190957f..9f4fdd900d 100644 --- a/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html +++ b/npm/ng-packs/packages/theme-basic/src/lib/components/routes/routes.component.html @@ -12,7 +12,7 @@ @if (route.iconClass) { } - {{ route.name | abpLazyTranslate | async }} + {{ route.name | abpLazyLocalization | async }} @@ -39,7 +39,7 @@ @if (route.iconClass) { } - {{ route.name | abpLazyTranslate | async }} + {{ route.name | abpLazyLocalization | async }}
{ - return this.configStateService.getAll$().pipe( - filter(config => !!config.localization), - take(1), - switchMap(() => this.localizationService.get(key)), - shareReplay({ bufferSize: 1, refCount: true }), - ); - } -} diff --git a/npm/ng-packs/packages/theme-basic/src/public-api.ts b/npm/ng-packs/packages/theme-basic/src/public-api.ts index ec57cc892e..5c607ca06d 100644 --- a/npm/ng-packs/packages/theme-basic/src/public-api.ts +++ b/npm/ng-packs/packages/theme-basic/src/public-api.ts @@ -6,7 +6,6 @@ export * from './lib/components'; export * from './lib/enums'; export * from './lib/handlers'; export * from './lib/models'; -export * from './lib/pipes'; export * from './lib/providers'; export * from './lib/theme-basic.module'; export * from './lib/tokens'; diff --git a/npm/packs/core/src/abp.js b/npm/packs/core/src/abp.js index 3b0fe25095..f117c4d5f1 100644 --- a/npm/packs/core/src/abp.js +++ b/npm/packs/core/src/abp.js @@ -780,7 +780,7 @@ var abp = abp || {}; var formattedDate = now.toLocaleString('en-US', { timeZone: timeZone, timeZoneName: 'longOffset' }); var match = formattedDate.match(/GMT([+-]\d+)/); var targetOffsetHours = match ? parseInt(match[1], 10) : 0; - var dateObj = new Date(dateObj.getTime() - (targetOffsetHours * 60 * 60 * 1000)); + dateObj = new Date(dateObj.getTime() - (targetOffsetHours * 60 * 60 * 1000)); addZulu = true; } diff --git a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj index bff0099e07..68848d75c2 100644 --- a/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj +++ b/templates/app/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj @@ -16,9 +16,9 @@ - - - + + + diff --git a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj index 60bd4f1fe8..f29fb32a5a 100644 --- a/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj +++ b/templates/module/aspnet-core/test/MyCompanyName.MyProjectName.MongoDB.Tests/MyCompanyName.MyProjectName.MongoDB.Tests.csproj @@ -11,9 +11,9 @@ - - - + + +