StelTranslator.cpp   StelTranslator.cpp 
skipping to change at line 148 skipping to change at line 148
#else #else
setlocale(LC_CTYPE,""); setlocale(LC_CTYPE,"");
#endif #endif
QString result = bind_textdomain_codeset(domain.toUtf8().constData() , "UTF-8"); QString result = bind_textdomain_codeset(domain.toUtf8().constData() , "UTF-8");
Q_ASSERT(result=="UTF-8"); Q_ASSERT(result=="UTF-8");
bindtextdomain (domain.toUtf8().constData(), QFile::encodeName(moDir ectory).constData()); bindtextdomain (domain.toUtf8().constData(), QFile::encodeName(moDir ectory).constData());
textdomain (domain.toUtf8().constData()); textdomain (domain.toUtf8().constData());
StelTranslator::lastUsed = this; StelTranslator::lastUsed = this;
} }
//! Convert from ISO639-1 2 letters langage code to native language name //! Convert from ISO639-1 2(+3) letters langage code to native language nam e
QString StelTranslator::iso639_1CodeToNativeName(const QString& languageCod e) QString StelTranslator::iso639_1CodeToNativeName(const QString& languageCod e)
{ {
if (languageCode=="C") if (languageCode=="C")
return "English"; return "English";
QLocale loc(languageCode); //QLocale loc(languageCode);
QString l = loc.name(); //QString l = loc.name();
// There is a QLocale for this code. This should be the case for mo st // There is a QLocale for this code. This should be the case for mo st
// language codes, but there are a few without QLocales, e.g. Interl ingua // language codes, but there are a few without QLocales, e.g. Interl ingua
if (l.contains('_')) //if (l.contains('_'))
l.truncate(l.indexOf('_')); // l.truncate(l.indexOf('_'));
if (iso639codes.find(l)!=iso639codes.end()) //if (iso639codes.find(l)!=iso639codes.end())
return iso639codes[l]+ (languageCode.size()==2 ? "" : QStrin // return iso639codes[l]+ (languageCode.size()==2 ? "" : QStrin
g(" (")+QLocale::countryToString(loc.country())+")"); g(" (")+QLocale::countryToString(loc.country())+")");
// For codes which return the locale C, use the language code to do the lookup // For codes which return the locale C, use the language code to do the lookup
if (iso639codes.contains(languageCode)) if (iso639codes.contains(languageCode))
return iso639codes[languageCode]; return iso639codes[languageCode];
// qWarning() << "WARNING: Cannot determine name of language for cod e" << languageCode; // qWarning() << "WARNING: Cannot determine name of language for cod e" << languageCode;
return languageCode; return languageCode;
} }
//! Convert from native language name to ISO639-1 2(+3) letters langage cod e //! Convert from native language name to ISO639-1 2(+3) letters langage cod e
 End of changes. 3 change blocks. 
8 lines changed or deleted 8 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/