diff --git a/src/states_screens/credits.cpp b/src/states_screens/credits.cpp index 4592f729d..2602ae566 100644 --- a/src/states_screens/credits.cpp +++ b/src/states_screens/credits.cpp @@ -170,6 +170,13 @@ void CreditsScreen::loadedFromFile() // let's assume the file is encoded as UTF-16 while (getWideLine( file, &line )) { +#undef DEBUG_TRANSLATIONS // Enable to only see the translator credits +#ifdef DEBUG_TRANSLATIONS + static int my_counter = 0; + if (my_counter > 0) + break; + my_counter++; +#endif stringc cversion = line.c_str(); //printf("CREDITS line : %s\n", cversion.c_str()); @@ -207,6 +214,7 @@ void CreditsScreen::loadedFromFile() irr::core::stringw translators_credits = _("translator-credits"); + const int MAX_PER_SCREEN = 6; if (translators_credits != L"translator-credits") { @@ -214,13 +222,13 @@ void CreditsScreen::loadedFromFile() StringUtils::split(translators_credits, '\n'); m_sections.push_back( new CreditsSection("Translations")); - for(unsigned int i = 1; i < translator.size(); i = i + 4) + for(unsigned int i = 1; i < translator.size(); i = i + MAX_PER_SCREEN) { line = stringw(translations->getCurrentLanguageName().c_str()); CreditsEntry entry(line); getCurrentSection()->addEntry( entry ); - for(unsigned int j = 0; i + j < translator.size() && j < 6; j ++) + for(unsigned int j = 0; i + j < translator.size() && j < MAX_PER_SCREEN; j ++) { getCurrentSection()->addSubEntry(translator[i + j]); }