Translate phase 1

This commit is contained in:
2025-09-21 17:01:12 +02:00
parent 0808266887
commit 6d8a8476b4
30 changed files with 2763 additions and 749 deletions

View File

@@ -28,17 +28,17 @@ public class BanUserPopupHandler : IPopupHandler
public void DrawContent()
{
UiSharedService.TextWrapped("User " + (_reportedPair.UserData.AliasOrUID) + " will be banned and removed from this Syncshell.");
ImGui.InputTextWithHint("##banreason", "Ban Reason", ref _banReason, 255);
UiSharedService.TextWrapped(_uiSharedService.Localize("Popup.BanUser.Description", "User {0} will be banned and removed from this Syncshell.", _reportedPair.UserData.AliasOrUID));
ImGui.InputTextWithHint("##banreason", _uiSharedService.Localize("Popup.BanUser.ReasonHint", "Ban Reason"), ref _banReason, 255);
if (_uiSharedService.IconTextButton(FontAwesomeIcon.UserSlash, "Ban User"))
if (_uiSharedService.IconTextButton(FontAwesomeIcon.UserSlash, _uiSharedService.Localize("Popup.BanUser.Button", "Ban User")))
{
ImGui.CloseCurrentPopup();
var reason = _banReason;
_ = _apiController.GroupBanUser(new GroupPairDto(_group.Group, _reportedPair.UserData), reason);
_banReason = string.Empty;
}
UiSharedService.TextWrapped("The reason will be displayed in the banlist. The current server-side alias if present (Vanity ID) will automatically be attached to the reason.");
UiSharedService.TextWrapped(_uiSharedService.Localize("Popup.BanUser.ReasonNote", "The reason will be displayed in the banlist. The current server-side alias if present (Vanity ID) will automatically be attached to the reason."));
}
public void Open(OpenBanUserPopupMessage message)
@@ -47,4 +47,4 @@ public class BanUserPopupHandler : IPopupHandler
_group = message.GroupFullInfoDto;
_banReason = string.Empty;
}
}
}

View File

@@ -72,10 +72,10 @@ public class PopupHandler : WindowMediatorSubscriberBase
if (_currentHandler.ShowClose)
{
ImGui.Separator();
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Times, "Close"))
if (_uiSharedService.IconTextButton(FontAwesomeIcon.Times, _uiSharedService.Localize("Popup.Generic.Close", "Close")))
{
ImGui.CloseCurrentPopup();
}
}
}
}
}

View File

@@ -29,23 +29,21 @@ internal class ReportPopupHandler : IPopupHandler
public void DrawContent()
{
using (_uiSharedService.UidFont.Push())
UiSharedService.TextWrapped("Report " + _reportedPair!.UserData.AliasOrUID + " Profile");
UiSharedService.TextWrapped(_uiSharedService.Localize("Popup.Report.Title", "Report {0} Profile", _reportedPair!.UserData.AliasOrUID));
ImGui.InputTextMultiline("##reportReason", ref _reportReason, 500, new Vector2(500 - ImGui.GetStyle().ItemSpacing.X * 2, 200));
UiSharedService.TextWrapped($"Note: Sending a report will disable the offending profile globally.{Environment.NewLine}" +
$"The report will be sent to the team of your currently connected server.{Environment.NewLine}" +
$"Depending on the severity of the offense the users profile or account can be permanently disabled or banned.");
UiSharedService.ColorTextWrapped("Report spam and wrong reports will not be tolerated and can lead to permanent account suspension.", ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped("This is not for reporting misbehavior but solely for the actual profile. " +
"Reports that are not solely for the profile will be ignored.", ImGuiColors.DalamudYellow);
UiSharedService.TextWrapped(_uiSharedService.Localize("Popup.Report.Note", "Note: Sending a report will disable the offending profile globally.\nThe report will be sent to the team of your currently connected server.\nDepending on the severity of the offense the users profile or account can be permanently disabled or banned."));
UiSharedService.ColorTextWrapped(_uiSharedService.Localize("Popup.Report.Warning", "Report spam and wrong reports will not be tolerated and can lead to permanent account suspension."), ImGuiColors.DalamudRed);
UiSharedService.ColorTextWrapped(_uiSharedService.Localize("Popup.Report.Scope", "This is not for reporting misbehavior but solely for the actual profile. Reports that are not solely for the profile will be ignored."), ImGuiColors.DalamudYellow);
using (ImRaii.Disabled(string.IsNullOrEmpty(_reportReason)))
{
if (_uiSharedService.IconTextButton(FontAwesomeIcon.ExclamationTriangle, "Send Report"))
if (_uiSharedService.IconTextButton(FontAwesomeIcon.ExclamationTriangle, _uiSharedService.Localize("Popup.Report.Button", "Send Report")))
{
ImGui.CloseCurrentPopup();
var reason = _reportReason;
_ = _apiController.UserReportProfile(new(_reportedPair.UserData, reason));
_reportReason = string.Empty;
}
}
}
@@ -55,4 +53,4 @@ internal class ReportPopupHandler : IPopupHandler
_reportedPair = msg.PairToReport;
_reportReason = string.Empty;
}
}
}