Merge pull request #8423 from Robyt3/Client-Mapdownload-Speed-Localize

Make map download progress and speed label translatable
This commit is contained in:
Dennis Felsing 2024-06-01 15:18:35 +00:00 committed by GitHub
commit 3233492fd3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1843,7 +1843,7 @@ void CMenus::RenderPopupLoading(CUIRect Screen)
str_format(aTitle, sizeof(aTitle), "%s: %s", Localize("Downloading map"), Client()->MapDownloadName());
str_format(aLabel1, sizeof(aLabel1), "%d/%d KiB (%.1f KiB/s)", Client()->MapDownloadAmount() / 1024, Client()->MapDownloadTotalsize() / 1024, m_DownloadSpeed / 1024.0f);
str_format(aLabel1, sizeof(aLabel1), Localize("%d/%d KiB (%.1f KiB/s)"), Client()->MapDownloadAmount() / 1024, Client()->MapDownloadTotalsize() / 1024, m_DownloadSpeed / 1024.0f);
const int SecondsLeft = maximum(1, m_DownloadSpeed > 0.0f ? static_cast<int>((Client()->MapDownloadTotalsize() - Client()->MapDownloadAmount()) / m_DownloadSpeed) : 1);
const int MinutesLeft = SecondsLeft / 60;