From 9ba2baf8d68549cb9a552531e7729d30a060d6aa Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 27 Mar 2016 16:55:17 -0400 Subject: [PATCH] Properly translate # songs played. No line ending shenanigans this time. --- .../BGAnimations/ScreenSelectProfile overlay.lua | 8 +++++--- Themes/_fallback/Languages/en.ini | 2 ++ Themes/_fallback/Languages/es.ini | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua b/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua index d8d484d7b0..66a8d03600 100644 --- a/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua +++ b/Themes/_fallback/BGAnimations/ScreenSelectProfile overlay.lua @@ -1,6 +1,10 @@ function GetLocalProfiles() local t = {}; + function GetSongsPlayedString(numSongs) + return numSongs == 1 and Screen.String("SingularSongPlayed") or Screen.String("SeveralSongsPlayed") + end + for p = 0,PROFILEMAN:GetNumLocalProfiles()-1 do local profile=PROFILEMAN:GetLocalProfileFromIndex(p); local ProfileCard = Def.ActorFrame { @@ -16,9 +20,7 @@ function GetLocalProfiles() InitCommand=cmd(shadowlength,1;y,8;zoom,0.5;vertspacing,-8;ztest,true); BeginCommand=function(self) local numSongsPlayed = profile:GetNumTotalSongsPlayed(); - local s = numSongsPlayed == 1 and "Song" or "Songs"; - -- todo: localize - self:settext( numSongsPlayed.." "..s.." Played" ); + self:settext( string.format( GetSongsPlayedString( numSongsPlayed ), numSongsPlayed ) ) end; }; }; diff --git a/Themes/_fallback/Languages/en.ini b/Themes/_fallback/Languages/en.ini index e60de3f2de..91092fcd79 100644 --- a/Themes/_fallback/Languages/en.ini +++ b/Themes/_fallback/Languages/en.ini @@ -2728,6 +2728,8 @@ HelpText=&MENUUP;&MENUDOWN; Move &MENULEFT;&MENURIGHT; Change Value HeaderText=Course Overview [ScreenSelectProfile] HeaderText=Select Profile +SingularSongPlayed=%d Song Played +SeveralSongsPlayed=%d Songs Played [ScreenSelectPlayStyle] HeaderText=Select Style [ScreenGameInformation] diff --git a/Themes/_fallback/Languages/es.ini b/Themes/_fallback/Languages/es.ini index 7c510104f4..7e79da6b0a 100644 --- a/Themes/_fallback/Languages/es.ini +++ b/Themes/_fallback/Languages/es.ini @@ -2675,6 +2675,8 @@ HelpText=&MENUUP;&MENUDOWN; Mover &MENULEFT;&MENURIGHT; Cambiar valor HeaderText=Vista de cursos [ScreenSelectProfile] HeaderText=Elegir perfil +SingularSongPlayed=%d Canción Jugadas +SeveralSongsPlayed=%d Canciones Jugadas [ScreenSelectPlayStyle] HeaderText=Selecciona estilo [ScreenGameInformation]