r17929 by jghali - fix language detection for Portuguese spell dictionary
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 1 23:51:59 UTC 2012
Author: jghali
Date: Sat Dec 1 23:51:59 2012
New Revision: 17929
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17929
Log:
fix language detection for Portuguese spell dictionary
Modified:
trunk/Scribus/scribus/langmgr.cpp
Modified: trunk/Scribus/scribus/langmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17929&path=/trunk/Scribus/scribus/langmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/langmgr.cpp (original)
+++ trunk/Scribus/scribus/langmgr.cpp Sat Dec 1 23:51:59 2012
@@ -134,7 +134,7 @@
langTable.append(LangDef("nn", "nn_NO", "Norwegian (Nnyorsk)", QObject::tr( "Norwegian (Nnyorsk)" )) );
langTable.append(LangDef("no", "no_NO", "Norwegian", QObject::tr( "Norwegian" )) );
langTable.append(LangDef("pl", "pl_PL", "Polish", QObject::tr( "Polish" )) );
- langTable.append(LangDef("pt", "", "Portuguese", QObject::tr( "Portuguese" )) );
+ langTable.append(LangDef("pt", "pt_PT", "Portuguese", QObject::tr( "Portuguese" )) );
langTable.append(LangDef("pt_BR", "", "Portuguese (BR)", QObject::tr( "Portuguese (BR)" )) );
langTable.append(LangDef("ro", "", "Romanian", QObject::tr( "Romanian" )) );
langTable.append(LangDef("ru", "ru_RU", "Russian", QObject::tr( "Russian" )) );
@@ -323,20 +323,20 @@
const QString LanguageManager::getShortAbbrevFromAbbrev(QString langAbbrev)
{
// qDebug()<<"Trying to find:"<<langAbbrev;
- int i=langTableIndex(langAbbrev);
+ int i = langTableIndex(langAbbrev);
// qDebug()<<"Index of"<<langAbbrev<<":"<<i;
- if (i==-1)
- {
- if (langAbbrev.length()>5)
- {
- langAbbrev.truncate(5);
- i=langTableIndex(langAbbrev);
- }
- }
- if (i!=-1)
- return langTable[i].m_priAbbrev;
- //qDebug()<<langAbbrev<<"not found";
- return "";
+ if (i == -1)
+ {
+ if (langAbbrev.length()>5)
+ {
+ langAbbrev.truncate(5);
+ i=langTableIndex(langAbbrev);
+ }
+ }
+ if (i != -1)
+ return langTable[i].m_priAbbrev;
+ //qDebug()<<langAbbrev<<"not found";
+ return "";
}
const QString LanguageManager::getAlternativeAbbrevfromAbbrev(QString langAbbrev)
More information about the scribus-commit
mailing list