Make formatting of song title translatable

Different languages use different quotation marks and spacing
(e.g., « Song title » in French), so the formatting needs
to be translatable.
This commit is contained in:
Karl Ove Hufthammer 2020-05-02 13:22:45 +02:00
parent 3359862b2b
commit 1d9e6f8135

View File

@ -626,7 +626,8 @@ void RaceGUIBase::drawGlobalMusicDescription()
const MusicInformation* mi = music_manager->getCurrentMusic();
if (!mi) return;
core::stringw thetext = core::stringw(L"\"") + mi->getTitle() + L"\"";
// I18N: string used to show the song title (e.g. "Sunny Song")
core::stringw thetext = _("\"%s\"", mi->getTitle());
core::dimension2d< u32 > textSize = font->getDimension(thetext.c_str());
int textWidth = textSize.Width;