[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE_3_3_BRANCH: kdelibs/kdeui
From: Heiko Evermann <heiko () evermann ! de>
Date: 2004-11-11 22:49:19
Message-ID: 20041111224919.F27A416B58 () office ! kde ! org
[Download RAW message or body]
CVS commit by evermann:
Changes for aspell-0.6: process 3-letter ISO-codes and unclutter the language list. \
This solves the most annoying problems from bug 89830.
M +16 -2 ksconfig.cpp 1.84.2.1
--- kdelibs/kdeui/ksconfig.cpp #1.84:1.84.2.1
@@ -266,6 +266,7 @@ KSpellConfig::interpret( QString &fname,
}
- // Aspell uses 2 alpha language codes or 2 alpha language + 2 alpha country
- if ( dname.length() == 2 ) {
+ // Aspell uses 2 alpha language codes or 2 alpha language + 2 alpha country,
+ // but since aspell 0.6 also 3-character ISO-codes can be used
+ if ( (dname.length() == 2) || (dname.length() == 3) ) {
lname = dname;
hname = KGlobal::locale()->twoAlphaToLanguageName( lname );
@@ -520,4 +521,15 @@ void KSpellConfig::getAvailDictsAspell (
// FIXME: may be this is wrong an the list should contain
// all *.multi files too, to allow using special dictionaries
+
+ // Well, KSpell2 has a better way to do this, but this code has to be
+ // cleaned up somehow: since aspell 0.6 we have quite a lot of files in the
+ // aspell dictionary that are not dictionaries. These must not be presented as \
"languages" + // We only keep
+ // *.rws: dictionary
+ // *.multi: definition file to load several subdictionaries
+ if ( !( fname.endsWith(".rws") || fname.endsWith(".multi") ) ) {
+ // remove noise from the language list
+ continue;
+ }
if (fname[0] != '.')
{
@@ -525,4 +537,6 @@ void KSpellConfig::getAvailDictsAspell (
// remove .multi
if (fname.endsWith(".multi")) fname.remove (fname.length()-6,6);
+ // remove .rws
+ if (fname.endsWith(".rws")) fname.remove (fname.length()-4,4);
if (interpret (fname, lname, hname) && langfnames[0].isEmpty())
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic