From 30611e0b94142f5c28284003d0eb669de1d4532c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Tue, 30 Jun 2020 12:05:35 +0300 Subject: [PATCH] #4528 Add GenerateEmbeddedFilesManifest to the module web project --- .../MyProjectNameApplicationContractsModule.cs | 9 +-------- .../Localization/MyProjectName/en.json | 3 ++- .../Localization/MyProjectName/tr.json | 3 ++- .../MyCompanyName.MyProjectName.Web.csproj | 5 +++++ .../MyProjectNameWebModule.cs | 2 +- .../Pages/MyProjectName/Index.cshtml | 5 ++++- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs index 5df67ff031..eda0387654 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Application.Contracts/MyProjectNameApplicationContractsModule.cs @@ -1,6 +1,5 @@ using Volo.Abp.Application; using Volo.Abp.Modularity; -using Volo.Abp.VirtualFileSystem; using Volo.Abp.Authorization; namespace MyCompanyName.MyProjectName @@ -12,12 +11,6 @@ namespace MyCompanyName.MyProjectName )] public class MyProjectNameApplicationContractsModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.FileSets.AddEmbedded("MyCompanyName.MyProjectName"); - }); - } + } } diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json index 4682353878..967ce2a906 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/en.json @@ -1,6 +1,7 @@ { "culture": "en", "texts": { - "ManageYourProfile": "Manage your profile" + "ManageYourProfile": "Manage your profile", + "SamplePageMessage": "A sample page for the MyProjectName module" } } \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/tr.json b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/tr.json index 8decb5134e..0f4fa93fc6 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/tr.json +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Domain.Shared/Localization/MyProjectName/tr.json @@ -1,6 +1,7 @@ { "culture": "tr", "texts": { - "ManageYourProfile": "Profil yönetimi" + "ManageYourProfile": "Profil yönetimi", + "SamplePageMessage": "MyProjectName modulünden örnek bir sayfa" } } \ No newline at end of file diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index d02d094f43..e47d2294ba 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -8,6 +8,7 @@ true Library MyCompanyName.MyProjectName.Web + true @@ -19,6 +20,10 @@ + + + + diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs index 48f59634c7..04ce36df22 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyProjectNameWebModule.cs @@ -41,7 +41,7 @@ namespace MyCompanyName.MyProjectName.Web Configure(options => { - options.FileSets.AddEmbedded("MyCompanyName.MyProjectName.Web"); + options.FileSets.AddEmbedded(); }); context.Services.AddAutoMapperObjectMapper(); diff --git a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml index 9f0c822fdf..5807d89d9a 100644 --- a/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml +++ b/templates/module/aspnet-core/src/MyCompanyName.MyProjectName.Web/Pages/MyProjectName/Index.cshtml @@ -1,6 +1,9 @@ @page +@using Microsoft.Extensions.Localization +@using MyCompanyName.MyProjectName.Localization @model MyCompanyName.MyProjectName.Web.Pages.MyProjectName.IndexModel +@inject IStringLocalizer L @{ }

MyProjectName

-

A sample page for the MyProjectName module.

+

@L["SamplePageMessage"]