Merge pull request #929 from hishamco/localize-html-text

Localize HtmlText
This commit is contained in:
Shaun Walker 2020-11-20 10:25:02 -05:00 committed by GitHub
commit 066f6095e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -1,16 +1,17 @@
@using Oqtane.Modules.HtmlText.Services
@using Oqtane.Modules.HtmlText.Services
@using Oqtane.Modules.HtmlText.Models
@using Oqtane.Modules.Controls
@namespace Oqtane.Modules.HtmlText
@inherits ModuleBase
@inject IHtmlTextService HtmlTextService
@inject NavigationManager NavigationManager
@inject IStringLocalizer<Edit> Localizer
@if (_content != null)
{
<RichTextEditor Content="@_content" @ref="@RichTextEditorHtml"></RichTextEditor>
<button type="button" class="btn btn-success" @onclick="SaveContent">Save</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">Cancel</NavLink>
<button type="button" class="btn btn-success" @onclick="SaveContent">@Localizer["Save"]</button>
<NavLink class="btn btn-secondary" href="@NavigateUrl()">@Localizer["Cancel"]</NavLink>
@if (!string.IsNullOrEmpty(_content))
{
<br />

View File

@ -1,4 +1,4 @@
@using Oqtane.Modules.HtmlText.Services
@using Oqtane.Modules.HtmlText.Services
@namespace Oqtane.Modules.HtmlText
@inherits ModuleBase
@inject IHtmlTextService HtmlTextService
@ -7,7 +7,7 @@
@if (PageState.EditMode)
{
<br /><ActionLink Action="Edit" EditMode="true" /><br /><br />
<br /><ActionLink Action="Edit" EditMode="true" ResourceKey="Edit" /><br /><br />
}
@code {