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

@@ -23,7 +23,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
public DownloadUi(ILogger<DownloadUi> logger, DalamudUtilService dalamudUtilService, MareConfigService configService,
FileUploadManager fileTransferManager, MareMediator mediator, UiSharedService uiShared, PerformanceCollectorService performanceCollectorService)
: base(logger, mediator, "Umbra Downloads", performanceCollectorService)
: base(logger, mediator, uiShared.Localize("DownloadUi.WindowTitle", "Umbra Downloads"), performanceCollectorService)
{
_dalamudUtilService = dalamudUtilService;
_configService = configService;
@@ -69,6 +69,8 @@ public class DownloadUi : WindowMediatorSubscriberBase
});
}
private string L(string key, string fallback, params object[] args) => _uiShared.Localize(key, fallback, args);
protected override void DrawInternal()
{
if (_configService.Current.ShowTransferWindow)
@@ -87,7 +89,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
UiSharedService.DrawOutlinedFont($"▲", ImGuiColors.DalamudWhite, new Vector4(0, 0, 0, 255), 1);
ImGui.SameLine();
var xDistance = ImGui.GetCursorPosX();
UiSharedService.DrawOutlinedFont($"Compressing+Uploading {doneUploads}/{totalUploads}",
UiSharedService.DrawOutlinedFont(L("DownloadUi.UploadStatus", "Compressing+Uploading {0}/{1}", doneUploads, totalUploads),
ImGuiColors.DalamudWhite, new Vector4(0, 0, 0, 255), 1);
ImGui.NewLine();
ImGui.SameLine(xDistance);
@@ -120,7 +122,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
ImGui.SameLine();
var xDistance = ImGui.GetCursorPosX();
UiSharedService.DrawOutlinedFont(
$"{item.Key.Name} [W:{dlSlot}/Q:{dlQueue}/P:{dlProg}/D:{dlDecomp}]",
L("DownloadUi.DownloadStatus", "{0} [W:{1}/Q:{2}/P:{3}/D:{4}]", item.Key.Name, dlSlot, dlQueue, dlProg, dlDecomp),
ImGuiColors.DalamudWhite, new Vector4(0, 0, 0, 255), 1);
ImGui.NewLine();
ImGui.SameLine(xDistance);
@@ -191,7 +193,7 @@ public class DownloadUi : WindowMediatorSubscriberBase
try
{
using var _ = _uiShared.UidFont.Push();
var uploadText = "Uploading";
var uploadText = L("DownloadUi.UploadingLabel", "Uploading");
var textSize = ImGui.CalcTextSize(uploadText);
@@ -245,4 +247,4 @@ public class DownloadUi : WindowMediatorSubscriberBase
MaximumSize = new Vector2(300, maxHeight),
};
}
}
}