[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: Untranslated strings in kcmkonsole
From: Stefan =?iso-8859-1?q?Asserh=E4ll?= <stefan.asserhall () telia ! com>
Date: 2002-07-07 22:22:27
[Download RAW message or body]
Hello,
I'm hunting down untranslated strings in KDE applications, and I found
two such cases in kcmkonsole, namely the lists of schemas and keytabs.
Here is a patch.
OK to commit to CVS?
I'm not subscribed to the list, so please CC me.
/ Stefan Asserhäll
["kcmkonsole.diff" (text/x-diff)]
Index: schemaeditor.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/konsole/schemaeditor.cpp,v
retrieving revision 1.20
diff -u -3 -p -r1.20 schemaeditor.cpp
--- schemaeditor.cpp 23 Jun 2002 14:26:55 -0000 1.20
+++ schemaeditor.cpp 7 Jul 2002 21:48:15 -0000
@@ -78,6 +78,8 @@ SchemaEditor::SchemaEditor(QWidget * par
transparencyCheck->setChecked(false);
+ KGlobal::locale()->insertCatalogue("konsole"); // For schema translations
+
loadAllSchema();
connect(imageBrowse, SIGNAL(clicked()), this, SLOT(imageSelect()));
@@ -410,7 +412,7 @@ void SchemaEditor::schemaModified(const
QString SchemaEditor::readSchemaTitle(const QString & file)
{
/*
- Code taken from konsole/src/schema.C
+ Code taken from konsole/konsole/schema.cpp
*/
@@ -433,7 +435,7 @@ QString SchemaEditor::readSchemaTitle(co
if (strlen(line) > 5)
if (!strncmp(line, "title", 5)) {
fclose(sysin);
- return line + 6;
+ return i18n(line + 6);
}
return 0;
@@ -456,7 +458,7 @@ void SchemaEditor::querySave()
void SchemaEditor::readSchema(int num)
{
/*
- Code taken from konsole/src/schema.C
+ Code taken from konsole/konsole/schema.cpp
*/
@@ -513,7 +515,7 @@ void SchemaEditor::readSchema(int num)
if (strlen(line) > 5) {
if (!strncmp(line, "title", 5)) {
- titleLine->setText(line + 6);
+ titleLine->setText(i18n(line + 6));
}
@@ -547,7 +549,7 @@ void SchemaEditor::readSchema(int num)
continue;
transparencyCheck->setChecked(true);
- shadeSlide->setValue(100 - rx * 100);
+ shadeSlide->setValue((int)(100 - rx * 100));
shadeColor->setColor(QColor(rr, rg, rb));
}
Index: sessioneditor.cpp
===================================================================
RCS file: /home/kde/kdebase/kcontrol/konsole/sessioneditor.cpp,v
retrieving revision 1.10
diff -u -3 -p -r1.10 sessioneditor.cpp
--- sessioneditor.cpp 23 Jun 2002 18:37:48 -0000 1.10
+++ sessioneditor.cpp 7 Jul 2002 21:48:15 -0000
@@ -40,6 +40,8 @@ SessionEditor::SessionEditor(QWidget * p
sesMod=false;
oldSession=-1;
+ KGlobal::locale()->insertCatalogue("konsole"); // For schema and keytab translations
+
loadAllKeytab();
loadAllSchema();
loadAllSession();
@@ -114,13 +116,18 @@ QString SessionEditor::readKeymapTitle(c
return 0;
char line[100];
+ int len;
while (fscanf(sysin, "%80[^\n]\n", line) > 0)
- if (strlen(line) > 8)
+ if ((len = strlen(line)) > 8)
if (!strncmp(line, "keyboard", 8)) {
fclose(sysin);
- QString temp=line+9;
- if(temp.at(0)=='\"') temp.remove(0,1);
- if(temp.at(temp.length()-1)=='\"') temp.remove(temp.length()-1,1);
+ if(line[len-1] == '"')
+ line[len-1] = '\000';
+ QString temp;
+ if(line[9] == '"')
+ temp=i18n(line+10);
+ else
+ temp=i18n(line+9);
return temp;
}
@@ -176,7 +183,7 @@ QString SessionEditor::readSchemaTitle(c
if (strlen(line) > 5)
if (!strncmp(line, "title", 5)) {
fclose(sysin);
- return line + 6;
+ return i18n(line + 6);
}
return 0;
@@ -240,7 +247,7 @@ void SessionEditor::readSession(int num)
str = co->readEntry("Icon","openterm");
previewIcon->setIcon(str);
- i = co->readUnsignedNumEntry("Font",-1);
+ i = co->readUnsignedNumEntry("Font",(unsigned int)-1);
fontCombo->setCurrentItem(i+1);
str = co->readEntry("Term","xterm");
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic