more localization tweaks
This commit is contained in:
parent
052eeb0615
commit
61df873bb1
@ -174,19 +174,17 @@ namespace SharedLibraryCore
|
||||
public static string RemoveDiacritics(this string text)
|
||||
{
|
||||
var normalizedString = text.Normalize(NormalizationForm.FormD);
|
||||
var stringBuilder = new StringBuilder(normalizedString.Length);
|
||||
var stringBuilder = new StringBuilder();
|
||||
|
||||
foreach (var c in from c in normalizedString
|
||||
let unicodeCategory = CharUnicodeInfo.GetUnicodeCategory(c)
|
||||
foreach (var c in from c in normalizedString.EnumerateRunes()
|
||||
let unicodeCategory = Rune.GetUnicodeCategory(c)
|
||||
where unicodeCategory != UnicodeCategory.NonSpacingMark
|
||||
select c)
|
||||
{
|
||||
stringBuilder.Append(c);
|
||||
}
|
||||
|
||||
return stringBuilder
|
||||
.ToString()
|
||||
.Normalize(NormalizationForm.FormC);
|
||||
return stringBuilder.ToString().Normalize(NormalizationForm.FormC);
|
||||
}
|
||||
|
||||
public static string FormatMessageForEngine(this string str, IRConParserConfiguration config)
|
||||
|
@ -487,7 +487,7 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = "Dismiss",
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_DISMISS_ALERT_FORM_SUBMIT"],
|
||||
Name = Localization["WEBFRONT_ACTION_DISMISS_ALERT_SINGLE"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
@ -521,7 +521,7 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = "Dismiss",
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_DISMISS_ALERT_FORM_SUBMIT"],
|
||||
Name = Localization["WEBFRONT_ACTION_DISMISS_ALERT_MANY"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
@ -555,14 +555,14 @@ namespace WebfrontCore.Controllers
|
||||
{
|
||||
var info = new ActionInfo
|
||||
{
|
||||
ActionButtonLabel = "Send",
|
||||
ActionButtonLabel = Localization["WEBFRONT_ACTION_OFFLINE_MESSAGE_FORM_SUBMIT"],
|
||||
Name = Localization["WEBFRONT_ACTION_OFFLINE_MESSAGE_BUTTON_COMPOSE"],
|
||||
Inputs = new List<InputInfo>
|
||||
{
|
||||
new()
|
||||
{
|
||||
Name = "message",
|
||||
Label = "Message Content",
|
||||
Label = Localization["WEBFRONT_ACTION_OFFLINE_MESSAGE_FORM_CONTENT"],
|
||||
},
|
||||
},
|
||||
Action = "OfflineMessage",
|
||||
|
@ -43,22 +43,22 @@
|
||||
{
|
||||
if (Model == EFPenalty.PenaltyType.Any)
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected">@penaltyType.ToString()</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected">@loc[$"WEBFRONT_PENALTY_{penaltyType.ToString().ToUpper()}"]</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)">@penaltyType.ToString()</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)">@loc[$"WEBFRONT_PENALTY_{penaltyType.ToString().ToUpper()}"]</option>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (penaltyType == Model)
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected">@penaltyType.ToString()</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)" selected="selected">@loc[$"WEBFRONT_PENALTY_{penaltyType.ToString().ToUpper()}"]</option>
|
||||
}
|
||||
else
|
||||
{
|
||||
<option value="@Convert.ToInt32(penaltyType)">@penaltyType.ToString()</option>
|
||||
<option value="@Convert.ToInt32(penaltyType)">@loc[$"WEBFRONT_PENALTY_{penaltyType.ToString().ToUpper()}"]</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td colspan="10%" class="penalties-color-@Model.PenaltyTypeText.ToLower()">
|
||||
@Model.PenaltyType
|
||||
@ViewBag.Localization[$"WEBFRONT_PENALTY_{Model.PenaltyType.ToString().ToUpper()}"]
|
||||
</td>
|
||||
<td colspan="35%">
|
||||
<color-code value="@($"{Model.Offense}{(ViewBag.Authorized ? Model.AdditionalPenaltyInformation : "")}")"></color-code>
|
||||
|
Loading…
Reference in New Issue
Block a user