Tweaks to credits : remove outdated translators section from the CREDIT file, use the credits that Launchpad puts in the .po file instead
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10062 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
b262a63d24
commit
cb6a1a45af
BIN
data/CREDITS
BIN
data/CREDITS
Binary file not shown.
@ -207,22 +207,35 @@ void CreditsScreen::loadedFromFile()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
irr::core::stringw translators_credits = _("translator-credits");
|
||||||
|
|
||||||
|
if (translators_credits != L"translator-credits")
|
||||||
|
{
|
||||||
std::vector<irr::core::stringw> translator =
|
std::vector<irr::core::stringw> translator =
|
||||||
StringUtils::split(_("translator-credits"), '\n');
|
StringUtils::split(translators_credits, '\n');
|
||||||
m_sections.push_back( new CreditsSection("Launchpad translations"));
|
|
||||||
|
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 + 4)
|
||||||
{
|
{
|
||||||
line = stringw("Translations");
|
line = stringw(translations->getCurrentLanguageName().c_str());
|
||||||
CreditsEntry entry(line);
|
CreditsEntry entry(line);
|
||||||
getCurrentSection()->addEntry( entry );
|
getCurrentSection()->addEntry( entry );
|
||||||
|
|
||||||
for(unsigned int j = 0; i + j < translator.size() && j < 4; j ++)
|
for(unsigned int j = 0; i + j < translator.size() && j < 6; j ++)
|
||||||
{
|
{
|
||||||
getCurrentSection()->addSubEntry(translator[i + j]);
|
getCurrentSection()->addSubEntry(translator[i + j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(m_sections.size() > 0);
|
assert(m_sections.size() > 0);
|
||||||
|
|
||||||
|
// FIXME for testing only
|
||||||
|
m_sections.swap( m_sections.size() - 1, 0 );
|
||||||
|
|
||||||
|
// translations should be just before the last screen
|
||||||
|
//m_sections.swap( m_sections.size() - 1, m_sections.size() - 2 );
|
||||||
|
}
|
||||||
|
|
||||||
} // loadedFromFile
|
} // loadedFromFile
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -223,6 +223,8 @@ Translations::Translations() //: m_dictionary_manager("UTF-16")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_current_language_name = l.get_name();
|
||||||
|
|
||||||
if (!l)
|
if (!l)
|
||||||
{
|
{
|
||||||
m_dictionary = m_dictionary_manager.get_dictionary();
|
m_dictionary = m_dictionary_manager.get_dictionary();
|
||||||
@ -233,12 +235,16 @@ Translations::Translations() //: m_dictionary_manager("UTF-16")
|
|||||||
std::cout << "[translate] Env var LANGUAGE = '" << language
|
std::cout << "[translate] Env var LANGUAGE = '" << language
|
||||||
<< "', which corresponds to '"
|
<< "', which corresponds to '"
|
||||||
<< Language::from_env(language).get_name() << "'\n";
|
<< Language::from_env(language).get_name() << "'\n";
|
||||||
|
|
||||||
|
m_current_language_name = Language::from_env(language).get_name() ;
|
||||||
|
|
||||||
m_dictionary = m_dictionary_manager.get_dictionary(
|
m_dictionary = m_dictionary_manager.get_dictionary(
|
||||||
Language::from_env(language) );
|
Language::from_env(language) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
m_current_language_name = "Default language";
|
||||||
m_dictionary = m_dictionary_manager.get_dictionary();
|
m_dictionary = m_dictionary_manager.get_dictionary();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,3 +410,9 @@ bool Translations::isRTLLanguage() const
|
|||||||
return m_rtl;
|
return m_rtl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string Translations::getCurrentLanguageName()
|
||||||
|
{
|
||||||
|
return m_current_language_name;
|
||||||
|
//return m_dictionary_manager.get_language().get_name();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,8 @@ private:
|
|||||||
irr::core::stringw m_converted_string;
|
irr::core::stringw m_converted_string;
|
||||||
bool m_rtl;
|
bool m_rtl;
|
||||||
|
|
||||||
|
std::string m_current_language_name;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Translations();
|
Translations();
|
||||||
|
|
||||||
@ -57,6 +59,8 @@ public:
|
|||||||
const wchar_t* fribidize(const irr::core::stringw &str) { return fribidize(str.c_str()); }
|
const wchar_t* fribidize(const irr::core::stringw &str) { return fribidize(str.c_str()); }
|
||||||
|
|
||||||
const std::vector<std::string>* getLanguageList() const;
|
const std::vector<std::string>* getLanguageList() const;
|
||||||
|
|
||||||
|
std::string getCurrentLanguageName();
|
||||||
}; // Translations
|
}; // Translations
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user