diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/POST.md b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/POST.md new file mode 100644 index 0000000000..049171731b --- /dev/null +++ b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/POST.md @@ -0,0 +1,477 @@ +# Replacing Email Templates and Sending Emails + +## Introduction + +Hi, in this step by step article, we will send an email by using standard email template and then we will replace the standard email template with our new created template, thanks to [Text Templating System](https://docs.abp.io/en/abp/latest/Text-Templating#replacing-the-existing-templates) and [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). Let's start by explaining what these systems do. + +* ABP framework provides a strong and flexible [Text Templating System](https://docs.abp.io/en/abp/latest/Text-Templating). So, we can use the text templating system to create dynamic email contents on a template and a model. + +* In this article, we will use `StandardEmailTemplates.Message` as standard email template. Then we will create a new template and replace the standard email template with our new template by using [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). + +* The `Virtual File System` makes it possible to manage files that do not physically exist on the file system. That means we can override `StandardEmailTemplates.Message` template by changing it's path with our new template's path. + +## Creating the Solution + +> ABP Framework offers startup templates to get into the business faster. + +In this article, I will create a new startup template and perform the operations on this template. But if you already have a project you don't need to create a new startup template, you can implement the following steps to your existing project. (These steps can be applied to any project. (MVC, Angular etc.)) + +> If you have already a project you can skip this section. + +Before starting to development, we will create a solution named `TemplateReplace` (or whatever you want). We can create a new startup template by using [ABP CLI](https://docs.abp.io/en/abp/latest/CLI) : + +````bash +abp new TemplateReplace +```` + +Our project boilerplate will be ready after the download is finished. Then, open the solution in the Visual Studio (or your favorite IDE). + +Run the `TemplateReplace.DbMigrator` application as below to create the database and seed initial data (which creates the admin user, admin role, permissions etc.). + +![db-migrator-1](db-migrator-1.jpg) + +* Right click to `TemplateReplace.DbMigrator` and choose the `Debug`. + +![db-migrator-2](db-migrator-2.jpg) + +* After that, click the `Start new instance` option to start the database migrations. + +![db-migrator-3](db-migrator-3.jpg) + +Then we can run the `TemplateReplace.Web` project to see our application working. + +> _Default login credentials for admin: username is **admin** and password is **1q2w3E\***_ + +## Starting the Development + +First thing we need to do is, creating a email service to sending emails. ABP Framework provides `IEmailSender` service that is used to send emails. + +### Step - 1 + +Create an `Emailing` folder in the `TemplateReplace.Domain` project and add a class named `EmailService` inside of it. + +```csharp +using System.Threading.Tasks; +using Volo.Abp.DependencyInjection; +using Volo.Abp.Emailing; +using Volo.Abp.Emailing.Templates; +using Volo.Abp.TextTemplating; + +namespace TemplateReplace.Emailing +{ + public class EmailService : ITransientDependency + { + private readonly IEmailSender _emailSender; + private readonly ITemplateRenderer _templateRenderer; + + public EmailService(IEmailSender emailSender, ITemplateRenderer templateRenderer) + { + _emailSender = emailSender; + _templateRenderer = templateRenderer; + } + + public async Task SendAsync(string targetEmail) + { + var emailBody = await _templateRenderer.RenderAsync( + StandardEmailTemplates.Message, + new + { + message = "ABP Framework provides IEmailSender service that is used to send emails." + } + ); + + await _emailSender.SendAsync( + targetEmail, + "Subject", + emailBody + ); + } + } +} +``` + +* To create an email content, we need to inject `ITemplateRenderer` and use the `RenderAsync` method to render a template. + +* We've used `StandardEmailTemplates.Message` as standart email template. This provides us a standard and simple message template to send mails. + +* The resulting email body should be like shown below: + +```html + + + + + + + ABP Framework provides IEmailSender service that is used to send emails. + + +``` + +### Step - 2 (Configuring Email Settings) + +* Now, we need to configure some email settings by following [settings documentation](https://docs.abp.io/en/abp/latest/Settings#setting-values-in-the-application-configuration). For achieve this, open the `appsettings.json` file under `TemplateReplace.Web` and configure your email settings in **settings** section like below. + +![appsettings.json](settings.jpg) + +* Here, I used Google's SMTP settings to send emails via Gmail. You can change these setting values by your need. + +> **Note:** If you want to use Google's SMTP server settings and send emails via Gmail, you should confirm [this](https://myaccount.google.com/u/0/lesssecureapps). + +### Step - 3 + +* After that we need to open `TemplateReplaceDomainModule.cs` file and change its contents as below to sending real-time emails. + +```csharp +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using TemplateReplace.MultiTenancy; +using Volo.Abp.AuditLogging; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.Emailing; +using Volo.Abp.FeatureManagement; +using Volo.Abp.Identity; +using Volo.Abp.IdentityServer; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.IdentityServer; +using Volo.Abp.SettingManagement; +using Volo.Abp.TenantManagement; + +namespace TemplateReplace +{ + [DependsOn( + typeof(TemplateReplaceDomainSharedModule), + typeof(AbpAuditLoggingDomainModule), + typeof(AbpBackgroundJobsDomainModule), + typeof(AbpFeatureManagementDomainModule), + typeof(AbpIdentityDomainModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpIdentityServerDomainModule), + typeof(AbpPermissionManagementDomainIdentityServerModule), + typeof(AbpSettingManagementDomainModule), + typeof(AbpTenantManagementDomainModule), + typeof(AbpEmailingModule) + )] + public class TemplateReplaceDomainModule : AbpModule + { + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + var settingManager = context.ServiceProvider.GetService(); + //encrypts the password on set and decrypts on get + settingManager.SetGlobalAsync(EmailSettingNames.Smtp.Password, "your_password"); + } + + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IsEnabled = MultiTenancyConsts.IsEnabled; + }); + + // #if DEBUG + // context.Services.Replace(ServiceDescriptor.Singleton()); + // #endif + } + } +} + +``` + +* `NullEmailSender` is a built-in class that implements the `IEmailSender`, but writes email contents to the standard log system, rather than actually sending the emails. This class can be useful especially in development time where you generally don't want to send real emails. Therefore ABP framework defined this by default. But in our case we want to send real emails, so we must remove these lines or we must take it to the comment line. + +* `Abp.Mailing.Smtp.Password` must be an encrypted value. Therefore we used `SettingManager` in here to set the password. It internally **encrypts** the values on set and **decrypts** on get. + +* After all these steps, whenever we want to send an email, we can do it by using our `EmailService` class. We can inject this class and invoke the `SendAsync` method to sending email where its needed. + +After sending the email we should see the template like below. + +![email-message](message.jpg) + +### Step - 4 (Defining New Template) + +* So far we've sent mail by using standard email template of ABP. But we may want to replace the email template with the new one. We can achieve this by following the `Text Templating` [documentation](https://docs.abp.io/en/abp/latest/Text-Templating#replacing-the-existing-templates). + +* In this article, I will create a email template by using free template generator named **Bee**. You can reach the free templates from [here](https://beefree.io/templates/free/). + +* When we find a template for our purpose, we can hover the link and click the **get started** button to edit the template. (I chose a template named "gdpr".) + +* Here, you can edit your template as below. (You can delete or add sections, edit texts, and so on.) + +![bee](bee.gif) + +> **Note:** After editing our template, we need to export it to reach our created template's content. You can see the **export** button top-right of the template editing page. + +* After choosing and editing our free template, we can create a new **email template** in our project. For this, create a folder named `Templates` under `Emailing` folder in `TemplateReplace.Domain` and add `EmailTemplate.tpl` file inside of it. And copy-paste the below content or your template's content. + +```tpl + + + + + + + + + + + + + + + + + + + +``` + +* Then we need to make the template file as "Embedded Resource". We can do this as below. + +* First right click to **EmailTemplate.tpl** and choose `Properties`. + +![embedded-resource](embedded-resource.jpg) + +* Then be sure about build action is **Embedded resource**. + +![embedded-resource-2](embedded-resource-2.jpg) + +### Step - 4 (Replacing the Email Template) + +* To replace the current email template with our new email template, we need to override it. To achieve this, create a class named `EmailTemplateDefinitionProvider` under `Emailing` folder in `TemplateReplace.Domain` and fill it with the below content. + +```csharp +using Volo.Abp.DependencyInjection; +using Volo.Abp.Emailing.Templates; +using Volo.Abp.TextTemplating; + +namespace TemplateReplace.Emailing +{ + public class EmailTemplateDefinitionProvider : TemplateDefinitionProvider, ITransientDependency + { + public override void Define(ITemplateDefinitionContext context) + { + var emailLayoutTemplate = context.GetOrNull(StandardEmailTemplates.Message); + + emailLayoutTemplate + .WithVirtualFilePath( + "/Emailing/Templates/EmailTemplate.tpl", + isInlineLocalized: true + ); + } + } +} +``` + +* In here we've created a template definition provider class that gets the email layout template and change the virtual file path for the template. + +* This approach allows us to locate templates in any folder instead of the folder defined by the depended module. For more detail, check the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). + +### Step - 5 + +* Lastly, we need to configure the [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System). To do this open your `TemplateReplaceDomainModule.cs` in `TemplateReplace.Domain` and update the content as below. + +```csharp +using TemplateReplace.MultiTenancy; +using Volo.Abp.AuditLogging; +using Volo.Abp.BackgroundJobs; +using Volo.Abp.Emailing; +using Volo.Abp.FeatureManagement; +using Volo.Abp.Identity; +using Volo.Abp.IdentityServer; +using Volo.Abp.Modularity; +using Volo.Abp.MultiTenancy; +using Volo.Abp.PermissionManagement.Identity; +using Volo.Abp.PermissionManagement.IdentityServer; +using Volo.Abp.SettingManagement; +using Volo.Abp.TenantManagement; +using Volo.Abp.VirtualFileSystem; + +namespace TemplateReplace +{ + [DependsOn( + typeof(TemplateReplaceDomainSharedModule), + typeof(AbpAuditLoggingDomainModule), + typeof(AbpBackgroundJobsDomainModule), + typeof(AbpFeatureManagementDomainModule), + typeof(AbpIdentityDomainModule), + typeof(AbpPermissionManagementDomainIdentityModule), + typeof(AbpIdentityServerDomainModule), + typeof(AbpPermissionManagementDomainIdentityServerModule), + typeof(AbpSettingManagementDomainModule), + typeof(AbpTenantManagementDomainModule), + typeof(AbpEmailingModule) + )] + public class TemplateReplaceDomainModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + Configure(options => + { + options.IsEnabled = MultiTenancyConsts.IsEnabled; + }); + + //Add this configuration + Configure(options => + { + options.FileSets.AddEmbedded(); + }); + } + } +} + +``` + +* And now when we send a new email, we should see our newly defined template as the message like below. + +![email-last](email-last.jpg) + +## Text Template Management + +* Generally, more than one e-mail is required in applications. We create email templates for **"password changes"** or **"welcome"** etc in our applications. In such cases, it is necessary to create different templates for each mail. ABP Commercial allows us to perform these operations on UI in a simple way. Text Template Management provides UI to easily create and manage email templates. + +![template-definitions](template-definitions.png) + +* ABP Commercial's [Text Template Management](https://commercial.abp.io/modules/Volo.TextTemplateManagement) module is really fascinating. It makes it super easy to stores and edits template contents. We can list all templates on a page, editing them, localizing them, and so on. + +![inline-content](inline-content.png) + +* ABP Commercial's text template management module, allows us to modify a template through the UI. + +* I highly recommend you to [check it out](https://commercial.abp.io/modules/Volo.TextTemplateManagement). + +## References + +* [Text Templating](https://docs.abp.io/en/abp/latest/Text-Templating) +* [Emailing](https://docs.abp.io/en/abp/latest/Emailing) +* [Virtual File System](https://docs.abp.io/en/abp/latest/Virtual-File-System) \ No newline at end of file diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/bee.gif b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/bee.gif new file mode 100644 index 0000000000..15a3a01e65 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/bee.gif differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-1.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-1.jpg new file mode 100644 index 0000000000..8a0c4c345b Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-1.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-2.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-2.jpg new file mode 100644 index 0000000000..4adc9614c3 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-2.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-3.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-3.jpg new file mode 100644 index 0000000000..16b365b8a5 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/db-migrator-3.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/email-last.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/email-last.jpg new file mode 100644 index 0000000000..898d75568f Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/email-last.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource-2.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource-2.jpg new file mode 100644 index 0000000000..1abdba48cb Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource-2.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource.jpg new file mode 100644 index 0000000000..b03739e6c0 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/embedded-resource.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/inline-content.png b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/inline-content.png new file mode 100644 index 0000000000..cbbf188f37 Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/inline-content.png differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/message.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/message.jpg new file mode 100644 index 0000000000..fe80c2ac0c Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/message.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/settings.jpg b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/settings.jpg new file mode 100644 index 0000000000..e60fdcc2db Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/settings.jpg differ diff --git a/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/template-definitions.png b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/template-definitions.png new file mode 100644 index 0000000000..aaf46b353e Binary files /dev/null and b/docs/en/Community-Articles/2020-09-09-Replacing-Email-Template-and-Sending-Emails/template-definitions.png differ diff --git a/docs/en/UI/AspNetCore/JavaScript-API/Index.md b/docs/en/UI/AspNetCore/JavaScript-API/Index.md index 25251dcdbf..9e960ba240 100644 --- a/docs/en/UI/AspNetCore/JavaScript-API/Index.md +++ b/docs/en/UI/AspNetCore/JavaScript-API/Index.md @@ -13,11 +13,9 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica * [abp.localization](Localization.md) * abp.log * [abp.message](Message.md) -* abp.ModalManager * [abp.notify](Notify.md) * abp.security * [abp.setting](Settings.md) * abp.ui * abp.utils -* abp.ResourceLoader -* abp.WidgetManager \ No newline at end of file +* abp.ResourceLoader \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Modals.md b/docs/en/UI/AspNetCore/Modals.md new file mode 100644 index 0000000000..9de9542307 --- /dev/null +++ b/docs/en/UI/AspNetCore/Modals.md @@ -0,0 +1,483 @@ +# ASP.NET Core MVC / Razor Pages UI: Modals + +While you can continue to use the standard [Bootstrap way](https://getbootstrap.com/docs/4.5/components/modal/) to create, open and manage modals in your applications, ABP Framework provides a **flexible** way to manage modals by **automating common tasks** for you. + +**Example: A modal dialog to create a new role entity** + +![modal-manager-example-modal](../../images/modal-manager-example-modal.png) + +ABP Framework provides the following benefits for such a modal with a form inside it; + +* **Lazy loads** the modal HTML into the page and **removes** it from the DOM once its closed. This makes easy to consume a reusable modal dialog. Also, every time you open the modal, it will be a fresh new modal, so you don't have to deal with resetting the modal content. +* **Auto-focuses** the first input of the form once the modal has been opened. +* Automatically determines the **form** inside a modal and posts the form via **AJAX** instead of normal page post. +* Automatically checks if the form inside the modal **has changed, but not saved**. It warns the user in this case. +* Automatically **disables the modal buttons** (save & cancel) until the AJAX operation completes. +* Makes it easy to register a **JavaScript object that is initialized** once the modal has loaded. + +So, it makes you write less code when you deal with the modals, especially the modals with a form inside. + +## Basic Usage + +### Creating a Modal as a Razor Page + +To demonstrate the usage, we are creating a simple Razor Page, named `ProductInfoModal.cshtml`, under the `/Pages/Products` folder: + +![modal-page-on-rider](../../images/modal-page-on-rider.png) + +**ProductInfoModal.cshtml Content:** + +````html +@page +@model MyProject.Web.Pages.Products.ProductInfoModalModel +@{ + Layout = null; +} + + + +

@Model.ProductName

+
+ +
+

+ @Model.ProductDescription +

+

+ Reference: https://acme.com/catalog/ +

+
+ +
+```` + +* This page sets the `Layout` to `null` since we will show this as a modal. So, no need to wrap with a layout. +* It uses [abp-modal tag helper](Tag-Helpers/Modals.md) to simplify creating the modal HTML code. You can use the standard Bootstrap modal code if you prefer it. + +**ProductInfoModalModel.cshtml.cs Content:** + +```csharp +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace MyProject.Web.Pages.Products +{ + public class ProductInfoModalModel : AbpPageModel + { + public string ProductName { get; set; } + + public string ProductDescription { get; set; } + + public string ProductImageUrl { get; set; } + + public void OnGet() + { + ProductName = "Acme Indestructo Steel Ball"; + ProductDescription = "The ACME Indestructo Steel Ball is completely indestructible, there is nothing that can destroy it!"; + ProductImageUrl = "https://acme.com/catalog/acmeindestructo.jpg"; + } + } +} +``` + +You can surely get the product info from a database or API. We are setting the properties hard-coded for the sake of simplicity, + +### Defining the Modal Manager + +Once you have a modal, you can open it in any page using some simple **JavaScript** code. + +First, create an `abp.ModalManager` object by setting the `viewUrl`, in the JavaScript file of the page that will use the modal: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal' +}); +```` + +> If you only need to specify the `viewUrl`, you can directly pass it to the `ModalManager` constructor, as a shortcut. Example: `new abp.ModalManager('/Products/ProductInfoModal');` + +### Opening the Modal + +Then open the modal whenever you need: + +````js +productInfoModal.open(); +```` + +You typically want to open the modal when something happens; For example, when the user clicks a button: + +````js +$('#OpenProductInfoModal').click(function(){ + productInfoModal.open(); +}); +```` + +The resulting modal will be like that: + +![modal-example-product-info](../../images/modal-example-product-info.png) + +#### Opening the Modal with Arguments + +When you call the `open()` method, `ModalManager` loads the modal HTML by requesting it from the `viewUrl`. You can pass some **query string parameters** to this URL when you open the modal. + +**Example: Pass the product id while opening the modal** + +````js +productInfoModal.open({ + productId: 42 +}); +```` + +You can add a `productId` parameter to the get method: + +````csharp +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace MyProject.Web.Pages.Products +{ + public class ProductInfoModalModel : AbpPageModel + { + //... + + public async Task OnGetAsync(int productId) //Add productId parameter + { + //TODO: Get the product with database with the given productId + //... + } + } +} +```` + +In this way, you can use the `productId` to query the product from a data source. + +## Modals with Forms + +`abp.ModalManager` handles various common tasks (described in the introduction) when you want to use a form inside the modal. + +### Example Modal with a Form + +This section shows an example form to create a new product. + +#### Creating the Razor Page + +For this example, creating a new Razor Page, named `ProductCreateModal.cshtml`, under the `/Pages/Products` folder: + +![product-create-modal-page-on-rider](../../images/product-create-modal-page-on-rider.png) + +**ProductCreateModal.cshtml Content:** + +````html +@page +@using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Modal +@model MyProject.Web.Pages.Products.ProductCreateModalModel +@{ + Layout = null; +} +
+ + + + + + + + + +
+```` + +* The `abp-modal` has been wrapped by the `form`. This is needed to place the `Save` and the `Cancel` buttons into the form. In this way, the `Save` button acts as the `submit` button for the `form`. +* Used the [abp-input tag helpers](Tag-Helpers/Form-Elements.md) to simplify to create the form elements. Otherwise, you need to write more HTML. + +**ProductCreateModal.cshtml.cs Content:** + +```csharp +using System.Threading.Tasks; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp.AspNetCore.Mvc.UI.RazorPages; + +namespace MyProject.Web.Pages.Products +{ + public class ProductCreateModalModel : AbpPageModel + { + [BindProperty] + public PoductCreationDto Product { get; set; } + + public async Task OnGetAsync() + { + //TODO: Get logic, if available + } + + public async Task OnPostAsync() + { + //TODO: Save the Product... + + return NoContent(); + } + } +} +``` + +* This is a simple `PageModal` class. The `[BindProperty]` make the form binding to the model when you post (submit) the form; The standard ASP.NET Core system. +* `OnPostAsync` returns `NoContent` (this method is defined by the base `AbpPageModel` class). Because we don't need to a return value in the client side, after the form post operation. + +**PoductCreationDto:** + +`ProductCreateModalModel` uses a `PoductCreationDto` class defined as shown below: + +````csharp +using System; +using System.ComponentModel.DataAnnotations; +using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form; + +namespace MyProject.Web.Pages.Products +{ + public class PoductCreationDto + { + [Required] + [StringLength(128)] + public string Name { get; set; } + + [TextArea(Rows = 4)] + [StringLength(2000)] + public string Description { get; set; } + + [DataType(DataType.Date)] + public DateTime ReleaseDate { get; set; } + } +} +```` + +* `abp-input` Tag Helper can understand the data annotation attributes and uses them to shape and validate the form elements. See the [abp-input tag helpers](Tag-Helpers/Form-Elements.md) document to learn more. + +#### Defining the Modal Manager + +Again, create an `abp.ModalManager` object by setting the `viewUrl`, in the JavaScript file of the page that will use the modal: + +````js +var productCreateModal = new abp.ModalManager({ + viewUrl: '/Products/ProductCreateModal' +}); +```` + +#### Opening the Modal + +Then open the modal whenever you need: + +````js +productCreateModal.open(); +```` + +You typically want to open the modal when something happens; For example, when the user clicks a button: + +````js +$('#OpenProductCreateModal').click(function(){ + productCreateModal.open(); +}); +```` + +So, the complete code will be something like that (assuming you have a `button` with `id` is `OpenProductCreateModal` on the view side): + +```js +$(function () { + + var productCreateModal = new abp.ModalManager({ + viewUrl: '/Products/ProductCreateModal' + }); + + $('#OpenProductCreateModal').click(function () { + productCreateModal.open(); + }); + +}); +``` + +The resulting modal will be like that: + +![modal-example-product-create](../../images/modal-example-product-create.png) + +#### Saving the Modal + +When you click to the `Save` button, the form is posted to the server. If the server returns a **success response**, then the `onResult` event is triggered with some arguments including the server response and the modal is automatically closed. + +An example callback that logs the arguments passed to the `onResult` method: + +````js +productCreateModal.onResult(function(){ + console.log(arguments); +}); +```` + +If the server returns a failed response, it shows the error message returned from the server and keeps the modal open. + +> See the *Modal Manager Reference* section below for other modal events. + +#### Canceling the Modal + +If you click to the Cancel button with some changes made but not saved, you get such a warning message: + +![modal-manager-cancel-warning](../../images/modal-manager-cancel-warning.png) + +If you don't want such a check & message, you can add `data-check-form-on-close="false"` attribute to your `form` element. Example: + +````html +
+```` + +### Form Validation + +`ModalManager` automatically triggers the form validation when you click to the `Save` button or hit the `Enter` key on the form: + +![modal-manager-validation](../../images/modal-manager-validation.png) + +See the [Forms & Validation document](Forms-Validation.md) to learn more about the validation. + +## Modals with Script Files + +You may need to perform some logic for your modal. To do that, create a JavaScript file like below: + +````js +abp.modals.ProductInfo = function () { + + function initModal(modalManager, args) { + var $modal = modalManager.getModal(); + var $form = modalManager.getForm(); + + $modal.find('h3').css('color', 'red'); + + console.log('initialized the modal...'); + }; + + return { + initModal: initModal + }; +}; +```` + +* This code simply adds a `ProductInfo` class into the `abp.modals` namespace. The `ProductInfo` class exposes a single public function: `initModal`. +* `initModal` method is called by the `ModalManager` once the modal HTML is inserted to DOM and ready for the initialization logic. +* `modalManager` parameter is the `ModalManager` object related to this modal instance. So, you can use any function on it in your code. See the *ModalManager Reference* section. + +Then include this file to the page that you use the modal: + +````html + + +```` + +* We've use the `abp-script` Tag Helper here. See the [Bundling & Minification](Bundling-Minification.md) document if you want to understand it. You can use the standard `script` tag. It doesn't matter for this case. + +Finally, set the `modalClass` option while creating the `ModalManager` instance: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal', + modalClass: 'ProductInfo' //Matches to the abp.modals.ProductInfo +}); +```` + +### Lazy Loading the Script File + +Instead of adding the `ProductInfoModal.js` to the page you use the modal, you can configure it to lazy load the script file when the first time the modal is opened. + +Example: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal', + scriptUrl: '/Pages/Products/ProductInfoModal.js', //Lazy Load URL + modalClass: 'ProductInfo' +}); +```` + +* `scriptUrl` is used to set the URL to load the script file of the modal. +* In this case, you no longer need to include the `ProductInfoModal.js` to the page. It will be loaded on demand. + +#### Tip: Bundling & Minification + +While lazy loading seems cool at the beginning, it requires an additional call to the server when you first open the modal. + +Instead, you can use the [Bundling & Minification](Bundling-Minification.md) system to create a bundle (that is a single and minified file on production) for all the used script files for a page: + +````html + + + + +```` + +This is efficient if the script file is not large and frequently opened while users use the page. + +Alternatively, you can define the `abp.modals.ProductInfo` class in the page's main JavaScript file if the modal is only and always used in the same page. In this case, you don't need to another external script file at all. + +## ModalManager Reference + +### Options + +Options can be passed when you create a new `ModalManager` object: + +````js +var productInfoModal = new abp.ModalManager({ + viewUrl: '/Products/ProductInfoModal', + //...other options +}); +```` + +Here, the list of all available options; + +* `viewUrl` (required, `string`): The URL to lazy load the HTML of the modal. +* `scriptUrl` (optional, `string`): A URL to lazy load a JavaScript file. It is loaded only once, when the modal first opened. +* `modalClass` (optional, `string`): A JavaScript class defined in the `abp.modals` namespace that can be used to execute code related to the modal. + +### Functions + +When you create a new `ModalManager` object, you can use its functions to perform operations on the modal. Example: + +````js +var myModal = new abp.ModalManager({ + //...options +}); + +//Open the modal +myModal.open(); + +//Close the modal +myModal.close(); +```` + +Here, the list of all available functions of the `ModalManager` object; + +* `open([args])`: Opens the modal dialog. It can get an `args` object that is converted to query string while getting the `viewUrl` from the server. For example, if `args` is `{ productId: 42 }`, then the `ModalManager` passes `?productId=42` to the end of the `viewUrl` while loading the view from the server. +* `reopen()`: Opens the modal with the latest provided `args` for the `open()` method. So, it is a shortcut if you want to re-open the modal with the same `args`. +* `close()`: Closes the modal. The modal HTML is automatically removed from DOM once it has been closed. +* `getModalId()`: Gets the `id` attribute of the container that contains the view returned from the server. This is a unique id per modal and it doesn't change after you create the `ModalManager`. +* `getModal()`: Returns the modal wrapper DOM element (the HTML element with the `modal` CSS class) as a JQuery selection, so you can perform any JQuery method on it. +* `getForm()`: Returns the `form` HTML element as a JQuery selection, so you can perform any JQuery method on it. It returns `null` if the modal has no form inside it. +* `getArgs()` Gets the latest arguments object provided while opening the modal. +* `getOptions()`: Gets the options object passed to the `ModalManager` constructor. +* `setResult(...)`: Triggers the `onResult` event with the provided arguments. You can pass zero or more arguments those are directly passed to the `onResult` event. This function is generally called by the modal script to notify the page that uses the modal. + +### Events + +When you create a new `ModalManager` object, you can use its functions register to events of the modal. Examples: + +````js +var myModal = new abp.ModalManager({ + //...options +}); + +myModal.onOpen(function () { + console.log('opened the modal...'); +}); + +myModal.onClose(function () { + console.log('closed the modal...'); +}); +```` + +Here, the list of all available functions to register to events of the `ModalManager` object; + +* `onOpen(callback)`: Registers a callback function to get notified once the modal is opened. It is triggered when the modal is completely visible on the UI. +* `onClose(callback)`: Registers a callback function to get notified once the modal is closed. It is triggered when the modal is completely invisible on the UI. +* `onResult(callback)`: Registers a callback function that is triggered when the ``setResult(...)` method is called. All the parameters sent to the `setResult` method is passed to the callback. \ No newline at end of file diff --git a/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md b/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md index 9cf1258373..c811dee0bc 100644 --- a/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md +++ b/docs/en/UI/AspNetCore/Tag-Helpers/Modals.md @@ -1,5 +1,7 @@ # Modals +> This document explains the details of the `abp-modal` Tag Helper, which simplifies to build the HTML markup for a modal dialog. Read [that documentation](../Modals.md) to learn how to work with modals. + ## Introduction `abp-modal` is a main element to create a modal. @@ -18,8 +20,6 @@ Basic usage: ```` - - ## Demo See the [modals demo page](https://bootstrap-taghelpers.abp.io/Components/Modals) to see it in action. diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json index 2ad29baad1..d5e32542dd 100644 --- a/docs/en/docs-nav.json +++ b/docs/en/docs-nav.json @@ -398,13 +398,17 @@ { "text": "ASP.NET Core MVC / Razor Pages", "items": [ + { + "text": "Navigation / Menus", + "path": "UI/AspNetCore/Navigation-Menu.md" + }, { "text": "Forms & Validation", "path": "UI/AspNetCore/Forms-Validation.md" }, { - "text": "Navigation / Menus", - "path": "UI/AspNetCore/Navigation-Menu.md" + "text": "Modals", + "path": "UI/AspNetCore/Modals.md" }, { "text": "Page Alerts", diff --git a/docs/en/images/modal-example-product-create.png b/docs/en/images/modal-example-product-create.png new file mode 100644 index 0000000000..89ea0226ef Binary files /dev/null and b/docs/en/images/modal-example-product-create.png differ diff --git a/docs/en/images/modal-example-product-info.png b/docs/en/images/modal-example-product-info.png new file mode 100644 index 0000000000..5d037c1125 Binary files /dev/null and b/docs/en/images/modal-example-product-info.png differ diff --git a/docs/en/images/modal-manager-cancel-warning.png b/docs/en/images/modal-manager-cancel-warning.png new file mode 100644 index 0000000000..fc00902e0f Binary files /dev/null and b/docs/en/images/modal-manager-cancel-warning.png differ diff --git a/docs/en/images/modal-manager-example-modal.png b/docs/en/images/modal-manager-example-modal.png new file mode 100644 index 0000000000..867c6d410e Binary files /dev/null and b/docs/en/images/modal-manager-example-modal.png differ diff --git a/docs/en/images/modal-manager-validation.png b/docs/en/images/modal-manager-validation.png new file mode 100644 index 0000000000..516a178e66 Binary files /dev/null and b/docs/en/images/modal-manager-validation.png differ diff --git a/docs/en/images/modal-page-on-rider.png b/docs/en/images/modal-page-on-rider.png new file mode 100644 index 0000000000..522885489d Binary files /dev/null and b/docs/en/images/modal-page-on-rider.png differ diff --git a/docs/en/images/product-create-modal-page-on-rider.png b/docs/en/images/product-create-modal-page-on-rider.png new file mode 100644 index 0000000000..01cf93eaf0 Binary files /dev/null and b/docs/en/images/product-create-modal-page-on-rider.png differ diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln index 56670b8dca..50320b645f 100644 --- a/framework/Volo.Abp.sln +++ b/framework/Volo.Abp.sln @@ -347,6 +347,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Autofac.WebAssembl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Authentication.OpenIdConnect", "src\Volo.Abp.AspNetCore.Authentication.OpenIdConnect\Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj", "{DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.EventBus.Rebus", "src\Volo.Abp.EventBus.Rebus\Volo.Abp.EventBus.Rebus.csproj", "{F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}" +EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.ExceptionHandling", "src\Volo.Abp.ExceptionHandling\Volo.Abp.ExceptionHandling.csproj", "{B9D1ADCB-D552-4626-A1F1-78FF72C1E822}" EndProject Global @@ -1035,6 +1037,10 @@ Global {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}.Debug|Any CPU.Build.0 = Debug|Any CPU {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}.Release|Any CPU.ActiveCfg = Release|Any CPU {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5}.Release|Any CPU.Build.0 = Release|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3}.Release|Any CPU.Build.0 = Release|Any CPU {B9D1ADCB-D552-4626-A1F1-78FF72C1E822}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9D1ADCB-D552-4626-A1F1-78FF72C1E822}.Debug|Any CPU.Build.0 = Debug|Any CPU {B9D1ADCB-D552-4626-A1F1-78FF72C1E822}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -1214,6 +1220,7 @@ Global {29CA7471-4E3E-4E75-8B33-001DDF682F01} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {37F89B0B-1C6B-426F-A5EE-676D1956D9E9} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {DEFE3DB2-EA4F-4F90-87FC-B25D64427BC5} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} + {F689967F-1EF1-4D75-8BA4-2F2F3506B1F3} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} {B9D1ADCB-D552-4626-A1F1-78FF72C1E822} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/hu.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/hu.json new file mode 100644 index 0000000000..057e9d2968 --- /dev/null +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo/Abp/AspNetCore/Mvc/UI/MultiTenancy/Localization/hu.json @@ -0,0 +1,12 @@ +{ + "culture": "hu", + "texts": { + "GivenTenantIsNotAvailable": "A megadott előfizető nem érhető el: {0}", + "Tenant": "Előfizető", + "Switch": "váltás", + "Name": "Neve", + "SwitchTenantHint": "Hagyja üresen az előfizető nevet hogy a host oldalra kapcsoljon.", + "SwitchTenant": "Előfizető váltás", + "NotSelected": "Nincs kiválasztva" + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js index cc4122a373..3e60d5f9c2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/modal-manager.js @@ -1,7 +1,3 @@ -/** - * TODO: Document & prepare typescript definitions - * TODO: Refactor & test more - */ var abp = abp || {}; $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only for the form we are working on! Also this should be decided by the form itself! @@ -12,7 +8,7 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f abp.ModalManager = (function () { - var CallbackList = function () { //TODO: To a seperated file + var CallbackList = function () { var _callbacks = []; return { @@ -67,12 +63,11 @@ $.validator.defaults.ignore = ''; //TODO: Would be better if we can apply only f _$modal = _$modalContainer.find('.modal'); _$form = _$modalContainer.find('form'); if (_$form.length) { - //TODO: data-ajaxForm comparison seems wrong! - if (_$form.attr('data-ajaxForm') === undefined || _$form.attr('data-ajaxForm') === false) { + if (_$form.attr('data-ajaxForm') !== 'false') { _$form.abpAjaxForm(); } - if (_$form.attr('data-check-form-on-close') === undefined || _$form.attr('data-check-form-on-close') != 'false') { + if (_$form.attr('data-check-form-on-close') !== 'false') { _$form.needConfirmationOnUnsavedClose(_$modal); } diff --git a/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/hu.json b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/hu.json new file mode 100644 index 0000000000..6ec29c05e5 --- /dev/null +++ b/framework/src/Volo.Abp.Ddd.Application.Contracts/Volo/Abp/Application/Localization/Resources/AbpDdd/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "MaxResultCountExceededExceptionMessage": "{0} nem lehet több mint {1}! Csökkentse {2}.{3} a szerver oldalon, hogy több redeményt kapjon." + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/hu.json b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/hu.json new file mode 100644 index 0000000000..f2dbce2961 --- /dev/null +++ b/framework/src/Volo.Abp.Emailing/Volo/Abp/Emailing/Localization/hu.json @@ -0,0 +1,25 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Mailing.DefaultFromAddress": "Alapértlemezett feladó címe", + "DisplayName:Abp.Mailing.DefaultFromDisplayName": "Feladó alapértelmezett megjelenő neve", + "DisplayName:Abp.Mailing.Smtp.Host": "Kiszolgáló", + "DisplayName:Abp.Mailing.Smtp.Port": "Port", + "DisplayName:Abp.Mailing.Smtp.UserName": "Felhasználónév", + "DisplayName:Abp.Mailing.Smtp.Password": "Jelszó", + "DisplayName:Abp.Mailing.Smtp.Domain": "Domain", + "DisplayName:Abp.Mailing.Smtp.EnableSsl": "SSL engedélyezése", + "DisplayName:Abp.Mailing.Smtp.UseDefaultCredentials": "Használja az alapértelmezett hitelesítő adatokat", + "Description:Abp.Mailing.DefaultFromAddress": "Az alapértlemezett feladó címe", + "Description:Abp.Mailing.DefaultFromDisplayName": "A feladó alapértelmezett megjelenő neve", + "Description:Abp.Mailing.Smtp.Host": "Az SMTP kiszolgáló neve vagy IP címe.", + "Description:Abp.Mailing.Smtp.Port": "Az SMTP forgalomhoz használt port.", + "Description:Abp.Mailing.Smtp.UserName": "A hitelesítő adatokhoz társított felhasználói név..", + "Description:Abp.Mailing.Smtp.Password": "A hitelesítő adatokhoz társított felhasználói név jelszava.", + "Description:Abp.Mailing.Smtp.Domain": "A hitelesítő adatokat igazoló tartomány vagy számítógép neve.", + "Description:Abp.Mailing.Smtp.EnableSsl": "Engedélyezze, ha a levelező programja Secure Sockets Layer (SSL) protokollt használ a kapcsolat titkosításához.", + "Description:Abp.Mailing.Smtp.UseDefaultCredentials": "Alkalmazza, hogy a kérésekhez az alapértelmezett hitelesítést használja.", + "TextTemplate:StandardEmailTemplates.Layout": "Alapértelmezett e-mail elrendezési sablon", + "TextTemplate:StandardEmailTemplates.Message": "Egyszerű üzenet sablon az e-mailekhez" + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xml b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xml new file mode 100644 index 0000000000..be0de3a908 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xsd b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xsd new file mode 100644 index 0000000000..3f3946e282 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/FodyWeavers.xsd @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed. + + + + + A comma-separated list of error codes that can be safely ignored in assembly verification. + + + + + 'false' to turn off automatic generation of the XML Schema file. + + + + + \ No newline at end of file diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj b/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj new file mode 100644 index 0000000000..0a01911990 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo.Abp.EventBus.Rebus.csproj @@ -0,0 +1,26 @@ + + + + + + + netstandard2.0 + Volo.Abp.EventBus.Rebus + Volo.Abp.EventBus.Rebus + $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; + false + false + false + + + + + + + + + + + + + diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs new file mode 100644 index 0000000000..ec9dfe6b07 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusModule.cs @@ -0,0 +1,43 @@ +using Microsoft.Extensions.DependencyInjection; +using Rebus.Handlers; +using Rebus.ServiceProvider; +using Volo.Abp.Modularity; + +namespace Volo.Abp.EventBus.Rebus +{ + [DependsOn( + typeof(AbpEventBusModule))] + public class AbpEventBusRebusModule : AbpModule + { + public override void ConfigureServices(ServiceConfigurationContext context) + { + var options = context.Services.ExecutePreConfiguredActions(); + + context.Services.AddTransient(typeof(IHandleMessages<>), typeof(RebusDistributedEventHandlerAdapter<>)); + + Configure(rebusOptions => + { + rebusOptions.Configurer = options.Configurer; + rebusOptions.Publish = options.Publish; + rebusOptions.InputQueueName = options.InputQueueName; + }); + + context.Services.AddRebus(configurer => + { + options.Configurer?.Invoke(configurer); + return configurer; + }); + + } + + public override void OnApplicationInitialization(ApplicationInitializationContext context) + { + context.ServiceProvider.UseRebus(); + + context + .ServiceProvider + .GetRequiredService() + .Initialize(); + } + } +} diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusOptions.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusOptions.cs new file mode 100644 index 0000000000..06a138f66b --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/AbpEventBusRebusOptions.cs @@ -0,0 +1,49 @@ +using System; +using System.Threading.Tasks; +using JetBrains.Annotations; +using Rebus.Bus; +using Rebus.Config; +using Rebus.Persistence.InMem; +using Rebus.Transport.InMem; + +namespace Volo.Abp.EventBus.Rebus +{ + public class AbpEventBusRebusOptions + { + [NotNull] + public string InputQueueName { get; set; } + + [NotNull] + public Action Configurer + { + get => _configurer; + set => _configurer = Check.NotNull(value, nameof(value)); + } + private Action _configurer; + + [NotNull] + public Func Publish + { + get => _publish; + set => _publish = Check.NotNull(value, nameof(value)); + } + private Func _publish; + + public AbpEventBusRebusOptions() + { + _publish = DefaultPublish; + _configurer = DefaultConfigurer; + } + + private async Task DefaultPublish(IBus bus, Type eventType, object eventData) + { + await bus.Advanced.Routing.Send(InputQueueName, eventData); + } + + private void DefaultConfigurer(RebusConfigurer configurer) + { + configurer.Subscriptions(s => s.StoreInMemory()); + configurer.Transport(t => t.UseInMemoryTransport(new InMemNetwork(), InputQueueName)); + } + } +} diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs new file mode 100644 index 0000000000..9a30281617 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventBus.cs @@ -0,0 +1,176 @@ +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Options; +using Rebus.Bus; +using Volo.Abp.DependencyInjection; +using Volo.Abp.EventBus.Distributed; +using Volo.Abp.MultiTenancy; +using Volo.Abp.Threading; + +namespace Volo.Abp.EventBus.Rebus +{ + [Dependency(ReplaceServices = true)] + [ExposeServices(typeof(IDistributedEventBus), typeof(RebusDistributedEventBus))] + public class RebusDistributedEventBus : EventBusBase, IDistributedEventBus, ISingletonDependency + { + protected IBus Rebus { get; } + + //TODO: Accessing to the List may not be thread-safe! + protected ConcurrentDictionary> HandlerFactories { get; } + protected ConcurrentDictionary EventTypes { get; } + protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; } + protected AbpEventBusRebusOptions AbpEventBusRebusOptions { get; } + + public RebusDistributedEventBus( + IServiceScopeFactory serviceScopeFactory, + ICurrentTenant currentTenant, + IBus rebus, + IOptions abpDistributedEventBusOptions, + IOptions abpEventBusRebusOptions) : + base(serviceScopeFactory, currentTenant) + { + Rebus = rebus; + AbpEventBusRebusOptions = abpEventBusRebusOptions.Value; + AbpDistributedEventBusOptions = abpDistributedEventBusOptions.Value; + + HandlerFactories = new ConcurrentDictionary>(); + EventTypes = new ConcurrentDictionary(); + } + + public void Initialize() + { + SubscribeHandlers(AbpDistributedEventBusOptions.Handlers); + } + + public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory) + { + var handlerFactories = GetOrCreateHandlerFactories(eventType); + + if (factory.IsInFactories(handlerFactories)) + { + return NullDisposable.Instance; + } + + handlerFactories.Add(factory); + + if (handlerFactories.Count == 1) //TODO: Multi-threading! + { + Rebus.Subscribe(eventType); + } + + return new EventHandlerFactoryUnregistrar(this, eventType, factory); + } + + public override void Unsubscribe(Func action) + { + Check.NotNull(action, nameof(action)); + + GetOrCreateHandlerFactories(typeof(TEvent)) + .Locking(factories => + { + factories.RemoveAll( + factory => + { + if (!(factory is SingleInstanceHandlerFactory singleInstanceFactory)) + { + return false; + } + + if (!(singleInstanceFactory.HandlerInstance is ActionEventHandler actionHandler)) + { + return false; + } + + return actionHandler.Action == action; + }); + }); + + Rebus.Unsubscribe(typeof(TEvent)); + } + + public override void Unsubscribe(Type eventType, IEventHandler handler) + { + GetOrCreateHandlerFactories(eventType) + .Locking(factories => + { + factories.RemoveAll( + factory => + factory is SingleInstanceHandlerFactory handlerFactory && + handlerFactory.HandlerInstance == handler + ); + }); + + Rebus.Unsubscribe(eventType); + } + + public override void Unsubscribe(Type eventType, IEventHandlerFactory factory) + { + GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Remove(factory)); + Rebus.Unsubscribe(eventType); + } + + public override void UnsubscribeAll(Type eventType) + { + GetOrCreateHandlerFactories(eventType).Locking(factories => factories.Clear()); + Rebus.Unsubscribe(eventType); + } + + public IDisposable Subscribe(IDistributedEventHandler handler) where TEvent : class + { + return Subscribe(typeof(TEvent), handler); + } + + public override async Task PublishAsync(Type eventType, object eventData) + { + await AbpEventBusRebusOptions.Publish(Rebus, eventType, eventData); + } + + private List GetOrCreateHandlerFactories(Type eventType) + { + return HandlerFactories.GetOrAdd( + eventType, + type => + { + var eventName = EventNameAttribute.GetNameOrDefault(type); + EventTypes[eventName] = type; + return new List(); + } + ); + } + + protected override IEnumerable GetHandlerFactories(Type eventType) + { + var handlerFactoryList = new List(); + + foreach (var handlerFactory in HandlerFactories.Where(hf => ShouldTriggerEventForHandler(eventType, hf.Key)) + ) + { + handlerFactoryList.Add( + new EventTypeWithEventHandlerFactories(handlerFactory.Key, handlerFactory.Value)); + } + + return handlerFactoryList.ToArray(); + } + + private static bool ShouldTriggerEventForHandler(Type targetEventType, Type handlerEventType) + { + //Should trigger same type + if (handlerEventType == targetEventType) + { + return true; + } + + //Should trigger for inherited types + if (handlerEventType.IsAssignableFrom(targetEventType)) + { + return true; + } + + return false; + } + } +} diff --git a/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventHandlerAdapter.cs b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventHandlerAdapter.cs new file mode 100644 index 0000000000..005226b885 --- /dev/null +++ b/framework/src/Volo.Abp.EventBus.Rebus/Volo/Abp/EventBus/Rebus/RebusDistributedEventHandlerAdapter.cs @@ -0,0 +1,20 @@ +using System.Threading.Tasks; +using Rebus.Handlers; + +namespace Volo.Abp.EventBus.Rebus +{ + public class RebusDistributedEventHandlerAdapter : IHandleMessages + { + protected RebusDistributedEventBus RebusDistributedEventBus { get; } + + public RebusDistributedEventHandlerAdapter(RebusDistributedEventBus rebusDistributedEventBus) + { + RebusDistributedEventBus = rebusDistributedEventBus; + } + + public async Task Handle(TEventData message) + { + await RebusDistributedEventBus.TriggerHandlersAsync(typeof(TEventData), message); + } + } +} diff --git a/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/hu.json b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/hu.json new file mode 100644 index 0000000000..18ef0e4be1 --- /dev/null +++ b/framework/src/Volo.Abp.ExceptionHandling/Volo/Abp/ExceptionHandling/Localization/hu.json @@ -0,0 +1,23 @@ +{ + "culture": "hu", + "texts": { + "InternalServerErrorMessage": "Belső hiba történt a kérése során!", + "ValidationErrorMessage": "Kérése érvénytelen!", + "ValidationNarrativeErrorMessageTitle": "A validálás során a következő hibákat észleltük.", + "DefaultErrorMessage": "Hiba történt!", + "DefaultErrorMessageDetail": "A hiba részleteit nem a szerver küldte el.", + "DefaultErrorMessage401": "Nincs hitelesítve!", + "DefaultErrorMessage401Detail": "A művelet végrehajtásához be kell jelentkeznie.", + "DefaultErrorMessage403": "Ön nem jogosult!", + "DefaultErrorMessage403Detail": "Ezt a műveletet nem hajthatja végre!", + "DefaultErrorMessage404": "Az erőforrás nem található!", + "DefaultErrorMessage404Detail": "A kért erőforrás nem található a szerveren", + "EntityNotFoundErrorMessage": "Nincs {0} elem, amelynek id értéke {1}!", + "Error": "Nincs {0} elem, amelynek id értéke {1}!", + "UnhandledException": "Nem kezelt kivétel!", + "401Message": "Jogosulatlan", + "403Message": "Tiltott", + "404Message": "Az oldal nem található", + "500Message": "Belső Szerverhiba" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json new file mode 100644 index 0000000000..1b240d9b29 --- /dev/null +++ b/framework/src/Volo.Abp.Ldap/Volo/Abp/Ldap/Localization/hu.json @@ -0,0 +1,20 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Ldap.ServerHost": "Szerver host", + "Description:Abp.Ldap.ServerHost": "Az LDAP ksizolgáló szerver hostneve vagy IP címe", + + "DisplayName:Abp.Ldap.ServerPort": "Szerver port", + "Description:Abp.Ldap.ServerPort": "LDAP kommunikáció portja", + + "DisplayName:Abp.Ldap.BaseDc": "Bázis tartomány-komponens", + "Description:Abp.Ldap.BaseDc": "Bázis tartomány-komponens", + + "DisplayName:Abp.Ldap.UserName": "Felhasználónév", + "Description:Abp.Ldap.UserName": "Felhasználónév", + + "DisplayName:Abp.Ldap.Password": "Jelszó", + "Description:Abp.Ldap.Password": "Jelszó" + } + } + \ No newline at end of file diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/hu.json b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/hu.json new file mode 100644 index 0000000000..d355c69ee3 --- /dev/null +++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/Resources/AbpLocalization/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Localization.DefaultLanguage": "Alapértelmezett nyelv", + "Description:Abp.Localization.DefaultLanguage": "Az alkalmazás alapértelmezett nyelve." + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/hu.json b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/hu.json new file mode 100644 index 0000000000..7902d093a8 --- /dev/null +++ b/framework/src/Volo.Abp.Timing/Volo/Abp/Timing/Localization/hu.json @@ -0,0 +1,8 @@ +{ + "culture": "hu", + "texts": { + "DisplayName:Abp.Timing.Timezone": "Időzóna", + "Description:Abp.Timing.Timezone": "Alkalmazás időzónája" + } + } + \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/hu.json b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/hu.json new file mode 100644 index 0000000000..c391e23db2 --- /dev/null +++ b/framework/src/Volo.Abp.UI.Navigation/Volo/Abp/Ui/Navigation/Localization/Resource/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "Menu:Administration": "Adminisztráció" + } + } \ No newline at end of file diff --git a/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/hu.json b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/hu.json new file mode 100644 index 0000000000..ed63fb50d0 --- /dev/null +++ b/framework/src/Volo.Abp.UI/Localization/Resources/AbpUi/hu.json @@ -0,0 +1,52 @@ +{ + "culture": "hu", + "texts": { + "Languages": "Nyelvek", + "AreYouSure": "Biztos benne?", + "Cancel": "Mégsem", + "Clear": "Tisztítás", + "Yes": "Igen", + "No": "Nem", + "Ok": "Rendben", + "Close": "Bezárás", + "Save": "Mentés", + "SavingWithThreeDot": "Mentés...", + "Actions": "Műveletek", + "Delete": "Törlés", + "Edit": "Szerkesztés", + "Refresh": "Frissítés", + "Language": "Nyelv", + "LoadMore": "Több betöltése", + "ProcessingWithThreeDot": "Feldolgozás...", + "LoadingWithThreeDot": "Töltés...", + "Welcome": "Üdvözlöm", + "Login": "Bejelentkezés", + "Register": "Regisztráció", + "Logout": "Kijelentkezés", + "Submit": "Beküldés", + "Back": "Vissza", + "PagerSearch": "Keresés", + "PagerNext": "Következő", + "PagerPrevious": "Előző", + "PagerFirst": "Első", + "PagerLast": "Utolsó", + "PagerInfo": "Látható _START_ -tól _END_ -ig _TOTAL_ elemből", + "PagerInfo{0}{1}{2}": "Látható {0}-tól {1}-ig {2} elemből", + "PagerInfoEmpty": "Látható 0-tól 0-ig 0 elemből", + "PagerInfoFiltered": "(szűrve _MAX_ elemből)", + "NoDataAvailableInDatatable": "Nem elérhető adat", + "Total": "összesen", + "Selected": "kiválasztott", + "PagerShowMenuEntries": "Megjelenítve _MENU_ elem", + "DatatableActionDropdownDefaultText": "Műveletek", + "ChangePassword": "Jelszó véltoztatás", + "PersonalInfo": "Saját profil", + "AreYouSureYouWantToCancelEditingWarningMessage": "Vannak mentetlen változtatásai.", + "GoHomePage": "Kezdőlapra lépés", + "GoBack": "Menjen vissza", + "Search": "Keresés", + "ItemWillBeDeletedMessageWithFormat": "{0} törlésre kerül!", + "ItemWillBeDeletedMessage": "Ez az elem törlődik!", + "ManageYourAccount": "Kezelje fiókját" + } +} \ No newline at end of file diff --git a/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/hu.json b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/hu.json new file mode 100644 index 0000000000..b956b72f96 --- /dev/null +++ b/framework/src/Volo.Abp.Validation/Volo/Abp/Validation/Localization/hu.json @@ -0,0 +1,34 @@ +{ + "culture": "hu", + "texts": { + "'{0}' and '{1}' do not match.": "'{0}' és '{1}' nem egyforma.", + "The {0} field is not a valid credit card number.": "A {0} érvényes bankkártya szám.", + "{0} is not valid.": "{0} nem érvényes.", + "The {0} field is not a valid e-mail address.": "A {0} nem érvényes email cím.", + "The {0} field only accepts files with the following extensions: {1}": "A {0} mező csak olyan fileokat tartalmazhat melynek kiterjesztése ezek: {1}", + "The field {0} must be a string or array type with a maximum length of '{1}'.": "A {0} mező szöveg vagy felsorolás típusú lehet '{1}' maximum hosszal.", + "The field {0} must be a string or array type with a minimum length of '{1}'.": "A {0} mező szöveg vagy felsorolás típusú lehet '{1}' minimum hosszal.", + "The {0} field is not a valid phone number.": "A {0} nem érvényes telefonszám.", + "The field {0} must be between {1} and {2}.": "A {0} értéke {1} és {2} között kell legyen.", + "The field {0} must match the regular expression '{1}'.": "A {0} nem megfelelő a szükséges formátumnak.", + "The {0} field is required.": "A {0} kötelező.", + "The field {0} must be a string with a maximum length of {1}.": "A {0} szövegnek kell lennie maximum {1} hosszan.", + "The field {0} must be a string with a minimum length of {2} and a maximum length of {1}.": "A {0} mezőnek szöveget kell tartalmaznia minimum {2} és maximum {1} hosszan.", + "The {0} field is not a valid fully-qualified http, https, or ftp URL.": "A {0} mező nem érvényes fully-qualified http, https, vagy ftp URL cím.", + "The field {0} is invalid.": "A {0} mező nem érvényes.", + "ThisFieldIsNotAValidCreditCardNumber.": "A mező nem érvényes bankkártya számot tartalmaz.", + "ThisFieldIsNotValid.": "A mező nem érvényes.", + "ThisFieldIsNotAValidEmailAddress.": "A mező nem érvényes email cím.", + "ThisFieldOnlyAcceptsFilesWithTheFollowingExtensions:{0}": "A mező csak fileneveket fogad a következő kiterjesztésekkel: {0}", + "ThisFieldMustBeAStringOrArrayTypeWithAMaximumLengthOf{0}": "A mezőnek szöveg vagy felsorolás tpusúnak kell lennie maximum '{0}' hosszal.", + "ThisFieldMustBeAStringOrArrayTypeWithAMinimumLengthOf{0}": "A mezőnek szöveg vagy felsorolás tpusúnak kell lennie minimum '{0}' hosszal.", + "ThisFieldIsNotAValidPhoneNumber.": "A mező nem érvényes telefonszám.", + "ThisFieldMustBeBetween{0}And{1}": "A mező értéke {0} és {1} között kell lennie.", + "ThisFieldMustMatchTheRegularExpression{0}": "A mezőnek meg kell felelnie a következő reguláris kifejezésnek '{0}'.", + "ThisFieldIsRequired.": "A mező szükséges.", + "ThisFieldMustBeAStringWithAMaximumLengthOf{0}": "A mezőnek szöveg tpusúnak kell lennie maximum {0} hosszal.", + "ThisFieldMustBeAStringWithAMinimumLengthOf{1}AndAMaximumLengthOf{0}": "A mezőnek szöveget kell tartalmaznia minimum {1} és maximum {0} hosszan.", + "ThisFieldIsNotAValidFullyQualifiedHttpHttpsOrFtpUrl": "A mező nem érvényes fully-qualified http, https, vagy ftp URL cím.", + "ThisFieldIsInvalid.": "A mező nem érvényes." + } + } \ No newline at end of file diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs index c666aeaa44..f569283415 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs @@ -87,6 +87,7 @@ namespace Volo.Abp.AspNetCore.Mvc ).AddVirtualJson("/Volo/Abp/AspNetCore/Mvc/Localization/Resource"); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); }); diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/hu.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/hu.json new file mode 100644 index 0000000000..3aba5802f0 --- /dev/null +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Localization/Resource/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "BirthDate": "Születési dátum", + "Value1": "Első érték" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/hu.json b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/hu.json new file mode 100644 index 0000000000..e38fd7e4ea --- /dev/null +++ b/framework/test/Volo.Abp.Emailing.Tests/Volo/Abp/Emailing/Localization/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "hello": "Helló" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/hu.json b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/hu.json new file mode 100644 index 0000000000..6b4126d628 --- /dev/null +++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Localization/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "Volo.Abp.Http.DynamicProxying:10001": "Üzleti kivétel adatokkal: {0}" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/hu.json new file mode 100644 index 0000000000..b24e716b43 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/CountryNames/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "USA": "Amerikai egyesült államok", + "Brazil": "Brazília" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/hu.json new file mode 100644 index 0000000000..204e26f7bf --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Base/Validation/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "ThisFieldIsRequired": "Ez a mező kötelező", + "MaxLenghtErrorMessage": "Ez a mező legfeljebb „{0}” karakter lehet" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/hu.json new file mode 100644 index 0000000000..dcf31962c6 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/Source/hu.json @@ -0,0 +1,11 @@ +{ + "culture": "hu", + "texts": { + "Hello {0}.": "Helló {0}", + "Car": "Autó", + "CarPlural": "Autók", + "MaxLenghtErrorMessage": "Ennek a mezőnek a hossza legfeljebb „{0}” karakter lehet", + "Universe": "Világegyetem", + "FortyTwo": "Negyvenkettő" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/hu.json b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/hu.json new file mode 100644 index 0000000000..51e3778d88 --- /dev/null +++ b/framework/test/Volo.Abp.Localization.Tests/Volo/Abp/Localization/TestResources/SourceExt/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "SeeYou": "Találkozunk" + } +} \ No newline at end of file diff --git a/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/hu.json b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/hu.json new file mode 100644 index 0000000000..b9614b0a20 --- /dev/null +++ b/framework/test/Volo.Abp.TextTemplating.Tests/Volo/Abp/TextTemplating/Localization/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "HelloText": "Helló {0}", + "HowAreYou": "hogy vagy?" + } +} \ No newline at end of file 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 new file mode 100644 index 0000000000..6d2e1c6460 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/hu.json @@ -0,0 +1,61 @@ +{ + "culture": "hu", + "texts": { + "UserName": "Felhasználónév", + "EmailAddress": "Email cím", + "UserNameOrEmailAddress": "Felhasználónév és email cím", + "Password": "Jelszó", + "RememberMe": "Emlékezz rám", + "UseAnotherServiceToLogin": "Használjon másik szolgáltatást a bejelentkezéshez", + "UserLockedOutMessage": "A felhasználói fiókot érvénytelen bejelentkezési kísérletek miatt zároltuk. Kérjük, várjon egy kicsit, és próbálja újra.", + "InvalidUserNameOrPassword": "Érvénytelen felhasználónév vagy jelszó!", + "LoginIsNotAllowed": "Ön nem léphet be! Meg kell erősítenie e-mail címét / telefonszámát.", + "SelfRegistrationDisabledMessage": "Ennél az alkalmazásnál az önregisztráció le van tiltva. Új felhasználó regisztrálásához vegye fel a kapcsolatot az alkalmazás rendszergazdájával.", + "LocalLoginDisabledMessage": "A helyi bejelentkezés le van tiltva ennél az alkalmazásnál.", + "Login": "Bejelntkezés", + "Cancel": "Mégsem", + "Register": "Regisztráció", + "AreYouANewUser": "Őn új felhasználó?", + "AlreadyRegistered": "Már regisztrált?", + "InvalidLoginRequest": "Érvénytelen bejelentkezési kérelem", + "ThereAreNoLoginSchemesConfiguredForThisClient": "Ehhez az ügyfélhez nincsenek konfigurálva bejelentkezési sémák.", + "LogInUsingYourProviderAccount": "Jelentkezzen be a(z) {0} fiókjával", + "DisplayName:CurrentPassword": "Jelenlegi jelszó", + "DisplayName:NewPassword": "Új jelszó", + "DisplayName:NewPasswordConfirm": "Erősítse meg az új jelszavát", + "PasswordChangedMessage": "Jelszavát sikeresen megváltoztattuk.", + "DisplayName:UserName": "Felhasználónév", + "DisplayName:Email": "Email", + "DisplayName:Name": "Neve", + "DisplayName:Surname": "Vezetéknév", + "DisplayName:Password": "Jelszó", + "DisplayName:EmailAddress": "Email cím", + "DisplayName:PhoneNumber": "Telefonszám", + "PersonalSettings": "Személyes beállítások", + "PersonalSettingsSaved": "Személyes beállítások mentve", + "PasswordChanged": "Jelszó megváltoztatva", + "NewPasswordConfirmFailed": "Kérjük, erősítse meg az új jelszót.", + "Manage": "Kezelés", + "ManageYourProfile": "Kezelje a profilját", + "DisplayName:Abp.Account.IsSelfRegistrationEnabled": "Engedélyezve van az önregisztráció", + "Description:Abp.Account.IsSelfRegistrationEnabled": "A felhasználó saját maga regisztrálhatja-e a fiókot.", + "DisplayName:Abp.Account.EnableLocalLogin": "Hitelesítés helyi fiókkal", + "Description:Abp.Account.EnableLocalLogin": "Jelzi, hogy a szerver engedélyezi-e a felhasználóknak a hitelesítést egy helyi fiókkal.", + "LoggedOutTitle": "Kijelentkezett", + "LoggedOutText": "Kijelentkeztünk, és hamarosan átirányítjuk.", + "ReturnToText": "Kattintson ide a(z) {0} címre történő átirányításhoz", + "OrLoginWith": "Vagy jelentkezzen be", + "ForgotPassword": "Elfelejtette a jelszavát?", + "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", + "ResetPassword_Information": "Kérjük, írja be új jelszavát.", + "YourPasswordIsSuccessfullyReset": "Jelszavát sikeresen visszaállította.", + "GoToTheApplication": "Lépjen az alkalmazáshoz", + "BackToLogin": "Vissza a bejelentkezéshez", + "ProfileTab:Password": "Jelszó módosítása", + "ProfileTab:PersonalInfo": "Személyes adatok", + "ReturnToApplication": "Vissza az alkalmazáshoz" + } +} \ No newline at end of file diff --git a/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/hu.json b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/hu.json new file mode 100644 index 0000000000..2600340ef2 --- /dev/null +++ b/modules/blob-storing-database/src/Volo.Abp.BlobStoring.Database.Domain.Shared/Volo/Abp/BlobStoring/Database/Localization/hu.json @@ -0,0 +1,6 @@ +{ + "culture": "hu", + "texts": { + "ManageYourProfile": "Kezelje a profilját" + } + } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/hu.json b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/hu.json new file mode 100644 index 0000000000..9422bf8bdd --- /dev/null +++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo/Blogging/Localization/Resources/hu.json @@ -0,0 +1,59 @@ +{ + "culture": "hu", + "texts": { + "Menu:Blogs": "Blog", + "Menu:BlogManagement": "Blogolás", + "Permission:Management": "Menedzsment", + "Permission:Edit": "Szerkesztés", + "Permission:Create": "Létrehozás", + "Permission:Delete": "Törlés", + "Permission:Blogging": "Blog", + "Permission:Blogs": "Blogok", + "Permission:Posts": "Bejegyzések", + "Permission:Tags": "Címkék", + "Permission:Comments": "Megjelgyzések", + "Title": "Cím", + "Delete": "Törlés", + "Reply": "Válasz", + "ReplyTo": "Válasz erre: {0}", + "ContinueReading": "Olvasás folytatása", + "DaysAgo": "{0} napja", + "YearsAgo": "{0} éve", + "MonthsAgo": "{0} hónapja", + "WeeksAgo": "{0} hete", + "MinutesAgo": "{0} perce", + "SecondsAgo": "{0} másodperceo", + "HoursAgo": "{0} órája", + "Now": "most", + "Content": "Tartalom", + "SeeAll": "Összes nézése", + "PopularTags": "Népszerű címkék", + "WiewsWithCount": "{0} megtekintés", + "LastPosts": "Utolsó bejegyzés", + "LeaveComment": "Hozzászólás elhagyása", + "TagsInThisArticle": "Címkék ebben a cikkben", + "Posts": "Bejegyzések", + "Edit": "Szerkesztés", + "BLOG": "BLOG", + "CommentDeletionWarningMessage": "A megjegyzés törlésre kerül.", + "PostDeletionWarningMessage": "A bejegyzés törlődik.", + "BlogDeletionWarningMessage": "A blog törlődik.", + "AreYouSure": "Biztos ebben?", + "CommentWithCount": "{0} hozzászólás", + "Comment": "Hozzászólás", + "ShareOnTwitter": "Megosztás a Twitteren", + "CoverImage": "Borítókép", + "CreateANewPost": "Új bejegyzés létrehozása", + "CreateANewBlog": "Új blog létrehozása", + "WhatIsNew": "Milyen újdonságok vannak?", + "Name": "Név", + "ShortName": "Rövid név", + "CreationTime": "Létrehozás ideje", + "Description": "Leírás", + "Blogs": "Blogok", + "Tags": "Címkék", + "ShareOn": "Ossza meg", + "TitleLengthWarning": "A címméret 60 karakter alatt maradjon hogy SEO-barát legyen!" + } + } + \ No newline at end of file diff --git a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs index fe9df5d7b6..a4660cd675 100644 --- a/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/CmsKitHttpApiHostModule.cs @@ -96,6 +96,7 @@ namespace Volo.CmsKit { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs index 5fbff7cfeb..8b44d69b8e 100644 --- a/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.IdentityServer/CmsKitIdentityServerModule.cs @@ -104,6 +104,7 @@ namespace Volo.CmsKit { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs index fa084c3432..483d54d9d5 100644 --- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs +++ b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/CmsKitWebUnifiedModule.cs @@ -110,6 +110,7 @@ namespace Volo.CmsKit { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português (Brasil)")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json new file mode 100644 index 0000000000..19a0660d03 --- /dev/null +++ b/modules/cms-kit/src/Volo.CmsKit.Domain.Shared/Volo/CmsKit/Localization/Resources/hu.json @@ -0,0 +1,22 @@ +{ + "culture": "hu", + "texts": { + "PickYourReaction": "Válassza ki a reakciót", + "YourComment": "A hozzászólásod", + "YourReply": "A válaszod", + "Comments": "Megjegyzések", + "Send": "Küldés", + "Delete": "Törlés", + "Reply": "Válasz", + "Update": "Frissítés", + "Edit": "Szerkesztés", + "LoginToAddComment": "Jelentkezzen be a hozzászóláshoz", + "LoginToReply": "Jelentkezzen be a válaszhoz", + "MessageDeletionConfirmationMessage": "Ezt a megjegyzést teljesen töröljük.", + "CommentAuthorizationExceptionMessage": "Ezek a megjegyzések nem nyilvánosak.", + "Undo": "Visszavonás", + "RatingUndoMessage": "Az értékelésed visszavonásra kerül.", + "LoginToRate": "Jelentkezzen be az értékeléshez", + "Star": "Csillag" + } + } \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/hu.json b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/hu.json new file mode 100644 index 0000000000..a2768780cb --- /dev/null +++ b/modules/docs/app/VoloDocs.Web/Localization/Resources/VoloDocs/Web/hu.json @@ -0,0 +1,10 @@ +{ + "culture": "hu", + "texts": { + "DocsTitle": "VoloDocs", + "WelcomeVoloDocs": "Üdvözöljük a VoloDocs-ban!", + "NoProjectWarning": "Még nincs meghatározott projekt!", + "CreateYourFirstProject": "Kattintson ide az első projekt elindításához", + "NoProject": "Nincs projekt!" + } +} \ No newline at end of file diff --git a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs index d9673269b3..fcbb5331aa 100644 --- a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs +++ b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs @@ -123,6 +123,7 @@ namespace VoloDocs.Web { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/hu.json b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/hu.json new file mode 100644 index 0000000000..10d1611838 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo/Docs/Admin/Localization/Resources/Docs/ApplicationContracts/hu.json @@ -0,0 +1,61 @@ +{ + "culture": "hu", + "texts": { + "Permission:DocumentManagement": "Dokumentum kezelés", + "Permission:Projects": "Projektek", + "Permission:Edit": "Szerkesztés", + "Permission:Delete": "Törlés", + "Permission:Create": "Létrehozás", + "Permission:Documents": "Dokumentumok", + "Menu:Documents": "Dokumentumok", + "Menu:DocumentManagement": "Dokumentumok", + "Menu:ProjectManagement": "Projektek", + "CreateANewProject": "Új projekt létrehozása", + "Edit": "Szerkesztés", + "Create": "Létrehozás", + "Pull": "Pull", + "Projects": "Projektek", + "Name": "Név", + "ShortName": "Rövid név", + "DocumentStoreType": "Dokumentumtároló típus", + "Format": "Formátum", + "ShortNameInfoText": "Használjon egyedi URL-t.", + "DisplayName:Name": "Név", + "DisplayName:ShortName": "Rövid név", + "DisplayName:Format": "Formátum", + "DisplayName:DefaultDocumentName": "Alapértlemezett dokumentum név", + "DisplayName:NavigationDocumentName": "Navigációs dokumentum neve", + "DisplayName:MinimumVersion": "Minimális verzió", + "DisplayName:MainWebsiteUrl": "A fő webhely URL-je", + "DisplayName:LatestVersionBranchName": "Az utolsó verzió branch neve", + "DisplayName:GitHubRootUrl": "GitHub root URL", + "DisplayName:GitHubAccessToken": "GitHub access token", + "DisplayName:GitHubUserAgent": "GitHub user agent", + "DisplayName:GithubVersionProviderSource": "GitHub version provider source", + "DisplayName:VersionBranchPrefix": "Version branch prefix", + "DisplayName:All": "Pull all", + "DisplayName:LanguageCode": "Nyelv kódja", + "DisplayName:Version": "Verzió", + "Documents": "Dokumentumok", + "RemoveFromCache": "Távolítsa el a gyorsítótárból", + "Reindex": "Újraindexálás", + "ReindexCompleted": "Újraindexálás teljes.", + "RemovedFromCache": "Távolítsa el a gyorsítótárból", + "RemoveFromCacheConfirmation": "Biztosan eltávolítja ezt az elemet a gyorsítótárból?", + "ReIndexDocumentConfirmation": "Biztosan újraindexeli ezt az elemet?", + "DeleteDocumentFromDbConfirmation": "Biztosan törli ezt az elemet az adatbázisból?", + "DeleteFromDatabase": "Törlés az adatbázisból", + "Deleted": "Törölt", + "Search": "Keresés", + "StartDate": "Indulási dátum", + "EndDate": "Befejezés dátuma", + "CreationTime": "Létrehozás ideje", + "LastUpdateTime": "Utolsó módosítás ideje", + "LastSignificantUpdateTime": "Utolsó jelentős frissítés", + "Version": "Verzió", + "LanguageCode": "Nyelv kódja", + "FileName": "Filenév", + "LastCachedTime": "Cache idő" + } + } + \ No newline at end of file diff --git a/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json new file mode 100644 index 0000000000..4c18c1a592 --- /dev/null +++ b/modules/docs/src/Volo.Docs.Domain/Volo/Docs/Localization/Domain/hu.json @@ -0,0 +1,39 @@ +{ + "culture": "hu", + "texts": { + "Documents": "Dokumnetumok", + "BackToWebsite": "Vissza a weboldalra", + "Contributors": "Közreműködők", + "ShareOn": "Ossza meg", + "Version": "Verzió", + "Edit": "Szerkesztés", + "LastEditTime": "Utolsó módosítás", + "Delete": "Törlés", + "ClearCache": "Gyorsítótár törlése", + "ClearCacheConfirmationMessage": "Biztosan törli az összes gyorsítótárat a projekthez \"{0}\"", + "ReIndexAllProjects": "Újraindexálja az össze projectet", + "ReIndexProject": "Project újraindexálása", + "ReIndexProjectConfirmationMessage":"Biztosan újraindexeli a projektet \"{0}\"", + "SuccessfullyReIndexProject": "Sikeresen újraindexelte a projektet \"{0}\"", + "ReIndexAllProjectConfirmationMessage": "Biztosan újraindexeli az összes projektet?", + "SuccessfullyReIndexAllProject": "Minden projekt újraindexelése sikeres", + "InThisDocument": "Ebben a dokumentumban", + "GoToTop": "Menj a tetejére", + "Projects": "Projekt(ek)", + "NoProjectWarning": "Még nincsenek projektek!", + "DocumentNotFound": "Hoppá, a kért dokumentum nem található!", + "ProjectNotFound": "Hoppá, a kért projekt nem található!", + "NavigationDocumentNotFound": "Ez a verzió nem tartalmaz navigációs dokumentumot!", + "DocumentNotFoundInSelectedLanguage": "A kívánt nyelven található dokumentum nem található. Megjelenik az alapértelmezett nyelvű dokumentum.", + "FilterTopics": "Témák szűrése", + "FullSearch": "Keresés a dokumentumokban", + "Volo.Docs.Domain:010001": "A Elastic search nincs engedélyezve.", + "MultipleVersionDocumentInfo": "Ennek a dokumentumnak több változata van. Válassza ki az Ön számára legmegfelelőbb lehetőségeket.", + "New": "Új", + "Upd": "Mód", + "NewExplanation": "Az elmúlt két hétben készült.", + "UpdatedExplanation": "Az elmúlt két hétben frissült.", + "Volo.Docs.Domain:010002": "Rövid név {ShortName} már létezik." + } + } + \ No newline at end of file diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/hu.json b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/hu.json new file mode 100644 index 0000000000..a7e1b8378e --- /dev/null +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/Localization/Domain/hu.json @@ -0,0 +1,11 @@ +{ + "culture": "hu", + "texts": { + "Features": "Funkciók", + "NoFeatureFoundMessage": "Nincs elérhető funkció.", + "Permission:FeatureManagement": "Funkciókezelés", + "Permission:FeatureManagement.ManageHostFeatures": "Host funkciók kezelése", + "Volo.Abp.FeatureManagement:InvalidFeatureValue" : "A (z) {0} szolgáltatás értéke érvénytelen!" + } + } + \ No newline at end of file diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json new file mode 100644 index 0000000000..8c5c67bc5f --- /dev/null +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/Localization/hu.json @@ -0,0 +1,121 @@ +{ + "culture": "hu", + "texts": { + "Menu:IdentityManagement": "Identitáskezelés", + "Users": "Felhasználók", + "NewUser": "Új felhasználó", + "UserName": "Felhasználónév", + "EmailAddress": "Email cím", + "PhoneNumber": "Telefonszám", + "UserInformations": "Felhasználói információ", + "DisplayName:IsDefault": "Alapértelmezett", + "DisplayName:IsStatic": "Statikus", + "DisplayName:IsPublic": "Publikus", + "Roles": "Szerepkörök", + "Password": "Jelszó", + "PersonalInfo": "Profilom", + "PersonalSettings": "Személyes beállítások", + "UserDeletionConfirmationMessage": "'{0}' felhasználó törlődni fog. Jóváhagyja?", + "RoleDeletionConfirmationMessage": "'{0}' szerepkör törlődni fog. Jóváhagyja?", + "DisplayName:RoleName": "Szerepkör neve", + "DisplayName:UserName": "Felhasználó neve", + "DisplayName:Name": "Név", + "DisplayName:Surname": "Vezetéknév", + "DisplayName:Password": "Jelszó", + "DisplayName:Email": "Email cím", + "DisplayName:PhoneNumber": "Telefonszám", + "DisplayName:TwoFactorEnabled": "Kétlépcsős azonosítás", + "DisplayName:LockoutEnabled": "Fiók zárolása sikertelen bejelentkezési kísérletek után", + "NewRole": "Új szerepkör", + "RoleName": "Szerepkör neve", + "CreationTime": "Létrehozás időpontja", + "Permissions": "Engedélyek", + "DisplayName:CurrentPassword": "Jelenlegi jelszó", + "DisplayName:NewPassword": "Új jelszó", + "DisplayName:NewPasswordConfirm": "Új jelszó megerősítése", + "PasswordChangedMessage": "Jelszavát sikeresen megváltoztattuk.", + "PersonalSettingsSavedMessage": "Személyes beállításait sikeresen mentette.", + "Volo.Abp.Identity:DefaultError": "Ismeretlen hiba történt.", + "Volo.Abp.Identity:ConcurrencyFailure": "Optimista párhuzamossági hiba, az objektum módosult.", + "Volo.Abp.Identity:DuplicateEmail": "Az '{0}' email cím már foglalt.", + "Volo.Abp.Identity:DuplicateRoleName": "Szerepkör neve '{0}' foglalt.", + "Volo.Abp.Identity:DuplicateUserName": "'{0}' felahsználónév foglalt.", + "Volo.Abp.Identity:InvalidEmail": "'{0}' email cím érvénytelen.", + "Volo.Abp.Identity:InvalidPasswordHasherCompatibilityMode": "A megadott PasswordHasherCompatibilityMode érvénytelen.", + "Volo.Abp.Identity:InvalidPasswordHasherIterationCount": "Az iterációszámnak pozitív egész számnak kell lennie.", + "Volo.Abp.Identity:InvalidRoleName": "'{0}' szerepkör név érvénytelen.", + "Volo.Abp.Identity:InvalidToken": "Érvénytelen token.", + "Volo.Abp.Identity:InvalidUserName": "'{0}' felhasználónév érvénytelen, csak betűket és számokat tartalmazhat.", + "Volo.Abp.Identity:LoginAlreadyAssociated": "Az ilyen bejelentkezéssel rendelkező felhasználó már létezik.", + "Volo.Abp.Identity:PasswordMismatch": "Érvénytelen jelszó.", + "Volo.Abp.Identity:PasswordRequiresDigit": "A jelszavaknak legalább egy számjegyet kell rendelkezniük ('0'-'9').", + "Volo.Abp.Identity:PasswordRequiresLower": "A jelszavaknak legalább egy kisbetűvel kell rendelkezniük('a'-'z').", + "Volo.Abp.Identity:PasswordRequiresNonAlphanumeric": "A jelszavaknak legalább egy nem alfanumerikus karaktkarakterrel kell rendelkezniük.", + "Volo.Abp.Identity:PasswordRequiresUpper": "A jelszavaknak legalább egy nagybetűvel kell rendelkezniük ('A'-'Z').", + "Volo.Abp.Identity:PasswordTooShort": "A jelszónak minimum {0} karaktert kell tartalmaznia.", + "Volo.Abp.Identity:RoleNotFound": "{0} szerepkür nem létezik.", + "Volo.Abp.Identity:UserAlreadyHasPassword": "A felhasználónak már van jelszava.", + "Volo.Abp.Identity:UserAlreadyInRole": "A felhasználó már rendelkezik a '{0}' szerepkörrel.", + "Volo.Abp.Identity:UserLockedOut": "A felhasználó zárolva van.", + "Volo.Abp.Identity:UserLockoutNotEnabled": "A zárolás nincs engedélyezve ennél a felhasználónál.", + "Volo.Abp.Identity:UserNameNotFound": "{0} felhasználó nem létezik.", + "Volo.Abp.Identity:UserNotInRole": "A felhasználó nem rendelkezik a {0} szerepkörrel.", + "Volo.Abp.Identity:PasswordConfirmationFailed": "A jelszó nem egyezik meg a megerősítési jelszóval.", + "Volo.Abp.Identity:010001": "Nem törölheti saját fiókját!", + "Volo.Abp.Identity:010002": "Legfeljebb {MaxUserMembershipCount} szervezeti egységet állíthat be egy felhasználó számára!", + "Volo.Abp.Identity:010003": "Külsőleg bejelentkezett felhasználó jelszavát nem lehet megváltoztatni!", + "Volo.Abp.Identity:010004": "Már létezik egy szervezeti egység, amelynek neve {0}. Két azonos nevű egység nem hozható létre ugyanazon a szinten.", + "Volo.Abp.Identity:010005": "A statikus szerepeket nem lehet átnevezni.", + "Volo.Abp.Identity:010006": "A statikus szerepeket nem lehet törölni.", + "Volo.Abp.Identity:010007": "Nem változtathatja meg a kétlépcsős bejelentkezés beállítását.", + "Volo.Abp.Identity:010008": "Kétlépcsős bejelentkezés beállítás megváltoztatása nem megengedett.", + "Identity.OrganizationUnit.MaxUserMembershipCount": "A maximálisan megengedett szervezeti egység tagsági szám egy felhasználó számára", + "Permission:IdentityManagement": "Identitáskezelés", + "Permission:RoleManagement": "Szerepkörkezelés", + "Permission:Create": "Létrehozás", + "Permission:Edit": "Szerkesztés", + "Permission:Delete": "Törlés", + "Permission:ChangePermissions": "Engedélyek módosítása", + "Permission:UserManagement": "Felhasználókezelés", + "Permission:UserLookup": "Felhaszáló keresés", + "Feature:IdentityGroup": "Identitás", + "Feature:TwoFactor": "Kétlépcsős", + "Feature:TwoFactorDescription": "Kétlépcsős hitelesítés", + "Feature:TwoFactor.Optional": "Választható", + "Feature:TwoFactor.Disabled": "Tiltott", + "Feature:TwoFactor.Forced": "Kényszerített", + "DisplayName:Abp.Identity.Password.RequiredLength": "Szükséges hossz", + "DisplayName:Abp.Identity.Password.RequiredUniqueChars": "Szükséges egyedi karakterek száma", + "DisplayName:Abp.Identity.Password.RequireNonAlphanumeric": "Szükséges nem alfanumerikus karakter", + "DisplayName:Abp.Identity.Password.RequireLowercase": "Szükséges kisbetű", + "DisplayName:Abp.Identity.Password.RequireUppercase": "Szükséges nagybetű", + "DisplayName:Abp.Identity.Password.RequireDigit": "Szükséges számjegy", + "DisplayName:Abp.Identity.Lockout.AllowedForNewUsers": "Engedélyezve az új felhasználók számára", + "DisplayName:Abp.Identity.Lockout.LockoutDuration": "A zárolás időtartama (másodpercben)", + "DisplayName:Abp.Identity.Lockout.MaxFailedAccessAttempts": "Max sikertelen hozzáférési kísérlet", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedEmail": "Megerősített e-mail megkövetelése", + "DisplayName:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "Engedje meg a felhasználóknak, hogy erősítsék meg telefonszámukat", + "DisplayName:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "Meg kell erősíteni a telefonszámot", + "DisplayName:Abp.Identity.User.IsUserNameUpdateEnabled": "Engedje meg a felhasználóknak a felhasználónevük megváltoztatását", + "DisplayName:Abp.Identity.User.IsEmailUpdateEnabled": "Engedje meg a felhasználóknak, hogy megváltoztassák e-mail címüket", + "Description:Abp.Identity.Password.RequiredLength": "A jelszó minimális hosszának meg kell lennie.", + "Description:Abp.Identity.Password.RequiredUniqueChars": "A jelszavak által tartalmazandó egyedi karakterek minimális száma.", + "Description:Abp.Identity.Password.RequireNonAlphanumeric": "Ha a jelszavaknak nem alfanumerikus karaktert kell tartalmazniuk.", + "Description:Abp.Identity.Password.RequireLowercase": "Ha a jelszavaknak kisbetűs ASCII karaktert kell tartalmazniuk.", + "Description:Abp.Identity.Password.RequireUppercase": "Ha a jelszavaknak nagybetűs ASCII karaktert kell tartalmazniuk.", + "Description:Abp.Identity.Password.RequireDigit": "Ha a jelszavaknak tartalmazniuk kell egy számjegyet.", + "Description:Abp.Identity.Lockout.AllowedForNewUsers": "Egy új felhasználó zárolható-e.", + "Description:Abp.Identity.Lockout.LockoutDuration": "Az az időtartam, amelyre a felhasználó zárolva van, amikor zárolás történik.", + "Description:Abp.Identity.Lockout.MaxFailedAccessAttempts": "A felhasználó zárolása előtt megengedett sikertelen hozzáférési kísérletek száma, feltéve, hogy a zárolás engedélyezve van.", + "Description:Abp.Identity.SignIn.RequireConfirmedEmail": "Szükség van-e megerősített e-mail címre a bejelentkezéshez.", + "Description:Abp.Identity.SignIn.EnablePhoneNumberConfirmation": "Meg tudja-e erősíteni a telefonszámot a felhasználó.", + "Description:Abp.Identity.SignIn.RequireConfirmedPhoneNumber": "Szükség van-e megerősített telefonszámra a bejelentkezéshez.", + "Description:Abp.Identity.User.IsUserNameUpdateEnabled": "Meg tudja e módosítani a felhasználónevet a felhasználó?.", + "Description:Abp.Identity.User.IsEmailUpdateEnabled": "Meg tudja-e módosítani az e-mail címét a felhasználó.", + "DisplayName:Abp.Identity.TwoFactorBehaviour": "Kétlépcsős bejelentkezés viselkedése", + "Description:Abp.Identity.TwoFactorBehaviour": "Kétlépcsős bejelentkezés viselkedése", + "DisplayName:Abp.Identity.UsersCanChange": "Lehetővé teszi a felhasználóknak a kétlépcsős beállítások megváltoztatását.", + "Description:Abp.Identity.UsersCanChange": "Lehetővé teszi a felhasználóknak a kétlépcsős beállítások megváltoztatását." + } + } + \ No newline at end of file diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/hu.json b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/hu.json new file mode 100644 index 0000000000..e4109a2ba7 --- /dev/null +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain.Shared/Volo/Abp/IdentityServer/Localization/Resources/hu.json @@ -0,0 +1,13 @@ +{ + "culture": "hu", + "texts": { + "Volo.IdentityServer:DuplicateIdentityResourceName": "Azonosító erőforrás neve már létezik: {Name}", + "Volo.IdentityServer:DuplicateApiResourceName": "Az Api erőforrás neve már létezik: {Name}", + "Volo.IdentityServer:DuplicateClientId": "ClientId már létezik: {ClientId}", + "UserLockedOut": "A felhasználói fiókot érvénytelen bejelentkezési kísérletek miatt zároltuk. Kérjük, várjon egy kicsit, és próbálja újra.", + "InvalidUserNameOrPassword": "Érvénytelen felhasználónév vagy jelszó!", + "LoginIsNotAllowed": "Ön nem léphet be! Meg kell erősítenie e-mail címét / telefonszámát.", + "InvalidUsername": "Érvénytelen felhasználónév vagy jelszó!", + "TheTargetUserIsNotLinkedToYou": "A célfelhasználó nincs hozzád kapcsolódva!" + } +} \ No newline at end of file diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/hu.json b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/hu.json new file mode 100644 index 0000000000..aaf2369adc --- /dev/null +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo/Abp/PermissionManagement/Localization/Domain/hu.json @@ -0,0 +1,10 @@ +{ + "culture": "hu", + "texts": { + "Permissions": "Engedélyek", + "OnlyProviderPermissons": "Csak ez a szolgáltató", + "All": "Összes", + "SelectAllInAllTabs": "Adjon meg minden engedélyt", + "SelectAllInThisTab": "Mindet kiválaszt" + } + } \ No newline at end of file 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 new file mode 100644 index 0000000000..886eab2ce6 --- /dev/null +++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo/Abp/SettingManagement/Localization/Resources/AbpSettingManagement/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "Settings": "Beállítások", + "SuccessfullySaved": "Sikeresen mentve" + } + } \ No newline at end of file diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/hu.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/hu.json new file mode 100644 index 0000000000..60c61c15cf --- /dev/null +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/hu.json @@ -0,0 +1,24 @@ +{ + "culture": "hu", + "texts": { + "Menu:TenantManagement": "Bérlő menedzsment", + "Tenants": "Bérlők", + "NewTenant": "Új bérlő", + "TenantName": "Bérlő neve", + "DisplayName:TenantName": "Bérlő neve", + "TenantDeletionConfirmationMessage": "A '{0}' bérlő törlésre kerül. Megerősíti a műveletet?", + "ConnectionStrings": "Kapcsolat beállítás", + "DisplayName:DefaultConnectionString": "Alapértelmezettt kapcsolati beállítás", + "DisplayName:UseSharedDatabase": "Használjon megosztott adatbázist", + "ManageHostFeatures": "Host funkciók kezelése", + "Permission:TenantManagement": "Bérlő menedzsment", + "Permission:Create": "Létrehozás", + "Permission:Edit": "Szerkesztés", + "Permission:Delete": "Törlés", + "Permission:ManageConnectionStrings": "Kapcsolati beállítások kezelése", + "Permission:ManageFeatures": "Funkciók kezelése", + "DisplayName:AdminEmailAddress": "Admin email cím", + "DisplayName:AdminPassword": "Admin jelszó" + } + } + \ No newline at end of file diff --git a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs index b1b0d2945c..3b4521f43a 100644 --- a/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs +++ b/modules/virtual-file-explorer/app/Volo.Abp.VirtualFileExplorer.DemoApp/AbpVirtualFileExplorerDemoAppModule.cs @@ -20,6 +20,7 @@ namespace Volo.Abp.VirtualFileExplorer.DemoApp { options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文")); }); diff --git a/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hu.json b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hu.json new file mode 100644 index 0000000000..8d11e0be78 --- /dev/null +++ b/modules/virtual-file-explorer/src/Volo.Abp.VirtualFileExplorer.Web/Localization/Resources/hu.json @@ -0,0 +1,15 @@ +{ + "culture": "hu", + "texts": { + "VirtualFileExplorer" : "Virtuális file böngésző", + "VirtualFileType" : "Virtuális file típus", + "Menu:VirtualFileExplorer" : "Virtuális file böngésző", + "LastUpdateTime" : "Utolsó módosítás ideje", + "VirtualFileName" : "Virtuális file neve", + "FileContent" : "File tartalma", + "Size" : "Méret", + "BackToRoot" : "Vissza a fő mappába", + "EmptyFileInfoList" : "Nem találhatóak virtuális fileok" + } + } + \ No newline at end of file diff --git a/nupkg/common.ps1 b/nupkg/common.ps1 index e5e8af6d70..6564f4818a 100644 --- a/nupkg/common.ps1 +++ b/nupkg/common.ps1 @@ -93,6 +93,7 @@ $projects = ( "framework/src/Volo.Abp.EventBus", "framework/src/Volo.Abp.EventBus.RabbitMQ", "framework/src/Volo.Abp.EventBus.Kafka", + "framework/src/Volo.Abp.EventBus.Rebus", "framework/src/Volo.Abp.ExceptionHandling", "framework/src/Volo.Abp.Features", "framework/src/Volo.Abp.FluentValidation", diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/hu.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/hu.json new file mode 100644 index 0000000000..c7b6a33a0f --- /dev/null +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/hu.json @@ -0,0 +1,8 @@ +{ + "culture": "hu", + "texts": { + "Menu:Home": "Kezdőlap", + "Welcome": "Üdvözlöm", + "LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra." + } +} \ No newline at end of file diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index ad116c7b98..8259259152 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -121,6 +121,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs index 8992c7c555..873f97d96a 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs @@ -129,6 +129,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index 8054d31d6a..e717794618 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -62,6 +62,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 582ac8c2c2..10aa1269c9 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -145,6 +145,7 @@ namespace MyCompanyName.MyProjectName.Web options.Languages.Add(new LanguageInfo("ar", "ar", "العربية")); options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs index 12324b9f3c..1c1af02001 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/MyProjectNameHttpApiHostModule.cs @@ -92,6 +92,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs index a3bbb4220a..bb77565ecd 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.IdentityServer/MyProjectNameIdentityServerModule.cs @@ -103,6 +103,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs index f9c81d727f..773632b36a 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/MyProjectNameWebUnifiedModule.cs @@ -100,6 +100,7 @@ namespace MyCompanyName.MyProjectName options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština")); options.Languages.Add(new LanguageInfo("en", "en", "English")); options.Languages.Add(new LanguageInfo("fr", "fr", "Français")); + options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar")); options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português (Brasil)")); options.Languages.Add(new LanguageInfo("ru", "ru", "Русский")); options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe")); diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/hu.json b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/hu.json new file mode 100644 index 0000000000..ac4d9c8abb --- /dev/null +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/hu.json @@ -0,0 +1,7 @@ +{ + "culture": "hu", + "texts": { + "ManageYourProfile": "Kezelje a profilját", + "SamplePageMessage": "Mintaoldal a MyProjectName modulhoz" + } +} \ No newline at end of file