Skip to content

Commit

Permalink
Fix translatability of seconds unit formatting for sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Apr 11, 2023
1 parent 98c782c commit 500ab1f
Show file tree
Hide file tree
Showing 44 changed files with 55 additions and 9 deletions.
5 changes: 4 additions & 1 deletion UI/GameSettingsScreen.cpp
Expand Up @@ -678,6 +678,7 @@ void GameSettingsScreen::CreateControlsSettings(UI::ViewGroup *controlsSettings)
using namespace UI;

auto co = GetI18NCategory(I18NCat::CONTROLS);
auto di = GetI18NCategory(I18NCat::DIALOG);
auto ms = GetI18NCategory(I18NCat::MAINSETTINGS);

int deviceType = System_GetPropertyInt(SYSPROP_DEVICE_TYPE);
Expand Down Expand Up @@ -722,7 +723,7 @@ void GameSettingsScreen::CreateControlsSettings(UI::ViewGroup *controlsSettings)
opacity->SetFormat("%i%%");
PopupSliderChoice *autoHide = controlsSettings->Add(new PopupSliderChoice(&g_Config.iTouchButtonHideSeconds, 0, 300, 20, co->T("Auto-hide buttons after seconds"), screenManager(), co->T("seconds, 0 : off")));
autoHide->SetEnabledPtr(&g_Config.bShowTouchControls);
autoHide->SetFormat("%is");
autoHide->SetFormat(di->T("%d seconds"));
autoHide->SetZeroLabel(co->T("Off"));

// Hide stick background, useful when increasing the size
Expand Down Expand Up @@ -892,6 +893,7 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
using namespace UI;

auto sy = GetI18NCategory(I18NCat::SYSTEM);
auto di = GetI18NCategory(I18NCat::DIALOG);
auto vr = GetI18NCategory(I18NCat::VR);
auto th = GetI18NCategory(I18NCat::THEMES);

Expand Down Expand Up @@ -1057,6 +1059,7 @@ void GameSettingsScreen::CreateSystemSettings(UI::ViewGroup *systemSettings) {
});
lockedMhz->SetZeroLabel(sy->T("Auto"));
PopupSliderChoice *rewindInterval = systemSettings->Add(new PopupSliderChoice(&g_Config.iRewindSnapshotInterval, 0, 60, 0, sy->T("Rewind Snapshot Interval"), screenManager(), sy->T("seconds, 0:off")));
rewindInterval->SetFormat(di->T("%d seconds"));
rewindInterval->SetZeroLabel(sy->T("Off"));

systemSettings->Add(new ItemHeader(sy->T("General")));
Expand Down
1 change: 1 addition & 0 deletions assets/lang/ar_AE.ini
Expand Up @@ -274,6 +274,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d seconds
* PSP res = ‎* PSP حجم
Active = Active
Back = ‎رجوع
Expand Down
1 change: 1 addition & 0 deletions assets/lang/az_AZ.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Geri
Expand Down
1 change: 1 addition & 0 deletions assets/lang/bg_BG.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Назад
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/ca_ES.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d segons
* PSP res = * resolució PSP
Active = Actiu
Back = Enrere
Expand Down Expand Up @@ -1131,7 +1132,7 @@ Failed to save state. Error in the file system. = Failed to save state. Error in
Fast (lag on slow storage) = Fast (lag on slow storage)
Fast Memory = Memòria ràpida (inestable)
Force real clock sync (slower, less lag) = Force real clock sync (slower, less lag)
seconds, 0:off = seconds, 0 = off
seconds, 0:off = segons, 0 = off
Games list settings = Games list settings
General = General
Grid icon size = Grid icon size
Expand Down
1 change: 1 addition & 0 deletions assets/lang/cz_CZ.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d vteřin
* PSP res = * PSP rozlišení
Active = Active
Back = Zpět
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/da_DK.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d sekunder
* PSP res = * PSP res
Active = Active
Back = Tilbage
Expand Down Expand Up @@ -1130,7 +1131,7 @@ Failed to save state. Error in the file system. = Failed to save state. Error in
Fast (lag on slow storage) = Hurtig (forsinkelser på langsomt lager)
Fast Memory = Hurtig hukommelse (ustabil)
Force real clock sync (slower, less lag) = Tving rigtig clock sync (langsommere, færre forsinkelser)
seconds, 0:off = seconds, 0 = off
seconds, 0:off = sekunder, 0 = off
Games list settings = Games list settings
General = Generel
Grid icon size = Grid icon size
Expand Down
1 change: 1 addition & 0 deletions assets/lang/de_DE.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d Sekunden
* PSP res = * PSP Auflösung
Active = Aktiv
Back = Zurück
Expand Down
1 change: 1 addition & 0 deletions assets/lang/dr_ID.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Poleboko'
Expand Down
1 change: 1 addition & 0 deletions assets/lang/en_US.ini
Expand Up @@ -290,6 +290,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Back
Expand Down
1 change: 1 addition & 0 deletions assets/lang/es_ES.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Test de pantalla táctil
VFPU = VFPU

[Dialog]
%d seconds = %d segundos
* PSP res = * resolución PSP
Active = Activo
Back = Atrás
Expand Down
1 change: 1 addition & 0 deletions assets/lang/es_LA.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = Probar pantalla táctil
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Activo
Back = Atrás
Expand Down
1 change: 1 addition & 0 deletions assets/lang/fa_IR.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = ‎برگشت
Expand Down
1 change: 1 addition & 0 deletions assets/lang/fi_FI.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Takaisin
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/fr_FR.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Test de l'écran tactile
VFPU = VFPU
[Dialog]
%d seconds = %d secondes
* PSP res = × définition PSP
Active = Actif
Back = Retour
Expand Down Expand Up @@ -1122,7 +1123,7 @@ Failed to save state. Error in the file system. = Échec de la sauvegarde de l'
Fast (lag on slow storage) = Rapide (lag sur stockage lent)
Fast Memory = Mémoire rapide (instable)
Force real clock sync (slower, less lag) = Forcer synchronisation temps réel (+ lent, - de décalage)
seconds, 0:off = images, 0 = off
seconds, 0:off = secondes, 0 = off
Games list settings = Paramètres des listes de jeux
General = Général
Grid icon size = Taille des icônes
Expand Down
1 change: 1 addition & 0 deletions assets/lang/gl_ES.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Atrás
Expand Down
1 change: 1 addition & 0 deletions assets/lang/gr_EL.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d δευτερόλεπτα
* PSP res = * ανάλυση PSP
Active = ΕΝΕΡΓΟ
Back = ΠΙΣΩ
Expand Down
1 change: 1 addition & 0 deletions assets/lang/he_IL.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = <<
Expand Down
1 change: 1 addition & 0 deletions assets/lang/he_IL_invert.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = <<
Expand Down
1 change: 1 addition & 0 deletions assets/lang/hr_HR.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d sekundi
* PSP res = * PSP res
Active = Aktivno
Back = Nazad
Expand Down
1 change: 1 addition & 0 deletions assets/lang/hu_HU.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Érintőképernyő teszt
VFPU = VFPU

[Dialog]
%d seconds = %d másodpercig
* PSP res = * PSP felbontás
Active = Aktív
Back = Vissza
Expand Down
1 change: 1 addition & 0 deletions assets/lang/id_ID.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Tes layar sentuh
VFPU = VFPU

[Dialog]
%d seconds = %d detik
* PSP res = * PSP res
Active = Aktif
Back = Kembali
Expand Down
1 change: 1 addition & 0 deletions assets/lang/it_IT.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Test del touchscreen
VFPU = VFPU
[Dialog]
%d seconds = %d secondi
* PSP res = * definizione PSP
Active = Attiva
Back = Indietro
Expand Down
1 change: 1 addition & 0 deletions assets/lang/ja_JP.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = タッチスクリーンのテスト
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP 解像度
Active = アクティブ
Back = 戻る
Expand Down
1 change: 1 addition & 0 deletions assets/lang/jv_ID.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d detik
* PSP res = * PSP res
Active = Active
Back = Bali
Expand Down
1 change: 1 addition & 0 deletions assets/lang/ko_KR.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = 터치화면 테스트
VFPU = VFPU

[Dialog]
%d seconds = %d 초
* PSP res = * PSP 리소스
Active = 활성화
Back = 뒤로가기
Expand Down
1 change: 1 addition & 0 deletions assets/lang/lo_LA.ini
Expand Up @@ -265,6 +265,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d ວິນາທີ
* PSP res = * ຂະໜາດຈໍ PSP
Active = Active
Back = ຍ້ອນກັບ
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/lt-LT.ini
Expand Up @@ -82,7 +82,7 @@ Raw input = Raw input
Repeat mode = Repeat mode
Reset to defaults = Reset to defaults
Screen Rotation = Ekramo pasukimas
seconds, 0 : off = seconds, 0 = off
seconds, 0 : off = sekundžių, 0 = off
Sensitivity (scale) = Sensitivity (scale)
Sensitivity = Sensitivacija
Shape = Shape
Expand Down Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d sekundžių
* PSP res = * PSP res
Active = Active
Back = Atgal
Expand Down
1 change: 1 addition & 0 deletions assets/lang/ms_MY.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Balik
Expand Down
1 change: 1 addition & 0 deletions assets/lang/nl_NL.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * PSP-resolutie
Active = Active
Back = Terug
Expand Down
1 change: 1 addition & 0 deletions assets/lang/no_NO.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d seconds
* PSP res = * PSP res
Active = Active
Back = Tilbake
Expand Down
1 change: 1 addition & 0 deletions assets/lang/pl_PL.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Test ekranu dotykowego
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * rozdz. PSP
Active = Aktywny
Back = Powrót
Expand Down
1 change: 1 addition & 0 deletions assets/lang/pt_BR.ini
Expand Up @@ -290,6 +290,7 @@ Touchscreen Test = Teste do Touchscreen
VFPU = VFPU

[Dialog]
%d seconds = %d segundos
* PSP res = * Resolução do PSP
Active = Ativo
Back = Voltar
Expand Down
1 change: 1 addition & 0 deletions assets/lang/pt_PT.ini
Expand Up @@ -290,6 +290,7 @@ Touchscreen Test = Teste do Touchscreen
VFPU = VFPU

[Dialog]
%d seconds = %d segundos
* PSP res = * Resolução do PSP
Active = Ativo
Back = Voltar
Expand Down
3 changes: 2 additions & 1 deletion assets/lang/ro_RO.ini
Expand Up @@ -82,7 +82,7 @@ Raw input = Raw input
Repeat mode = Repeat mode
Reset to defaults = Reset to defaults
Screen Rotation = Rotație ecran
seconds, 0 : off = seconds, 0 = off
seconds, 0 : off = secunde, 0 = off
Sensitivity (scale) = Sensitivity (scale)
Sensitivity = Sensitivitate
Shape = Shape
Expand Down Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchscreen test
VFPU = VFPU
[Dialog]
%d seconds = %d secunde
* PSP res = * PSP res
Active = Active
Back = Înapoi
Expand Down
1 change: 1 addition & 0 deletions assets/lang/ru_RU.ini
Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Тест сенсорного экрана
VFPU = VFPU

[Dialog]
%d seconds = %d seconds
* PSP res = * разр. PSP
Active = Активно
Back = Назад
Expand Down
5 changes: 3 additions & 2 deletions assets/lang/sv_SE.ini
Expand Up @@ -82,7 +82,7 @@ Raw input = Raw input
Repeat mode = Repeat mode
Reset to defaults = Återställ till standardvärden
Screen Rotation = Skärmrotation
seconds, 0 : off = seconds, 0 = off
seconds, 0 : off = sekunder, 0 = off
Sensitivity (scale) = Sensitivity (scale)
Sensitivity = Känslighet
Shape = Shape
Expand Down Expand Up @@ -266,6 +266,7 @@ Touchscreen Test = Touchskärm-test
VFPU = VFPU
[Dialog]
%d seconds = %d sekunder
* PSP res = * PSP res
Active = Aktiv
Back = Tillbaka
Expand Down Expand Up @@ -1130,7 +1131,7 @@ Failed to save state. Error in the file system. = Kunde inte spara state - filsy
Fast (lag on slow storage) = Snabbt (lag on slow storage)
Fast Memory = Snabbt minne (instabilt)
Force real clock sync (slower, less lag) = Force real clock sync (slower, less lag)
seconds, 0:off = seconds, 0 = avstängt
seconds, 0:off = sekunder, 0: avstängt
Games list settings = Inställningar för spel-listan
General = Blandat
Grid icon size = Ikonstorlek i rutnät
Expand Down

0 comments on commit 500ab1f

Please sign in to comment.