From 39281ee8a736af6fa6eebc4c0d6e5953328fe030 Mon Sep 17 00:00:00 2001 From: xapantu Date: Mon, 23 Aug 2010 14:10:36 +0000 Subject: [PATCH] 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 --- src/states_screens/credits.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/states_screens/credits.cpp b/src/states_screens/credits.cpp index 2150799bb..c2b842715 100644 --- a/src/states_screens/credits.cpp +++ b/src/states_screens/credits.cpp @@ -228,20 +228,16 @@ void CreditsScreen::loadedFromFile() std::vector translator = StringUtils::split(_("translator-credits"), '\n'); 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"); CreditsEntry entry(line); 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(translator[i+1]); - } - if(i + 2 < translator.size()) - { - translator[i].append('\n'); - translator[i].append(translator[i+2]); + translator[i].append(translator[i+j]); } getCurrentSection()->addSubEntry(translator[i]); }