Add translation string, show uncompressed size if different from disk size

This commit is contained in:
Henrik Rydgård 2023-11-27 01:10:52 +01:00
parent 55fdeb93ff
commit a9c1bc2ce7
47 changed files with 99 additions and 5 deletions

View file

@ -19,7 +19,7 @@ void NiceSizeFormat(uint64_t size, char *out, size_t bufSize) {
if (s == 0)
snprintf(out, bufSize, "%d B", (int)size);
else
snprintf(out, bufSize, "%3.1f %s", f, sizes[s]);
snprintf(out, bufSize, "%3.2f %s", f, sizes[s]);
}
std::string NiceSizeFormat(uint64_t size) {

View file

@ -1918,6 +1918,6 @@ bool PlayTimeTracker::GetPlayedTimeString(const std::string &gameId, std::string
totalSeconds /= 60;
int hours = totalSeconds;
*str = StringFromFormat(ga->T("Play time: %02d:%02d:%02d"), hours, minutes, seconds);
*str = ApplySafeSubstitutions(ga->T("Time Played: %1h %2m %3s"), hours, minutes, seconds);
return true;
}

View file

@ -148,6 +148,7 @@ bool IsBlockingExecution() {
return g_isLoggingIn || g_isIdentifying;
}
// This is the RetroAchievements game ID, rather than the PSP game ID.
static u32 GetGameID() {
if (!g_rcClient) {
return 0;
@ -243,6 +244,7 @@ static void event_handler_callback(const rc_client_event_t *event, rc_client_t *
// TODO: Translation?
std::string title = ApplySafeSubstitutions(ac->T("Mastered %1"), gameInfo->title);
rc_client_user_game_summary_t summary;
rc_client_get_user_game_summary(g_rcClient, &summary);

View file

@ -25,6 +25,7 @@
#include "Common/UI/ViewGroup.h"
#include "Common/Data/Text/I18n.h"
#include "Common/Data/Text/Parsers.h"
#include "Common/Data/Encoding/Utf8.h"
#include "Common/File/FileUtil.h"
#include "Common/StringUtils.h"
@ -111,7 +112,8 @@ void GameScreen::CreateViews() {
LinearLayout *mainGameInfo = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
mainGameInfo->SetSpacing(3.0f);
badgeHolder->Add(new GameIconView(gamePath_, 2.0f));
// Need an explicit size here because homebrew uses screenshots as icons.
badgeHolder->Add(new GameIconView(gamePath_, 2.0f, new LinearLayoutParams(144 * 2, 80 * 2, UI::Margins(0))));
badgeHolder->Add(mainGameInfo);
leftColumn->Add(badgeHolder);
@ -288,11 +290,15 @@ void GameScreen::render() {
if (info->gameSizeOnDisk) {
char temp[256];
if (tvGameSize_) {
snprintf(temp, sizeof(temp), "%s: %1.1f %s", ga->T("Game"), (float)(info->gameSizeOnDisk) / 1024.f / 1024.f, ga->T("MB"));
snprintf(temp, sizeof(temp), "%s: %s", ga->T("Game"), NiceSizeFormat(info->gameSizeOnDisk).c_str());
if (info->gameSizeUncompressed != info->gameSizeOnDisk) {
size_t len = strlen(temp);
snprintf(temp + len, sizeof(temp) - len, " (%s: %s)", ga->T("Uncompressed"), NiceSizeFormat(info->gameSizeUncompressed).c_str());
}
tvGameSize_->SetText(temp);
}
if (tvSaveDataSize_) {
snprintf(temp, sizeof(temp), "%s: %1.2f %s", ga->T("SaveData"), (float)(info->saveDataSize) / 1024.f / 1024.f, ga->T("MB"));
snprintf(temp, sizeof(temp), "%s: %s", ga->T("SaveData"), NiceSizeFormat(info->saveDataSize).c_str());
tvSaveDataSize_->SetText(temp);
}
if (info->installDataSize > 0 && tvInstallDataSize_) {

View file

@ -535,6 +535,8 @@ Remove From Recent = ‎مسح من "الحالي"
SaveData = ‎بيانات الحفظ
Setting Background = ‎إعدادات الخلفية
Show In Folder = ‎أظهر في المجلد
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = ‎أمريكا
Use UI background = ‎إستخدم خلفية الواجهة

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Savedata
Setting Background = Setting background
Show In Folder = Show in folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Премахни от „Скорошни“
SaveData = Savedata
Setting Background = Setting background
Show In Folder = Покажи в папка
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Dades guardades
Setting Background = Imatge de fons
Show In Folder = Mostrar en carpeta
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = EEUU
Use UI background = Utilitzar imatge de fons de l'interfície d'usuari

View file

@ -527,6 +527,8 @@ Remove From Recent = Odstranit z "Nedávné"
SaveData = Uložená data
Setting Background = Setting background
Show In Folder = Zobrazit ve složce
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Fjern fra "Nylige"
SaveData = Gem data
Setting Background = Setting background
Show In Folder = Vis i katalog
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Brug UI baggrund

View file

@ -527,6 +527,8 @@ Remove From Recent = Aus der Liste entfernen
SaveData = Speicherdaten
Setting Background = Einstellungshintergrund
Show In Folder = Ordner öffnen
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Benutze UI Hintergrund

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Pangsave
Setting Background = Setting background
Show In Folder = Show in folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -551,6 +551,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Savedata
Setting Background = Setting background
Show In Folder = Show in folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Borrar de recientes
SaveData = Datos
Setting Background = Ajustar imagen de fondo
Show In Folder = Mostrar en carpeta
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = América
Use UI background = Usar imagen de fondo

View file

@ -527,6 +527,8 @@ Remove From Recent = Borrar de recientes
SaveData = Datos
Setting Background = Configurar fondo
Show In Folder = Mostrar en carpeta
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = América
Use UI background = Usar fondo como interfaz

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = ‎دیتای ذخیره
Setting Background = تنظیمات پس زمینا
Show In Folder = نمایش پوشه
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = آمریکا
Use UI background = استفاده به عنوان پس زمینه؟

View file

@ -527,6 +527,8 @@ Remove From Recent = Poista "äskettäin" listalta...
SaveData = Tallennustieto
Setting Background = Setting background
Show In Folder = Näytä kansiossa
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Supprimer de "Récemment"
SaveData = Sauvegarde 
Setting Background = Paramétrage du fond d'écran
Show In Folder = Montrer dans dossier
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Utiliser le fond d'écran

View file

@ -527,6 +527,8 @@ Remove From Recent = Borrar de recentes
SaveData = Datos
Setting Background = Setting background
Show In Folder = Mostrar en carpeta
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Κατάργηση από τα πρόσφατα
SaveData = Δεδομένα Αποθήκευσης
Setting Background = Ρύθμιση φόντου
Show In Folder = Εμφάνιση σε Φάκελο
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = ΗΠΑ
Use UI background = Χρήση φόντου UI

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Savedata
Setting Background = Setting background
Show In Folder = Show in folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Savedata
Setting Background = Setting background
Show In Folder = Show in folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Makni iz "Nedavno"
SaveData = Savedata
Setting Background = Postavljanje pozadine
Show In Folder = Prikaži u mapi
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = SAD
Use UI background = Koristi UI pozadinu

View file

@ -527,6 +527,8 @@ Remove From Recent = Törlés a listából
SaveData = Mentések
Setting Background = Háttér beállítás
Show In Folder = Mutatás mappában
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Alapértelmezett háttér használata

View file

@ -527,6 +527,8 @@ Remove From Recent = Hapus dari "Terbaru"
SaveData = Simpanan data
Setting Background = Atur latar belakang
Show In Folder = Tampilkan di berkas
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = Amerika Serikat
Use UI background = Gunakan latar belakang UI

View file

@ -527,6 +527,8 @@ Remove From Recent = Rimuovi dai Recenti
SaveData = Dati salvataggio
Setting Background = Imposta sfondo
Show In Folder = Mostra nella Cartella
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Usa sfondo interfaccia

View file

@ -527,6 +527,8 @@ Remove From Recent = 履歴から削除する
SaveData = セーブデータ
Setting Background = 背景を設定
Show In Folder = フォルダに表示する
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = UIの背景を使う

View file

@ -527,6 +527,8 @@ Remove From Recent = Mbusek soko "Terakher"
SaveData = Simpen Data
Setting Background = Setting background
Show In Folder = Tampilno Nang Folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = "최근"에서 제거
SaveData = 저장데이터
Setting Background = 배경 설정
Show In Folder = 폴더에 표기
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = 미국
Use UI background = UI 배경 사용

View file

@ -527,6 +527,8 @@ Remove From Recent = ເອົາອອກຈາກໜ້າ "ຫຼ້າສຸ
SaveData = ບັນທຶກຂໍ້ມູນ
Setting Background = Setting background
Show In Folder = ສະແດງໃນໂຟນເດີ້
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = ໃຊ້ເປັນພາບພື້ນຫຼັງ

View file

@ -527,6 +527,8 @@ Remove From Recent = Ištrinti iš "Paskutiniai" sąrašo
SaveData = Išsaugojimai
Setting Background = Setting background
Show In Folder = Rodyti aplanke
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Hapuskan dari "Semasa"
SaveData = Data disimpan
Setting Background = Setting background
Show In Folder = Papar dalam folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Wissen uit "Recent"
SaveData = Opgeslagen data
Setting Background = Achtergrondinstelling
Show In Folder = Weergeven in map
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = VS
Use UI background = UI-achtergrond gebruiken

View file

@ -527,6 +527,8 @@ Remove From Recent = Remove from "Recent"
SaveData = Savedata
Setting Background = Setting background
Show In Folder = Show in folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -532,6 +532,8 @@ Remove From Recent = Usuń z "Ostatnio uruchamianych tytułów"
SaveData = Zapisy gier
Setting Background = Ustawianie tła
Show In Folder = Pokaż w folderze
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Użyj tego tła

View file

@ -551,6 +551,8 @@ Remove From Recent = Remover dos "Recentes"
SaveData = Dados do save
Setting Background = Configurando o cenário de fundo
Show In Folder = Mostrar na pasta
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = EUA
Use UI background = Usar cenário de fundo da interface do usuário

View file

@ -551,6 +551,8 @@ Remove From Recent = Remover de "Recente"
SaveData = Dados Salvos
Setting Background = Definindo o cenário de fundo
Show In Folder = Mostrar na pasta
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = EUA
Use UI background = Usar cenário de fundo da interface do usuário.

View file

@ -528,6 +528,8 @@ Remove From Recent = Ștergere de la "Recent"
SaveData = Salvare
Setting Background = Setting background
Show In Folder = Arată în folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = Удалить из недавних
SaveData = Сохранения
Setting Background = Установка фона
Show In Folder = Показать в папке
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = США
Use UI background = Использовать фон интерфейса

View file

@ -528,6 +528,8 @@ Remove From Recent = Ta bort från "Senast spelat"
SaveData = Sparad data
Setting Background = Sätter UI-bakgrund
Show In Folder = Visa i mapp
Time Played: %1h %2m %3s = Spelad tid: %1h %2m %3s
Uncompressed = Okomprimerat
USA = USA
Use UI background = Använd UI-bakgrund

View file

@ -527,6 +527,8 @@ Remove From Recent = Alisin mula sa "Recent"
SaveData = SaveData
Setting Background = Setting background
Show In Folder = Ipakita sa folder
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Use UI background

View file

@ -527,6 +527,8 @@ Remove From Recent = ลบออกจากในหน้า "ล่าสุ
SaveData = ขนาดข้อมูลเซฟ
Setting Background = การตั้งค่าพื้นหลัง
Show In Folder = แสดงในโฟลเดอร์
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA (โซนอเมริกา)
Use UI background = ใช้เป็นภาพพื้นหลัง

View file

@ -529,6 +529,8 @@ Remove From Recent = Geçmişten sil
SaveData = Kayıt
Setting Background = Arkaplan ayarlanıyor
Show In Folder = Dosyada göster
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = ABD
Use UI background = Arayüz arkaplanı olarak kullan

View file

@ -527,6 +527,8 @@ Remove From Recent = Видалити з останніх
SaveData = Збереження
Setting Background = Налаштування фону
Show In Folder = Показати в теці
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = США
Use UI background = Використати фон інтерфейсу

View file

@ -527,6 +527,8 @@ Remove From Recent = Xóa danh sách trò chơi gần đây
SaveData = Dữ liệu save
Setting Background = Cài đặt nền
Show In Folder = Hiện trong thư mục
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = USA
Use UI background = Sử dụng nền UI

View file

@ -527,6 +527,8 @@ Remove From Recent = 从最近游玩中删除
SaveData = 存档
Setting Background = 设置背景
Show In Folder = 在文件夹中显示
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = 美国
Use UI background = 使用背景为壁纸

View file

@ -527,6 +527,8 @@ Remove From Recent = 從「最近遊玩」中移除
SaveData = 儲存資料
Setting Background = 設定背景
Show In Folder = 在資料夾中顯示
Time Played: %1h %2m %3s = Time Played: %1h %2m %3s
Uncompressed = Uncompressed
USA = 美國
Use UI background = 使用 UI 背景