Cleaning up the translator-credits code

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5763 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
xapantu 2010-08-23 14:10:36 +00:00
parent 0f7bb742ab
commit 39281ee8a7

View File

@ -228,20 +228,16 @@ void CreditsScreen::loadedFromFile()
std::vector<irr::core::stringw> translator = StringUtils::split(_("translator-credits"), '\n'); std::vector<irr::core::stringw> translator = StringUtils::split(_("translator-credits"), '\n');
m_sections.push_back( new CreditsSection("Launchpad translations")); m_sections.push_back( new CreditsSection("Launchpad translations"));
for(int i = 1; i < translator.size(); i = i +3) for(int i = 1; i < translator.size(); i = i + 4)
{ {
line = stringw("Translations"); line = stringw("Translations");
CreditsEntry entry(line); CreditsEntry entry(line);
getCurrentSection()->addEntry( entry ); getCurrentSection()->addEntry( entry );
if(i + 1 < translator.size())
for(int j = 1; i + j < translator.size() && j < 4; j ++)
{ {
translator[i].append('\n'); translator[i].append('\n');
translator[i].append(translator[i+1]); translator[i].append(translator[i+j]);
}
if(i + 2 < translator.size())
{
translator[i].append('\n');
translator[i].append(translator[i+2]);
} }
getCurrentSection()->addSubEntry(translator[i]); getCurrentSection()->addSubEntry(translator[i]);
} }