diff --git a/WebfrontCore/Controllers/AccountController.cs b/WebfrontCore/Controllers/AccountController.cs index d90d3cc0a..01b21a96b 100644 --- a/WebfrontCore/Controllers/AccountController.cs +++ b/WebfrontCore/Controllers/AccountController.cs @@ -24,7 +24,7 @@ namespace WebfrontCore.Controllers { if (clientId == 0 || string.IsNullOrEmpty(password)) { - return Unauthorized("Invalid credentials"); + return Unauthorized(Localization["WEBFRONT_ACTION_LOGIN_ERROR"]); } try @@ -73,16 +73,16 @@ namespace WebfrontCore.Controllers : HttpContext.Connection.RemoteIpAddress?.ToString() }); - return Ok($"Welcome {privilegedClient.Name}. You are now logged in"); + return Ok(Localization["WEBFRONT_ACTION_LOGIN_SUCCESS"].FormatExt(privilegedClient.CleanedName)); } } catch (Exception) { - return Unauthorized("Could not validate credentials"); + return Unauthorized(Localization["WEBFRONT_ACTION_LOGIN_ERROR"]); } - return Unauthorized("Invalid credentials"); + return Unauthorized(Localization["WEBFRONT_ACTION_LOGIN_ERROR"]); } [HttpGet] diff --git a/WebfrontCore/Controllers/ActionController.cs b/WebfrontCore/Controllers/ActionController.cs index 552e59931..9d52bcc96 100644 --- a/WebfrontCore/Controllers/ActionController.cs +++ b/WebfrontCore/Controllers/ActionController.cs @@ -78,7 +78,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_BAN_NAME"], - Name = "Ban", + Name = Localization["WEBFRONT_ACTION_BAN_NAME"], Inputs = new List { new() @@ -152,7 +152,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_UNBAN_NAME"], - Name = "Unban", + Name = Localization["WEBFRONT_ACTION_UNBAN_NAME"], Inputs = new List { new() @@ -193,7 +193,7 @@ namespace WebfrontCore.Controllers var login = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_LOGIN_NAME"], - Name = "Login", + Name = Localization["WEBFRONT_ACTION_LOGIN_NAME"], Inputs = new List { new() @@ -226,7 +226,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_LABEL_EDIT"], - Name = "Edit", + Name = Localization["WEBFRONT_ACTION_LABEL_EDIT"], Inputs = new List { new() @@ -291,7 +291,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_LABEL_SUBMIT_MESSAGE"], - Name = "Chat", + Name = Localization["WEBFRONT_ACTION_LABEL_SUBMIT_MESSAGE"], Inputs = new List { new() @@ -367,7 +367,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_FLAG_NAME"], - Name = "Flag", + Name = Localization["WEBFRONT_ACTION_FLAG_NAME"], Inputs = new List { new() @@ -406,7 +406,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_UNFLAG_NAME"], - Name = "Unflag", + Name = Localization["WEBFRONT_ACTION_UNFLAG_NAME"], Inputs = new List { new() @@ -438,7 +438,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = Localization["WEBFRONT_ACTION_KICK_NAME"], - Name = "Kick", + Name = Localization["WEBFRONT_ACTION_KICK_NAME"], Inputs = new List { new() @@ -488,7 +488,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = "Dismiss", - Name = "Dismiss Alert?", + Name = Localization["WEBFRONT_ACTION_DISMISS_ALERT_SINGLE"], Inputs = new List { new() @@ -512,7 +512,7 @@ namespace WebfrontCore.Controllers { new CommandResponseInfo { - Response = "Alert dismissed" + Response = Localization["WEBFRONT_ACTION_DISMISS_ALERT_SINGLE_RESPONSE"] } }); } @@ -522,7 +522,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = "Dismiss", - Name = "Dismiss All Alerts?", + Name = Localization["WEBFRONT_ACTION_DISMISS_ALERT_MANY"], Inputs = new List { new() @@ -546,7 +546,7 @@ namespace WebfrontCore.Controllers { new CommandResponseInfo { - Response = "Alerts dismissed" + Response = Localization["WEBFRONT_ACTION_DISMISS_ALERT_MANY_RESPONSE"] } }); } @@ -556,7 +556,7 @@ namespace WebfrontCore.Controllers var info = new ActionInfo { ActionButtonLabel = "Send", - Name = "Compose Message", + Name = Localization["WEBFRONT_ACTION_OFFLINE_MESSAGE_BUTTON_COMPOSE"], Inputs = new List { new() diff --git a/WebfrontCore/Controllers/AdminController.cs b/WebfrontCore/Controllers/AdminController.cs index ab1687ad1..e47bc7210 100644 --- a/WebfrontCore/Controllers/AdminController.cs +++ b/WebfrontCore/Controllers/AdminController.cs @@ -56,7 +56,7 @@ namespace WebfrontCore.Controllers ViewBag.ClientIP = request.ClientIP; ViewBag.ClientGuid = request.ClientGuid; - ViewBag.Title = "Ban Management"; + ViewBag.Title = Localization["WEBFRONT_NAV_TITLE_BAN_MANAGEMENT"]; return View(results.Results); } diff --git a/WebfrontCore/Controllers/Client/ClientController.cs b/WebfrontCore/Controllers/Client/ClientController.cs index 04396ca0a..4ffb6f287 100644 --- a/WebfrontCore/Controllers/Client/ClientController.cs +++ b/WebfrontCore/Controllers/Client/ClientController.cs @@ -146,12 +146,8 @@ namespace WebfrontCore.Controllers clientDto.Meta.AddRange(Authorized ? meta : meta.Where(m => !m.IsSensitive)); var strippedName = clientDto.Name.StripColors(); - ViewBag.Title = strippedName.Substring(strippedName.Length - 1).ToLower()[0] == 's' - ? strippedName + "'" - : strippedName + "'s"; - ViewBag.Title += " " + Localization["WEBFRONT_CLIENT_PROFILE_TITLE"]; - ViewBag.Description = $"Client information for {strippedName}"; - ViewBag.Keywords = $"IW4MAdmin, client, profile, {strippedName}"; + ViewBag.Title = $"{strippedName} | {Localization["WEBFRONT_CLIENT_PROFILE_TITLE"]}"; + ViewBag.Description = Localization["WEBFRONT_PROFILE_DESCRIPTION"].FormatExt(strippedName); ViewBag.UseNewStats = _config?.EnableAdvancedMetrics ?? true; return View("Profile/Index", clientDto); diff --git a/WebfrontCore/Controllers/ConsoleController.cs b/WebfrontCore/Controllers/ConsoleController.cs index e43290324..1221b16fc 100644 --- a/WebfrontCore/Controllers/ConsoleController.cs +++ b/WebfrontCore/Controllers/ConsoleController.cs @@ -100,7 +100,7 @@ namespace WebfrontCore.Controllers new CommandResponseInfo { ClientId = client.ClientId, - Response = Utilities.CurrentLocalization.LocalizationIndex["COMMADS_RESTART_SUCCESS"] + Response = Utilities.CurrentLocalization.LocalizationIndex["COMMANDS_RESTART_SUCCESS"] } }; } diff --git a/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs b/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs index aadf86afc..682d4bd43 100644 --- a/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs +++ b/WebfrontCore/QueryHelpers/BanInfoResourceQueryHelper.cs @@ -86,7 +86,7 @@ public class BanInfoResourceQueryHelper : IResourceQueryHelper - Close + @ViewBag.Localization["WEBFRONT_ACTION_MODAL_BUTTON_CLOSE"] diff --git a/WebfrontCore/Views/Admin/BanManagement.cshtml b/WebfrontCore/Views/Admin/BanManagement.cshtml index 0b017f50e..0e0bc0117 100644 --- a/WebfrontCore/Views/Admin/BanManagement.cshtml +++ b/WebfrontCore/Views/Admin/BanManagement.cshtml @@ -9,7 +9,7 @@
- +
- +
- +
- +
@@ -43,7 +43,7 @@ @foreach (var associatedEntity in ban.AssociatedPenalties) {
-
+
@associatedEntity.OffenderInfo.ClientName @@ -62,7 +62,7 @@
@associatedEntity.Offense.CapClientName(30)
@associatedEntity.DateTime.ToStandardFormat()
-
Unban
+
@ViewBag.Localization["WEBFRONT_BAN_MGMT_ACTION_UNBAN"]
}
diff --git a/WebfrontCore/Views/Admin/_ListAuditLog.cshtml b/WebfrontCore/Views/Admin/_ListAuditLog.cshtml index ad005f8a5..309bcf6a6 100644 --- a/WebfrontCore/Views/Admin/_ListAuditLog.cshtml +++ b/WebfrontCore/Views/Admin/_ListAuditLog.cshtml @@ -34,7 +34,7 @@ @info.NewValue - @info.When.ToString() + @info.When.ToStandardFormat() @@ -65,7 +65,7 @@ }
@info.Data
@info.NewValue
-
@info.When.ToString()
+
@info.When
} diff --git a/WebfrontCore/Views/Client/Find/Index.cshtml b/WebfrontCore/Views/Client/Find/Index.cshtml index 37a916493..8b961a57a 100644 --- a/WebfrontCore/Views/Client/Find/Index.cshtml +++ b/WebfrontCore/Views/Client/Find/Index.cshtml @@ -5,8 +5,31 @@
-

Search Results

-
@ViewBag.SearchTerm returned @ViewBag.ResultCount matche(s)
+

@ViewBag.Localization["WEBFRONT_SEARCH_RESULTS_TITLE"]

+
+ + @foreach (var match in Utilities.SplitTranslationTokens("WEBFRONT_SEARCH_RESULTS_SUBTITLE_FORMAT")) + { + if (match.IsInterpolation) + { + if (match.MatchValue == "searchTerm") + { + + @ViewBag.SearchTerm + + } + + else if (match.MatchValue == "searchCount") + { + @ViewBag.ResultCount + } + } + else + { + @match.MatchValue + } + } +
diff --git a/WebfrontCore/Views/Client/Message/Find.cshtml b/WebfrontCore/Views/Client/Message/Find.cshtml index 27488b45b..8ed161925 100644 --- a/WebfrontCore/Views/Client/Message/Find.cshtml +++ b/WebfrontCore/Views/Client/Message/Find.cshtml @@ -9,7 +9,7 @@ else { -

Search Results

+

@ViewBag.Localization["WEBFRONT_SEARCH_RESULTS_TITLE"]

@Html.Raw(Utilities.FormatExt(ViewBag.Localization["WEBFRONT_STATS_MESSAGES_FOUND"], $"{Model.TotalResultCount.ToString("N0")}"))
diff --git a/WebfrontCore/Views/Client/Message/_Item.cshtml b/WebfrontCore/Views/Client/Message/_Item.cshtml index 90d48043c..31af306e3 100644 --- a/WebfrontCore/Views/Client/Message/_Item.cshtml +++ b/WebfrontCore/Views/Client/Message/_Item.cshtml @@ -53,8 +53,7 @@
-
@message.When
- +
@message.When
} diff --git a/WebfrontCore/Views/Client/Privileged/Index.cshtml b/WebfrontCore/Views/Client/Privileged/Index.cshtml index d8f5e9506..d6b2c8c5e 100644 --- a/WebfrontCore/Views/Client/Privileged/Index.cshtml +++ b/WebfrontCore/Views/Client/Privileged/Index.cshtml @@ -10,7 +10,7 @@ - + @@ -25,11 +25,11 @@
@key.ToLocalizedLevelName() GameLast Connected@ViewBag.Localization["WEBFRONT_SEARCH_LAST_CONNECTED"]
@if (client.IsMasked) { - + } - + @@ -46,5 +46,4 @@
} -
diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index e8546ed7f..adb7e66c7 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -58,7 +58,7 @@ } -

Player Profile

+

@ViewBag.Localization["WEBFRONT_PROFILE_TITLE"]

@ViewBag.Localization[$"GAME_{Model.Game}"]
@@ -66,7 +66,7 @@ @if (Model.Online) { -
+
} @@ -105,7 +105,7 @@ @if (Model.Aliases.Count > 15) { - ...and @(Model.Aliases.Count - 15) more + @((ViewBag.Localization["WEBFRONT_PROFILE_ALIAS_COUNT_MORE_FORMAT"] as string).FormatExt(Model.Aliases.Count - 15)) }
@@ -126,7 +126,7 @@
@@ -252,18 +252,18 @@ @{ var menuItems = new SideContextMenuItems { - MenuTitle = "Actions", + MenuTitle = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_TITLE"] }; if (Model.Online) { menuItems.Items.Add(new SideContextMenuItem { - Title = "Join Game", + Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_JOIN"], IsLink = true, IsButton = true, Reference = Model.ConnectProtocolUrl, - Tooltip = $"Playing on {Model.CurrentServerName.StripColors()}", + Tooltip = (ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_TOOLTIP_JOIN"] as string).FormatExt(Model.CurrentServerName.StripColors()), Icon = "oi-play-circle" }); } @@ -272,7 +272,7 @@ { menuItems.Items.Add(new SideContextMenuItem { - Title = "Change Level", + Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_LEVEL"], IsButton = true, Reference = "edit", Icon = "oi-cog", @@ -284,7 +284,7 @@ { menuItems.Items.Add(new SideContextMenuItem { - Title = "Message", + Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_MESSAGE"], IsButton = true, Reference = "OfflineMessage", Icon = "oi oi-envelope-closed", @@ -294,7 +294,7 @@ menuItems.Items.Add(new SideContextMenuItem { - Title = "View Stats", + Title = ViewBag.Localization["WEBFRONT_PROFILE_CONTEXT_MENU_ACTION_STATS"], IsButton = true, IsLink = true, Reference = Url.Action("Advanced", "ClientStatistics", new { id = Model.ClientId }), @@ -305,7 +305,7 @@ { menuItems.Items.Add(new SideContextMenuItem { - Title = isFlagged ? "Unflag" : "Flag", + Title = isFlagged ? ViewBag.Localization["WEBFRONT_ACTION_UNFLAG_NAME"] : ViewBag.Localization["WEBFRONT_ACTION_FLAG_NAME"], IsButton = true, Reference = isFlagged ? "unflag" : "flag", Icon = "oi-flag", @@ -317,7 +317,7 @@ { menuItems.Items.Add(new SideContextMenuItem { - Title = "Kick", + Title = ViewBag.Localization["WEBFRONT_ACTION_KICK_NAME"], IsButton = true, Reference = "kick", Icon = "oi-circle-x", @@ -329,7 +329,7 @@ { menuItems.Items.Add(new SideContextMenuItem { - Title = "Ban", + Title = ViewBag.Localization["WEBFRONT_ACTION_BAN_NAME"], IsButton = true, Reference = "ban", Icon = "oi-lock-unlocked", @@ -341,7 +341,7 @@ { menuItems.Items.Add(new SideContextMenuItem { - Title = "Unban", + Title = ViewBag.Localization["WEBFRONT_ACTION_UNBAN_NAME"], IsButton = true, Reference = "unban", Icon = "oi-lock-locked", diff --git a/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml index f7795e16a..7b95b532c 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_Information.cshtml @@ -18,7 +18,7 @@ @{var results = Utilities.SplitTranslationTokens(meta.meta.Key);} - @if (results.Any(_result => _result.IsInterpolation)) + @if (results.Any(result => result.IsInterpolation)) { foreach (var result in results) { diff --git a/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml b/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml index 57e056318..b3ccf0ccf 100644 --- a/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml +++ b/WebfrontCore/Views/Client/Profile/Meta/_MessageResponse.cshtml @@ -7,7 +7,7 @@ } - + diff --git a/WebfrontCore/Views/Client/Statistics/Advanced.cshtml b/WebfrontCore/Views/Client/Statistics/Advanced.cshtml index cdcdccf0c..0976350f0 100644 --- a/WebfrontCore/Views/Client/Statistics/Advanced.cshtml +++ b/WebfrontCore/Views/Client/Statistics/Advanced.cshtml @@ -10,7 +10,7 @@ @model Stats.Dtos.AdvancedStatsInfo @{ - ViewBag.Title = "Advanced Client Statistics"; + ViewBag.Title = ViewBag.Localization["WEBFRONT_ADV_STATS_TITLE"]; ViewBag.Description = Model.ClientName.StripColors(); const string headshotKey = "MOD_HEAD_SHOT"; @@ -233,7 +233,7 @@
-

Player Stats

+

@ViewBag.Title

@@ -263,6 +263,7 @@ {
@ViewBag.Localization["WEBFRONT_ADV_STATS_EXPIRED"]
} + if (Model.ServerId != null) {
@Html.Raw((ViewBag.Localization["WEBFRONT_ADV_STATS_PERFORMANCE"] as string).FormatExt($"{performance.ToNumericalString()}"))
@@ -375,7 +376,8 @@ @{ var menuItems = new SideContextMenuItems { - MenuTitle = "Game", Items = Model.Servers.Select(server => new SideContextMenuItem + MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"], + Items = Model.Servers.Select(server => new SideContextMenuItem { IsLink = true, Reference = Url.Action("Advanced", "ClientStatistics", new { serverId = server.Endpoint }), diff --git a/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml b/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml index efadf8a53..981ff145d 100644 --- a/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml +++ b/WebfrontCore/Views/Client/Statistics/Components/TopPlayers/_List.cshtml @@ -12,7 +12,7 @@

@Utilities.CurrentLocalization.LocalizationIndex["PLUGINS_STATS_TEXT_NOQUALIFY"]

- Check back after some more time has passed + @ViewBag.Localization["WEBFRONT_TOP_PLAYERS_NOQUALIFY_SUBTITLE"]
diff --git a/WebfrontCore/Views/Client/Statistics/Index.cshtml b/WebfrontCore/Views/Client/Statistics/Index.cshtml index cc86f873d..ff740764b 100644 --- a/WebfrontCore/Views/Client/Statistics/Index.cshtml +++ b/WebfrontCore/Views/Client/Statistics/Index.cshtml @@ -3,12 +3,12 @@
-

Top Players

+

@ViewBag.Localization["WEBFRONT_TOP_PLAYERS_TITLE"]

@ViewBag.TotalRankedClients.ToString("#,##0") Ranked Players - +
@await Component.InvokeAsync("TopPlayers", new { count = 25, offset = 0, serverEndpoint = ViewBag.SelectedServerId })
@@ -21,7 +21,8 @@ @{ var menuItems = new SideContextMenuItems { - MenuTitle = "Game", Items = Model.Select(server => new SideContextMenuItem + MenuTitle = ViewBag.Localization["WEBFRONT_CONTEXT_MENU_GLOBAL_GAME"], + Items = Model.Select(server => new SideContextMenuItem { IsLink = true, Reference = Url.Action("TopPlayers", "Stats", new { serverId = server.Endpoint }), diff --git a/WebfrontCore/Views/Configuration/Files.cshtml b/WebfrontCore/Views/Configuration/Files.cshtml index 4ae1402e7..9f848ef98 100644 --- a/WebfrontCore/Views/Configuration/Files.cshtml +++ b/WebfrontCore/Views/Configuration/Files.cshtml @@ -25,7 +25,7 @@
@file.FileContent
- +
} diff --git a/WebfrontCore/Views/Console/Index.cshtml b/WebfrontCore/Views/Console/Index.cshtml index 6c7ce5169..c48ad7418 100644 --- a/WebfrontCore/Views/Console/Index.cshtml +++ b/WebfrontCore/Views/Console/Index.cshtml @@ -39,12 +39,12 @@
- Server + @ViewBag.Localization["WEBFRONT_CONSOLE_FORM_SERVER"]
@Html.DropDownList("Server", Model.Select(s => new SelectListItem { Text = s.Name.StripColors(), Value = s.ID.ToString() }).ToList(), new { @class = "form-control", id = "console_server_select" })
- +
} diff --git a/WebfrontCore/Views/Shared/_Layout.cshtml b/WebfrontCore/Views/Shared/_Layout.cshtml index 1a192e370..9f91a3adb 100644 --- a/WebfrontCore/Views/Shared/_Layout.cshtml +++ b/WebfrontCore/Views/Shared/_Layout.cshtml @@ -52,7 +52,7 @@
-

No content available yet...

+

@ViewBag.Localization["WEBFRONT_GLOBAL_MODAL_EMPTY"]

@@ -98,21 +98,21 @@
@(ViewBag.ClientCount ?? "-") - Clients + @ViewBag.Localization["WEBFRONT_LAYOUT_CLIENTS_ONLINE"]
@(ViewBag.AdminCount ?? "-") - Admins + @ViewBag.Localization["WEBFRONT_LAYOUT_ADMINS_ONLINE"]
- +
@(ViewBag.ReportCount ?? "-") - Reports + @ViewBag.Localization["WEBFRONT_LAYOUT_REPORTS"]
@@ -122,7 +122,7 @@
@await Html.PartialAsync("Partials/_Notifications", (object)ViewBag.Alerts)
-
+
@@ -149,12 +149,7 @@ - @RenderBody() - -
-
threadsafe.pw
-
diff --git a/WebfrontCore/Views/Shared/_LeftNavBar.cshtml b/WebfrontCore/Views/Shared/_LeftNavBar.cshtml index e5ec5fbeb..55b2dc583 100644 --- a/WebfrontCore/Views/Shared/_LeftNavBar.cshtml +++ b/WebfrontCore/Views/Shared/_LeftNavBar.cshtml @@ -10,7 +10,7 @@
- Main + @ViewBag.Localization["WEBFRONT_NAV_TITLE_MAIN"] @@ -47,7 +47,7 @@ - Profile + @ViewBag.Localization["WEBFRONT_NAV_TITLE_PROFILE"] @@ -55,13 +55,13 @@ { - Login + @ViewBag.Localization["WEBFRONT_NAV_TITLE_LOGIN"] }
- + @foreach (Page pageLink in ViewBag.Pages) @@ -74,14 +74,14 @@ - Scoreboard + @ViewBag.Localization["WEBFRONT_NAV_TITLE_SCOREBOARD"]
@if (ViewBag.CommunityInformation?.IsEnabled && ViewBag.CommunityInformation.SocialAccounts.Length > 0) { - Socials + @ViewBag.Localization["WEBFRONT_NAV_TITLE_SOCIALS"] } @@ -106,7 +106,7 @@ - + @@ -118,14 +118,14 @@ - Ban Management + @ViewBag.Localization["WEBFRONT_NAV_TITLE_BAN_MANAGEMENT"] @if (ViewBag.User.Level >= EFClient.Permission.Owner) { - Configuration + @ViewBag.Localization["WEBFRONT_NAV_TITLE_CONFIGURATION"] } @@ -140,7 +140,7 @@ @ViewBag.Localization["WEBFRONT_ACTION_RECENT_CLIENTS"] - + @if (ViewBag.Authorized) { @@ -158,11 +158,21 @@ diff --git a/WebfrontCore/Views/Shared/_LoginForm.cshtml b/WebfrontCore/Views/Shared/_LoginForm.cshtml index 84b0f7ff5..c385d5a62 100644 --- a/WebfrontCore/Views/Shared/_LoginForm.cshtml +++ b/WebfrontCore/Views/Shared/_LoginForm.cshtml @@ -5,15 +5,15 @@
- Client ID + @ViewBag.Localization["WEBFRONT_LOGIN_MODAL_FORM_CLIENTID"]
- Token/Password + @ViewBag.Localization["WEBFRONT_LOGIN_MODAL_FORM_PASSWORD"]
- + diff --git a/WebfrontCore/Views/Shared/_SideContextMenu.cshtml b/WebfrontCore/Views/Shared/_SideContextMenu.cshtml index a028203d4..d5af6442b 100644 --- a/WebfrontCore/Views/Shared/_SideContextMenu.cshtml +++ b/WebfrontCore/Views/Shared/_SideContextMenu.cshtml @@ -37,7 +37,7 @@
}
-
Close + @ViewBag.Localization["WEBFRONT_CONTEXT_MENU_BUTTON_CLOSE"]
diff --git a/WebfrontCore/wwwroot/js/action.js b/WebfrontCore/wwwroot/js/action.js index 9fcd630a0..17138d583 100644 --- a/WebfrontCore/wwwroot/js/action.js +++ b/WebfrontCore/wwwroot/js/action.js @@ -79,7 +79,7 @@ $(document).ready(function () { clearQueryString(); halfmoon.initStickyAlert({ content: toastMessage, - title: 'Success', + title: _localization['WEBFRONT_SCRIPT_ACTION_SUCCESS'], alertType: 'alert-success', fillType: 'filled', timeShown: duration @@ -107,7 +107,7 @@ $(document).ready(function () { .fail(function (jqxhr, textStatus, error) { halfmoon.initStickyAlert({ content: jqxhr.responseText, - title: 'Error', + title: _localization['WEBFRONT_SCRIPT_ACTION_ERROR'], alertType: 'alert-danger', fillType: 'filled' }); @@ -145,7 +145,7 @@ $(document).ready(function () { modal.modal(); halfmoon.initStickyAlert({ content: escapeHtml(message), - title: 'Executed', + title: _localization['WEBFRONT_SCRIPT_ACTION_EXECUTED'], alertType: 'alert-primary', fillType: 'filled' }); @@ -174,7 +174,7 @@ $(document).ready(function () { halfmoon.initStickyAlert({ content: message, - title: 'Error', + title: _localization['WEBFRONT_SCRIPT_ACTION_ERROR'], alertType: 'alert-danger', fillType: 'filled' }); diff --git a/WebfrontCore/wwwroot/js/loader.js b/WebfrontCore/wwwroot/js/loader.js index 95655aa67..2ec0d9765 100644 --- a/WebfrontCore/wwwroot/js/loader.js +++ b/WebfrontCore/wwwroot/js/loader.js @@ -73,7 +73,7 @@ function loadMoreItems() { .fail(function () { errorLoader(); halfmoon.initStickyAlert({ - content: 'Could not load more items...', + content: _localization['WEBFRONT_SCRIPT_LOADER_ERROR'], title: 'Error', alertType: 'alert-danger', fillType: 'filled' diff --git a/WebfrontCore/wwwroot/js/server.js b/WebfrontCore/wwwroot/js/server.js index 8f1470c42..a60db1d26 100644 --- a/WebfrontCore/wwwroot/js/server.js +++ b/WebfrontCore/wwwroot/js/server.js @@ -88,7 +88,7 @@ function getPlayerHistoryChart(playerHistory, i, width, maxClients) { callbacks: { // todo: localization at some point title: context => moment(context[0].label).local().calendar(), - label: context => context.datasetIndex !== 1 ? `${context.value} players on ${playerHistory[context.index].mapAlias}` : context.value === '0' ? '' : 'Server Unreachable!', + label: context => context.datasetIndex !== 1 ? `${context.value} ${_localization['WEBFRONT_SCRIPT_SERVER_PLAYERS']} | ${playerHistory[context.index].mapAlias}` : context.value === '0' ? '' : _localization['WEBFRONT_SCRIPT_SERVER_UNREACHABLE'], }, mode: 'nearest', intersect: false,