Skip to content

Commit c8d3b46

Browse files
Removing harded code strings
Adding jQuery validations localization Updating PT-BR translations
1 parent 2aa4683 commit c8d3b46

File tree

15 files changed

+103
-39
lines changed

15 files changed

+103
-39
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/Localization/SourceFiles/AbpProjectName-pt-BR.xml

Lines changed: 55 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,27 @@
33
<texts>
44
<text name="HomePage" value="Página Inicial" />
55
<text name="About" value="Sobre" />
6-
<text name="WellcomeMessage" value="Bem Vindo ao AbpProjectName!" />
7-
6+
<text name="WellcomeMessage" value="Bem Vindo ao BoilerPlateTeste!" />
87
<text name="FormIsNotValidMessage" value="Formulário não é válido. Por favor, verifique e corrija os erros." />
98
<text name="TenantNameCanNotBeEmpty" value="Tenant não pode estar vazio" />
10-
119
<text name="InvalidUserNameOrPassword" value="Nome de usuário ou senha inválida" />
1210
<text name="ThereIsNoTenantDefinedWithName{0}" value="Não há Tenant definido com o nome {0}" />
1311
<text name="TenantIsNotActive" value="Tenant {0} não está ativo." />
1412
<text name="UserIsNotActiveAndCanNotLogin" value="Usuário {0} não está ativo e não pode logar." />
13+
<text name="UserEmailIsNotConfirmedAndCanNotLogin">Seu email não foi confirmado. Você não pode fazer login.</text>
14+
<text name="UserLockedOutMessage">Usuário bloqueado. Por favor, tente mais tarde.</text>
1515
<text name="PleaseEnterLoginInformation" value="Por favor insira as informações de login" />
1616
<text name="TenancyName" value="Nome da Tenancy" />
1717
<text name="UserNameOrEmail" value="Nome de usuário ou email" />
1818
<text name="Password" value="Senha" />
1919
<text name="RememberMe" value="Lembre de mim" />
2020
<text name="LogIn" value="Entrar" />
21-
2221
<text name="LoginFailed" value="Falha no login!" />
23-
2422
<text name="NameSurname" value="Nome sobrenome" />
2523
<text name="UserName" value="Nome de usuário" />
2624
<text name="Name" value="Nome" />
2725
<text name="Surname" value="Sobrenome" />
2826
<text name="EmailAddress" value="Endereço de e-mail" />
29-
3027
<text name="Tenants" value="Tenants" />
3128
<text name="SavedSuccessfully" value="Salvo com sucesso" />
3229
<text name="CreateNewTenant" value="Crie um novo tenant" />
@@ -42,6 +39,57 @@
4239
<text name="TenantSelection" value="Seleção de Tenant" />
4340
<text name="TenantSelection_Detail" value="Por favor selecione um dos seguintes tenants." />
4441
<text name="Logout" value="Sair" />
45-
42+
<text name="RegisterFormUserNameInvalidMessage">Por favor, não entre um email no nome de usuário.</text>
43+
<text name="DatabaseConnectionString" value="Conexão com o banco de dados (Connection String)" />
44+
<text name="Users" value="Usuários" />
45+
<text name="IsActive" value="Ativo" />
46+
<text name="FullName" value="Nome completo" />
47+
<text name="CreateNewUser" value="Novo Usuário" />
48+
<text name="Yes" value="Sim" />
49+
<text name="No" value="Não" />
50+
<text name="Optional" value="Opcional" />
51+
<text name="LeaveEmptyToSwitchToHost">Deixe em branco para mudar para o host.</text>
52+
<text name="CurrentTenant">Tenant atual</text>
53+
<text name="NotSelected">Não selecionado</text>
54+
<text name="Change">Alterar</text>
55+
<text name="ChangeTenant">Alterar tenant</text>
56+
<text name="MultiLevelMenu">Menu multinível</text>
57+
<text name="Back">Voltar</text>
58+
<text name="SuccessfullyRegistered">Registrado com sucesso</text>
59+
<text name="WaitingForEmailActivation">Seu endereço de email deve ser ativado</text>
60+
<text name="Roles">Funções</text>
61+
<text name="DisplayName">Nome de apresentação</text>
62+
<text name="Edit">Editar</text>
63+
<text name="Delete">Excluir</text>
64+
<text name="CreateNewRole">Criar nova função</text>
65+
<text name="RoleName">Nome da função</text>
66+
<text name="Actions">Ações</text>
67+
<text name="CouldNotCompleteLoginOperation">Operação de login não foi completada. Tente novamente mais tarde.</text>
68+
<text name="CouldNotValidateExternalUser">Não foi possível validar um usuário externo</text>
69+
<text name="EditRole">Editar Função</text>
70+
<text name="EditTenant">Editar tenant</text>
71+
<text name="EditUser">Editar usuário</text>
72+
<text name="TenantIdIsNotActive{0}">TenantId {0} não está ativo</text>
73+
<text name="UnknownTenantId{0}">TenantId {0} não foi encontrado</text>
74+
<text name="ThisFieldIsRequired">Campo obrigatório</text>
75+
<text name="PleaseWait">Aguarde...</text>
76+
<text name="Administration">Administração</text>
77+
<text name="ClearAll">Limpar todos</text>
78+
<text name="ClearOthers">Limpar outros</text>
79+
<text name="LabelOptions">Opções de Legenda/Rótulo</text>
80+
<text name="Permissions">Permissões</text>
81+
<text name="RoleDescription">Descrição da função</text>
82+
<text name="Refresh">Atualizar</text>
83+
<text name="Create">Criar</text>
84+
<text name="UserDetails">Detalhes do usuário</text>
85+
<text name="UserRoles">Funções de usuário</text>
86+
<text name="ConfirmPassword">Confirme a senha</text>
87+
<text name="Version">Versão</text>
88+
<text name="On">Ligado</text>
89+
<text name="Off">Desligado</text>
90+
<text name="AreYouSureWantToDelete">Tem certeza que deseja excluir {0}?</text>
91+
<text name="StartTyping">Comece a escrever</text>
92+
<text name="Skins">Temas</text>
93+
<text name="Settings">Configurações</text>
4694
</texts>
4795
</localizationDictionary>

aspnet-core/src/AbpCompanyName.AbpProjectName.Core/Localization/SourceFiles/AbpProjectName.xml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<texts>
44
<text name="HomePage" value="Home page" />
55
<text name="About" value="About" />
6-
<text name="WellcomeMessage" value="Welcome to AbpProjectName!" />
6+
<text name="WellcomeMessage" value="Welcome to BoilerPlateTeste!" />
77
<text name="FormIsNotValidMessage" value="Form is not valid. Please check and fix errors." />
88
<text name="TenantNameCanNotBeEmpty" value="Tenant name can not be empty" />
99
<text name="InvalidUserNameOrPassword" value="Invalid user name or password" />
@@ -77,12 +77,19 @@
7777
<text name="ClearAll">Clear all</text>
7878
<text name="ClearOthers">Clear others</text>
7979
<text name="LabelOptions">Label options</text>
80-
<text name="Permissions">Permissions</text>
81-
<text name="RoleDescription">Role description</text>
82-
<text name="Refresh">Refresh</text>
83-
<text name="Create">Create</text>
84-
<text name="UserDetails">User details</text>
85-
<text name="UserRoles">User roles</text>
86-
<text name="ConfirmPassword">Confirm password</text>
80+
<text name="Permissions">Permissions</text>
81+
<text name="RoleDescription">Role description</text>
82+
<text name="Refresh">Refresh</text>
83+
<text name="Create">Create</text>
84+
<text name="UserDetails">User details</text>
85+
<text name="UserRoles">User roles</text>
86+
<text name="ConfirmPassword">Confirm password</text>
87+
<text name="Version">Version</text>
88+
<text name="On">On</text>
89+
<text name="Off">Off</text>
90+
<text name="AreYouSureWantToDelete">Are you sure want to delete {0}?</text>
91+
<text name="StartTyping">Start Typing</text>
92+
<text name="Skins">Skins</text>
93+
<text name="Settings">Settings</text>
8794
</texts>
8895
</localizationDictionary>

aspnet-core/src/AbpCompanyName.AbpProjectName.EntityFrameworkCore/EntityFrameworkCore/Seed/Host/DefaultLanguagesCreator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private static List<ApplicationLanguage> GetInitialLanguages()
2020
new ApplicationLanguage(null, "de", "German", "famfamfam-flags de"),
2121
new ApplicationLanguage(null, "it", "Italiano", "famfamfam-flags it"),
2222
new ApplicationLanguage(null, "fr", "Français", "famfamfam-flags fr"),
23-
new ApplicationLanguage(null, "pt-BR", "Portuguese", "famfamfam-flags br"),
23+
new ApplicationLanguage(null, "pt-BR", "Português", "famfamfam-flags br"),
2424
new ApplicationLanguage(null, "tr", "Türkçe", "famfamfam-flags tr"),
2525
new ApplicationLanguage(null, "ru", "Русский", "famfamfam-flags ru"),
2626
new ApplicationLanguage(null, "zh-CN", "简体中文", "famfamfam-flags cn"),

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Account/_Layout.cshtml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@
9797
<script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js" asp-append-version="true"></script>
9898
<script src="~/js/admin.js" asp-append-version="true"></script>
9999
<script src="~/js/main.js" asp-append-version="true"></script>
100+
101+
@if (CultureInfo.CurrentUICulture.Name != "en")
102+
{
103+
<script src="~/lib/jquery-validation/src/localization/[email protected](CultureInfo.CurrentUICulture.Name.Replace("-", "_") + ".js")" asp-append-version="true"></script>
104+
}
100105
</environment>
101106

102107
<environment names="Staging,Production">

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Roles/Index.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<i class="material-icons">more_vert</i>
2727
</a>
2828
<ul class="dropdown-menu pull-right">
29-
<li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>Refresh</a></li>
29+
<li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>@L("Refresh")</a></li>
3030
</ul>
3131
</li>
3232
</ul>
@@ -103,15 +103,15 @@
103103
<div class="form-group form-float">
104104
<div class="form-line">
105105
<textarea id="role-description" name="Description" class="validate form-control"></textarea>
106-
<label for="role-description" class="form-label">Role Description</label>
106+
<label for="role-description" class="form-label">@L("RoleDescription")</label>
107107
</div>
108108
</div>
109109
</div>
110110
</div>
111111

112112
<div class="row clearfix">
113113
<div class="col-sm-12">
114-
<h4>Permissions</h4>
114+
<h4>@L("Permissions")</h4>
115115
@foreach (var permission in Model.Permissions)
116116
{
117117
<div class="col-sm-6">

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Roles/_EditRoleModal.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
<div class="form-group form-float">
3737
<div class="form-line">
3838
<textarea id="role-description" name="Description" class="validate form-control">@Model.Role.Description</textarea>
39-
<label for="role-description" class="form-label">Role Description</label>
39+
<label for="role-description" class="form-label">@L("RoleDescription")</label>
4040
</div>
4141
</div>
4242
</div>
4343
</div>
4444

4545
<div class="row clearfix">
4646
<div class="col-sm-12">
47-
<h4>Permissions</h4>
47+
<h4>@L("Permissions")</h4>
4848

4949
@foreach (var permission in Model.Permissions)
5050
{

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Components/RightSideBar/Default.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
@model AbpCompanyName.AbpProjectName.Web.Views.Shared.Components.RightSideBar.RightSideBarViewModel
33
<aside id="rightsidebar" class="right-sidebar">
44
<ul class="nav nav-tabs tab-nav-right" role="tablist">
5-
<li role="presentation" class="active"><a href="#skins" data-toggle="tab">SKINS</a></li>
6-
<li role="presentation"><a href="#settings" data-toggle="tab">SETTINGS</a></li>
5+
<li role="presentation" class="active"><a href="#skins" data-toggle="tab">@L("Skins")</a></li>
6+
<li role="presentation"><a href="#settings" data-toggle="tab">@L("Settings")</a></li>
77
</ul>
88
<div class="tab-content">
99
<div role="tabpanel" class="tab-pane fade in active in active" id="skins">

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/_Layout.cshtml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
Layout = null;
2020
AbpAntiForgeryManager.SetCookie(Context);
2121
var uiTheme = await SettingManager.GetSettingValueAsync(AppSettingNames.UiTheme);
22-
2322
}
2423
<!DOCTYPE html>
2524
<html lang="en">
@@ -92,7 +91,7 @@
9291
<div class="search-icon">
9392
<i class="material-icons">search</i>
9493
</div>
95-
<input type="text" placeholder="START TYPING...">
94+
<input type="text" placeholder="@L("StartTyping")...">
9695
<div class="close-search">
9796
<i class="material-icons">close</i>
9897
</div>
@@ -132,7 +131,7 @@
132131
&copy; @DateTime.Now.Year <a href="javascript:void(0);">AbpProjectName</a>.
133132
</div>
134133
<div class="version">
135-
<b>Version </b> @AppVersionHelper.Version [@AppVersionHelper.ReleaseDate.ToString("yyyyMMdd")]
134+
<b>@L("Version") </b> @AppVersionHelper.Version [@AppVersionHelper.ReleaseDate.ToString("yyyyMMdd")]
136135
</div>
137136
</div>
138137
<!-- #Footer -->
@@ -174,9 +173,14 @@
174173
<script src="~/view-resources/Views/Shared/_Layout.js" asp-append-version="true"></script>
175174

176175
@if (SignalRFeature.IsAvailable && !SignalRFeature.IsAspNetCore)
177-
{
178-
<script src="~/lib/signalr/jquery.signalR.js" asp-append-version="true"></script>
179-
}
176+
{
177+
<script src="~/lib/signalr/jquery.signalR.js" asp-append-version="true"></script>
178+
}
179+
180+
@if (CultureInfo.CurrentUICulture.Name != "en")
181+
{
182+
<script src="~/lib/jquery-validation/src/localization/[email protected](CultureInfo.CurrentUICulture.Name.Replace("-", "_") + ".js")" asp-append-version="true"></script>
183+
}
180184
</environment>
181185

182186
<environment names="Staging,Production">

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Tenants/Index.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<i class="material-icons">more_vert</i>
3030
</a>
3131
<ul class="dropdown-menu pull-right">
32-
<li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>Refresh</a></li>
32+
<li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>@L("Refresh")</a></li>
3333
</ul>
3434
</li>
3535
</ul>

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Users/Index.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<i class="material-icons">more_vert</i>
2828
</a>
2929
<ul class="dropdown-menu pull-right">
30-
<li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>Refresh</a></li>
30+
<li><a id="RefreshButton" href="javascript:void(0);" class="waves-effect waves-block"><i class="material-icons">refresh</i>@L("Refresh")</a></li>
3131
</ul>
3232
</li>
3333
</ul>
@@ -82,8 +82,8 @@
8282
<div class="modal-body">
8383
<form name="userCreateForm" role="form" novalidate class="form-validation">
8484
<ul class="nav nav-tabs tab-nav-right" role="tablist">
85-
<li role="presentation" class="active"><a href="#create-user-details" data-toggle="tab">User Details</a></li>
86-
<li role="presentation"><a href="#create-user-roles" data-toggle="tab">User Roles</a></li>
85+
<li role="presentation" class="active"><a href="#create-user-details" data-toggle="tab">@L("UserDetails")</a></li>
86+
<li role="presentation"><a href="#create-user-roles" data-toggle="tab">@L("UserRoles")</a></li>
8787
</ul>
8888
<div class="tab-content">
8989
<div role="tabpanel" class="tab-pane animated fadeIn active" id="create-user-details">

0 commit comments

Comments
 (0)