[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: add kio8-r and koi8-u to kspell
From: Wolfram Diestel <wolfram () steloj ! de>
Date: 2001-01-30 8:50:39
[Download RAW message or body]
Andy Rysin asked to add encodings KOI8-U and KOI8-R to
kspell for spelling russian and ukrainian texts before
release of KDE 2.1. Is it ok to add this? I tried it,
and it worked for me. For the translators there will be
two new strings in kdelibs.
Index: ksconfig.cpp
===================================================================
RCS file: /home/kde/kdelibs/kspell/ksconfig.cpp,v
retrieving revision 1.50
diff -u -3 -p -u -r1.50 ksconfig.cpp
--- ksconfig.cpp 2001/01/23 08:29:07 1.50
+++ ksconfig.cpp 2001/01/30 08:45:31
@@ -116,6 +116,9 @@ KSpellConfig::KSpellConfig( QWidget *par
encodingcombo->insertItem ("ISO 8859-9");
encodingcombo->insertItem ("ISO 8859-15");
encodingcombo->insertItem ("UTF-8");
+ encodingcombo->insertItem ("KOI8-R");
+ encodingcombo->insertItem ("KOI8-U");
+
connect (encodingcombo, SIGNAL (activated(int)), this,
SLOT (sChangeEncoding(int)));
glay->addMultiCellWidget (encodingcombo, 3, 3, 1, 2);
@@ -223,6 +226,9 @@ KSpellConfig::interpret (QString &fname,
else if (fname=="espa~nol" || fname=="espanol") {
lname="es"; hname=i18n("Spanish");
}
+ else if (fname=="dansk") {
+ lname="da"; hname=i18n("Danish");
+ }
else if (fname=="deutsch") {
lname="de"; hname=i18n("German");
}
@@ -258,6 +264,9 @@ KSpellConfig::interpret (QString &fname,
}
else if (fname=="swiss") {
lname="de"; hname=i18n("Swiss German");
+ }
+ else if (fname=="ukrainian") {
+ lname="uk"; hname=i18n("Ukrainian");
}
else {
lname=""; hname=i18n("Unknown");
Index: ksconfig.h
===================================================================
RCS file: /home/kde/kdelibs/kspell/ksconfig.h,v
retrieving revision 1.28
diff -u -3 -p -u -r1.28 ksconfig.h
--- ksconfig.h 2000/11/08 09:38:49 1.28
+++ ksconfig.h 2001/01/30 08:45:31
@@ -40,7 +40,9 @@ enum Encoding {
KS_E_LATIN8=7,
KS_E_LATIN9=8,
KS_E_LATIN15=9,
- KS_E_UTF8=10
+ KS_E_UTF8=10,
+ KS_E_KOI8R=11,
+ KS_E_KOI8U=12
};
enum KSpellClients {
Index: kspell.cpp
===================================================================
RCS file: /home/kde/kdelibs/kspell/kspell.cpp,v
retrieving revision 1.68
diff -u -3 -p -u -r1.68 kspell.cpp
--- kspell.cpp 2001/01/29 16:51:58 1.68
+++ kspell.cpp 2001/01/30 08:45:33
@@ -132,6 +132,12 @@ KSpell::KSpell (QWidget *_parent, QStrin
case KS_E_UTF8:
codec = QTextCodec::codecForName("UTF-8");
break;
+ case KS_E_KOI8R:
+ codec = QTextCodec::codecForName("KOI8-R");
+ break;
+ case KS_E_KOI8U:
+ codec = QTextCodec::codecForName("KOI8-U");
+ break;
default:
break;
}
@@ -251,7 +257,14 @@ KSpell::startIspell()
case KS_E_UTF8:
*proc << "-Tutf8";
break;
+
+ case KS_E_KOI8U:
+ *proc << "-w\'"; // add ' as a word char
+ break;
+
}
+
+
/*
--
Wolfram Diestel <wolfram@steloj.de> http://www.steloj.de/
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic