Merge pull request #931 from hishamco/localize-oqtane-theme

Localize Login & UserProfile components
This commit is contained in:
Shaun Walker
2020-11-20 10:25:25 -05:00
committed by GitHub
2 changed files with 9 additions and 7 deletions

View File

@ -1,5 +1,6 @@
@namespace Oqtane.Themes.Controls @namespace Oqtane.Themes.Controls
@inherits LoginBase @inherits LoginBase
@inject IStringLocalizer<Login> Localizer
<span class="app-login"> <span class="app-login">
<AuthorizeView> <AuthorizeView>
@ -7,10 +8,10 @@
<text>...</text> <text>...</text>
</Authorizing> </Authorizing>
<Authorized> <Authorized>
<button type="button" class="btn btn-primary" @onclick="LogoutUser">Logout</button> <button type="button" class="btn btn-primary" @onclick="LogoutUser">@Localizer["Logout"]</button>
</Authorized> </Authorized>
<NotAuthorized> <NotAuthorized>
<button type="button" class="btn btn-primary" @onclick="LoginUser">Login</button> <button type="button" class="btn btn-primary" @onclick="LoginUser">@Localizer["Login"]</button>
</NotAuthorized> </NotAuthorized>
</AuthorizeView> </AuthorizeView>
</span> </span>

View File

@ -1,5 +1,6 @@
@namespace Oqtane.Themes.Controls @namespace Oqtane.Themes.Controls
@inherits ThemeControlBase @inherits ThemeControlBase
@inject IStringLocalizer<UserProfile> Localizer
@inject NavigationManager NavigationManager @inject NavigationManager NavigationManager
@ -14,7 +15,7 @@
<NotAuthorized> <NotAuthorized>
@if (PageState.Site.AllowRegistration) @if (PageState.Site.AllowRegistration)
{ {
<button type="button" class="btn btn-primary" @onclick="RegisterUser">Register</button> <button type="button" class="btn btn-primary" @onclick="RegisterUser">@Localizer["Register"]</button>
} }
</NotAuthorized> </NotAuthorized>
</AuthorizeView> </AuthorizeView>