Skip to content

Commit

Permalink
Updating pages to show French version
Browse files Browse the repository at this point in the history
  • Loading branch information
JonPSmith committed Dec 26, 2022
1 parent b93b148 commit 96acaa8
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
@page
@using LocalizeMessagesAndErrors
@inject ISimpleLocalizer SimpleLocalizer
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model Example1.RazorPages.IndividualAccounts.Pages.AuthRoles.CreateModel

<h3>Creating a new Role</h3>
<h3>
@SimpleLocalizer.LocalizeString("Creating a new Role", this)
</h3>

<hr />
<div class="row">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
@page
@inject ISimpleLocalizer SimpleLocalizer
@using LocalizeMessagesAndErrors
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model Example1.RazorPages.IndividualAccounts.Pages.AuthRoles.ListRolesModel

<h1>Manage roles</h1>
Expand All @@ -8,20 +11,22 @@
<h3 class="text-primary">@Model.Message</h3>
}

<a class="btn btn-primary" asp-area="" asp-page=".\Create">Create new role</a>
<a class="btn btn-primary" asp-area="" asp-page=".\Create">
@SimpleLocalizer.LocalizeString("Create new role", this)
</a>
<p></p>

<table class="table">
<thead>
<tr>
<th>
RoleName
@SimpleLocalizer.LocalizeString("Role Name", this)
</th>
<th>
Description
@SimpleLocalizer.LocalizeString("Description", this)
</th>
<th>
#Permissions
#@SimpleLocalizer.LocalizeString("Permissions", this)
</th>
<th></th>
</tr>
Expand All @@ -43,9 +48,13 @@
</td>
<td>
<!--This should have User.HasPermission(Example4Permissions.RoleChange around them-->
<a asp-area="" asp-page=".\Edit" asp-route-rolename="@item.RoleName">Edit</a>
<a asp-area="" asp-page=".\Edit" asp-route-rolename="@item.RoleName">
@SimpleLocalizer.LocalizeString("Edit", this)
</a>
|
<a asp-area="" asp-page=".\Delete" asp-route-rolename="@item.RoleName">Delete</a>
<a asp-area="" asp-page=".\Delete" asp-route-rolename="@item.RoleName">
@SimpleLocalizer.LocalizeString("Delete", this)
</a>
</td>
</tr>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
@using ExamplesCommonCode.CommonAdmin
@model ExamplesCommonCode.CommonAdmin.RoleCreateUpdateDto
@using LocalizeMessagesAndErrors
@inject ISimpleLocalizer SimpleLocalizer
@model RoleCreateUpdateDto

<table class="table">
<thead>
<tr>
<th>
Group
@SimpleLocalizer.LocalizeString("Group", this)
</th>
<th>
Description
@SimpleLocalizer.LocalizeString("Description", this)
</th>
<th>
Permission
@SimpleLocalizer.LocalizeString("Permission", this)
</th>
<th>
@SimpleLocalizer.LocalizeString("Selected?", this)
</th>
<th>Selected?</th>
</tr>
</thead>
<tbody id="permission-selection">
Expand All @@ -37,7 +41,9 @@
new { id = Model.PermissionsWithSelect[i].PermissionName})
<button type="button" class='btn-sm @(Model.PermissionsWithSelect[i].Selected ? "btn-primary" : "btn-secondary")'
onclick="TogglePermissionSelect(this, '@Model.PermissionsWithSelect[i].PermissionName')">
@(Model.PermissionsWithSelect[i].Selected ? "Selected" : "Select")
@(Model.PermissionsWithSelect[i].Selected
? SimpleLocalizer.LocalizeString("Selected", this)
: SimpleLocalizer.LocalizeString("Select", this))
</button>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,30 @@
<data name="SimpleLocalizer(Cookie)" xml:space="preserve">
<value>Cookie</value>
</data>
<data name="SimpleLocalizer(Create new role)" xml:space="preserve">
<value>Créer un nouveau rôle</value>
</data>
<data name="SimpleLocalizer(Creating a new Role)" xml:space="preserve">
<value>Créer un nouveau rôle</value>
</data>
<data name="SimpleLocalizer(Databases)" xml:space="preserve">
<value>Bases de données</value>
</data>
<data name="SimpleLocalizer(Delete)" xml:space="preserve">
<value>Effacer</value>
</data>
<data name="SimpleLocalizer(Description)" xml:space="preserve">
<value>Description</value>
</data>
<data name="SimpleLocalizer(Edit" xml:space="preserve">
<value>Éditer</value>
</data>
<data name="SimpleLocalizer(Example1 - looking at Roles/Permissions, plus localization)" xml:space="preserve">
<value>Exemple 1 - examen des rôles/autorisations, plus la localisation</value>
</data>
<data name="SimpleLocalizer(Group)" xml:space="preserve">
<value>Groupe</value>
</data>
<data name="SimpleLocalizer(Individual accounts: InMemory Database)" xml:space="preserve">
<value>Comptes individuels : base de données InMemory</value>
</data>
Expand All @@ -156,6 +174,24 @@
<data name="SimpleLocalizer(Note)" xml:space="preserve">
<value>Noter</value>
</data>
<data name="SimpleLocalizer(Permission)" xml:space="preserve">
<value>Autorisation</value>
</data>
<data name="SimpleLocalizer(Permissions)" xml:space="preserve">
<value>Autorisations</value>
</data>
<data name="SimpleLocalizer(Role Name)" xml:space="preserve">
<value>Nom de rôle</value>
</data>
<data name="SimpleLocalizer(Select)" xml:space="preserve">
<value>Sélectionner</value>
</data>
<data name="SimpleLocalizer(Selected)" xml:space="preserve">
<value>Choisi</value>
</data>
<data name="SimpleLocalizer(Selected?)" xml:space="preserve">
<value>Choisi?</value>
</data>
<data name="SimpleLocalizer(Shows basics of Roles and permissions, plus multi-language support.)" xml:space="preserve">
<value>Affiche les bases des rôles et des autorisations, ainsi que la prise en charge multilingue.</value>
</data>
Expand Down

0 comments on commit 96acaa8

Please sign in to comment.