mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-04 01:48:21 +00:00
Translate mod panel
This commit is contained in:
parent
836e2293e0
commit
bc998b1ba9
5 changed files with 44 additions and 2 deletions
27
ProjectLighthouse.Localization/ModPanel.resx
Normal file
27
ProjectLighthouse.Localization/ModPanel.resx
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<root>
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="mod_panel_title" xml:space="preserve">
|
||||
<value>Moderation Panel</value>
|
||||
</data>
|
||||
<data name="greeting" xml:space="preserve">
|
||||
<value>Welcome to the moderation panel, {0}!</value>
|
||||
</data>
|
||||
</root>
|
|
@ -25,6 +25,10 @@
|
|||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Status.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="ModPanel.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>ModPanel.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
namespace LBPUnion.ProjectLighthouse.Localization.StringLists;
|
||||
|
||||
public static class ModPanelStrings
|
||||
{
|
||||
public static readonly TranslatableString ModPanelTitle = create("mod_panel_title");
|
||||
public static readonly TranslatableString Greeting = create("greeting");
|
||||
|
||||
private static TranslatableString create(string key) => new(TranslationAreas.ModPanel, key);
|
||||
}
|
|
@ -7,4 +7,5 @@ public enum TranslationAreas
|
|||
General,
|
||||
LoggedOut,
|
||||
Status,
|
||||
ModPanel,
|
||||
}
|
|
@ -2,11 +2,12 @@
|
|||
@using System.Diagnostics
|
||||
@using LBPUnion.ProjectLighthouse.Administration
|
||||
@using LBPUnion.ProjectLighthouse.Extensions
|
||||
@using LBPUnion.ProjectLighthouse.Localization.StringLists
|
||||
@model LBPUnion.ProjectLighthouse.Servers.Website.Pages.Admin.ModPanelPage
|
||||
|
||||
@{
|
||||
Layout = "Layouts/BaseLayout";
|
||||
Model.Title = "Moderation Panel";
|
||||
Model.Title = Model.Translate(ModPanelStrings.ModPanelTitle);
|
||||
|
||||
if (Model.User == null) throw new ArgumentNullException($"{nameof(Model)}.{nameof(User)}");
|
||||
|
||||
|
@ -18,7 +19,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
<p>Hello, <b>@Model.User.Username.</b></p>
|
||||
<p>@Model.Translate(ModPanelStrings.Greeting)</p>
|
||||
|
||||
@if (!this.Request.IsMobile())
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue