Commit fb8304c2 authored by gdlcf88's avatar gdlcf88

Complete localization. close #7

parent 56fbce27
...@@ -25,7 +25,7 @@ namespace EasyAbp.CacheManagement ...@@ -25,7 +25,7 @@ namespace EasyAbp.CacheManagement
options.Resources options.Resources
.Add<CacheManagementResource>("en") .Add<CacheManagementResource>("en")
.AddBaseTypes(typeof(AbpValidationResource)) .AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/CacheManagement"); .AddVirtualJson("/EasyAbp/CacheManagement/Localization/CacheManagement");
}); });
Configure<AbpExceptionLocalizationOptions>(options => Configure<AbpExceptionLocalizationOptions>(options =>
......
{ {
"culture": "cs", "culture": "cs",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "en", "culture": "en",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "pl", "culture": "pl",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "pt-BR", "culture": "pt-BR",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "sl", "culture": "sl",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "tr", "culture": "tr",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "vi", "culture": "vi",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "Cache Management",
"CacheItem": "CacheItem", "Menu:CacheItems": "Cache Items",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "Detail",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "Cache Item",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "Cache Data",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "Cache Name",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "Display Name",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "Description",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "Ignore multi-tenancy",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "Allow tenants to manage this cache item",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "Cache Key",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "Cache Value",
"CreateCacheItem": "New",
"EditCacheItem": "Edit",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cache item {0}?",
"SuccessfullyDeleted": "Successfully deleted", "SuccessfullyDeleted": "Successfully deleted",
"SuccessCleared": "Successfully cleared", "SuccessCleared": "Successfully cleared",
"ClearCache": "ClearCache", "ClearCache": "Clear Cache",
"ClearAllCache": "ClearAllCache", "ClearAllCache": "Clear All",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "ClearCacheConfirmationMessage": "Are you sure to clear the cache item {0}?",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearAllCacheConfirmationMessage": "Are you sure to clear all cache items?"
} }
} }
\ No newline at end of file
{ {
"culture": "zh-Hans", "culture": "zh-Hans",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "缓存管理",
"CacheItem": "CacheItem", "Menu:CacheItems": "缓存项",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "详情",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "缓存项",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "缓存数据",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "缓存项标识",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "名称",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "描述",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "是否忽略多租户",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "是否允许租户管理此项",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "缓存键",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "缓存值",
"SuccessfullyDeleted": "Successfully deleted", "CreateCacheItem": "新建",
"SuccessCleared": "Successfully cleared", "EditCacheItem": "编辑",
"ClearCache": "ClearCache", "CacheItemDeletionConfirmationMessage": "确认删除缓存项 {0}?",
"ClearAllCache": "ClearAllCache", "SuccessfullyDeleted": "删除成功",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "SuccessCleared": "清空成功",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearCache": "清空缓存",
"ClearAllCache": "清空所有缓存",
"ClearCacheConfirmationMessage": "确认清空缓存项 {0}?",
"ClearAllCacheConfirmationMessage": "确认清空所有缓存项?"
} }
} }
\ No newline at end of file
{ {
"culture": "zh-Hant", "culture": "zh-Hant",
"texts": { "texts": {
"Menu:CacheItem": "MenuCacheItem", "Menu:CacheManagement": "緩存管理",
"CacheItem": "CacheItem", "Menu:CacheItems": "緩存項",
"CacheItemCacheName": "CacheItemCacheName", "Detail": "詳情",
"CacheItemDisplayName": "CacheItemDisplayName", "CacheItem": "緩存項",
"CacheItemDescription": "CacheItemDescription", "CacheItemData": "緩存數據",
"CacheItemIgnoreMultiTenancy": "CacheItemIgnoreMultiTenancy", "CacheItemCacheName": "緩存項標識",
"CacheItemTenantAllowed": "CacheItemTenantAllowed", "CacheItemDisplayName": "名稱",
"CacheItemCacheKey": "CacheItemCacheKey", "CacheItemDescription": "描述",
"CacheItemCacheValue": "CacheItemCacheValue", "CacheItemIgnoreMultiTenancy": "是否忽略多租戶",
"CreateCacheItem": "CreateCacheItem", "CacheItemTenantAllowed": "是否允許租戶管理此項",
"EditCacheItem": "EditCacheItem", "CacheItemCacheKey": "緩存鍵",
"CacheItemDeletionConfirmationMessage": "Are you sure to delete the cacheitem {0}?", "CacheItemCacheValue": "緩存值",
"SuccessfullyDeleted": "Successfully deleted", "CreateCacheItem": "新建",
"SuccessCleared": "Successfully cleared", "EditCacheItem": "編輯",
"ClearCache": "ClearCache", "CacheItemDeletionConfirmationMessage": "確認删除緩存項 {0}?",
"ClearAllCache": "ClearAllCache", "SuccessfullyDeleted": "删除成功",
"ClearCacheConfirmationMessage": "Are you sure to clear the cache {0}?", "SuccessCleared": "清空成功",
"ClearAllCacheConfirmationMessage": "Are you sure to clear all caches?" "ClearCache": "清空緩存",
"ClearAllCache": "清空所有緩存",
"ClearCacheConfirmationMessage": "確認清空緩存項 {0}?",
"ClearAllCacheConfirmationMessage": "確認清空所有緩存項?"
} }
} }
\ No newline at end of file
using System.Threading.Tasks; using System.Collections.Generic;
using System.Threading.Tasks;
using EasyAbp.CacheManagement.Authorization; using EasyAbp.CacheManagement.Authorization;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization; using Microsoft.Extensions.Localization;
...@@ -24,12 +25,19 @@ namespace EasyAbp.CacheManagement.Web ...@@ -24,12 +25,19 @@ namespace EasyAbp.CacheManagement.Web
var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>(); var authorizationService = context.ServiceProvider.GetRequiredService<IAuthorizationService>();
var cacheManagementMenuItem = new ApplicationMenuItem("CacheManagement", l["Menu:CacheManagement"]);
if (await authorizationService.IsGrantedAsync(CacheManagementPermissions.CacheItems.Default)) if (await authorizationService.IsGrantedAsync(CacheManagementPermissions.CacheItems.Default))
{ {
context.Menu.AddItem( cacheManagementMenuItem.AddItem(
new ApplicationMenuItem("CacheItem", l["Menu:CacheItem"], "/CacheManagement/CacheItems/CacheItem") new ApplicationMenuItem("CacheItem", l["Menu:CacheItems"], "/CacheManagement/CacheItems/CacheItem")
); );
} }
if (!cacheManagementMenuItem.Items.IsNullOrEmpty())
{
context.Menu.Items.Add(cacheManagementMenuItem);
}
} }
} }
} }
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@inject IPageLayout PageLayout @inject IPageLayout PageLayout
@{ @{
PageLayout.Content.Title = L["CacheItem"].Value; PageLayout.Content.Title = L["CacheItem"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:CacheItem"].Value); PageLayout.Content.BreadCrumb.Add(L["Menu:CacheItems"].Value);
PageLayout.Content.MenuItemName = "CacheItem"; PageLayout.Content.MenuItemName = "CacheItem";
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
@inject IPageLayout PageLayout @inject IPageLayout PageLayout
@{ @{
PageLayout.Content.Title = L["CacheItemData"].Value; PageLayout.Content.Title = L["CacheItemData"].Value;
PageLayout.Content.BreadCrumb.Add(L["Menu:CacheItem"].Value); PageLayout.Content.BreadCrumb.Add(L["Menu:CacheItems"].Value);
PageLayout.Content.MenuItemName = "CacheItem"; PageLayout.Content.MenuItemName = "CacheItem";
} }
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<thead> <thead>
<tr> <tr>
<th>@L["Actions"]</th> <th>@L["Actions"]</th>
<th>@L["CacheKey"]</th> <th>@L["CacheItemCacheKey"]</th>
</tr> </tr>
</thead> </thead>
</abp-table> </abp-table>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment