[rkward-cvs] SF.net SVN: rkward: [2110] branches/KDE4_port
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Mon Oct 22 23:32:27 UTC 2007
Revision: 2110
http://rkward.svn.sourceforge.net/rkward/?rev=2110&view=rev
Author: tfry
Date: 2007-10-22 16:32:27 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
Start porting i18n calls with placeholders
Modified Paths:
--------------
branches/KDE4_port/TODO_KDE4
branches/KDE4_port/rkward/robjectbrowser.cpp
branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp
branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h
branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp
branches/KDE4_port/rkward/windows/rkhtmlwindow.cpp
branches/KDE4_port/rkward/windows/rkwindowcatcher.cpp
branches/KDE4_port/rkward/windows/rkworkplace.cpp
Modified: branches/KDE4_port/TODO_KDE4
===================================================================
--- branches/KDE4_port/TODO_KDE4 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/TODO_KDE4 2007-10-22 23:32:27 UTC (rev 2110)
@@ -26,7 +26,7 @@
- grep sources for "KDE4"
- remove all the passing around of KGlobal::config() as a parameter
- the whole idea of having a single mutex for everything is flawed. We should use several specialized ones
- - all i18n with arguments calls need fixing (grep for all i18n with '%')
+ - all i18n with arguments calls need fixing (grep for "i18n.*%.*\.arg")
rkcommandeditorwindow
- polish code completion (e.g. hide window, when there are no completions)
Modified: branches/KDE4_port/rkward/robjectbrowser.cpp
===================================================================
--- branches/KDE4_port/rkward/robjectbrowser.cpp 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/robjectbrowser.cpp 2007-10-22 23:32:27 UTC (rev 2110)
@@ -176,7 +176,7 @@
if (ok) {
QString valid = RObjectList::getGlobalEnv ()->validizeName (name);
- if (valid != name) KMessageBox::sorry (this, i18n ("The name you specified was already in use or not valid. Renamed to %1").arg (valid), i18n ("Invalid Name"));
+ if (valid != name) KMessageBox::sorry (this, i18n ("The name you specified was already in use or not valid. Renamed to %1", valid), i18n ("Invalid Name"));
RKGlobals::rInterface ()->issueCommand (RObject::rQuote (valid) + " <- " + object->getFullName (), RCommand::App | RCommand::ObjectListUpdate);
}
}
@@ -188,7 +188,7 @@
QString name = object->getShortName ();
QString valid = RObjectList::getGlobalEnv ()->validizeName (name);
- if (valid != name) KMessageBox::sorry (this, i18n ("An object named '%1' already exists in the GlobalEnv. Created the copy as '%2' instead.").arg (name).arg (valid), i18n ("Name already in use"));
+ if (valid != name) KMessageBox::sorry (this, i18n ("An object named '%1' already exists in the GlobalEnv. Created the copy as '%2' instead.", name, valid), i18n ("Name already in use"));
RKGlobals::rInterface ()->issueCommand (RObject::rQuote (valid) + " <- " + object->getFullName (), RCommand::App | RCommand::ObjectListUpdate);
}
@@ -210,7 +210,7 @@
if (ok) {
QString valid = list_view->menuObject ()->getContainer ()->validizeName (name);
- if (valid != name) KMessageBox::sorry (this, i18n ("The name you specified was already in use or not valid. Renamed to %1").arg (valid), i18n ("Invalid Name"));
+ if (valid != name) KMessageBox::sorry (this, i18n ("The name you specified was already in use or not valid. Renamed to %1", valid), i18n ("Invalid Name"));
RKGlobals::tracker ()->renameObject (list_view->menuObject (), valid);
}
}
Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindow.cpp 2007-10-22 23:32:27 UTC (rev 2110)
@@ -526,8 +526,7 @@
int row = index.row ();
if (index.parent ().isValid ()) return QVariant ();
- if (row > list.count ()) return QVariant ();
-// if (column > 1) return QVariant;
+ if (row >= list.count ()) return QVariant ();
RObject* object = list[row];
RK_ASSERT (object);
Modified: branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h
===================================================================
--- branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/windows/rkcommandeditorwindow.h 2007-10-22 23:32:27 UTC (rev 2110)
@@ -78,7 +78,6 @@
~RKCodeCompletionModel ();
void completionInvoked (KTextEditor::View *view, const KTextEditor::Range &range, InvocationType);
void executeCompletionItem (KTextEditor::Document *document, const KTextEditor::Range &word, int row) const;
-// int columnCount (const QModelIndex &parent=QModelIndex()) const;
QVariant data (const QModelIndex& index, int role=Qt::DisplayRole) const;
private:
QList<RObject*> list;
Modified: branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/windows/rkhelpsearchwindow.cpp 2007-10-22 23:32:27 UTC (rev 2110)
@@ -214,7 +214,7 @@
RKWardMainWindow::getMain ()->openHTML (url);
return;
} else {
- KMessageBox::sorry (this, i18n ("No help found on '%1'. Maybe the corresponding package is not installed/loaded, or maybe you mistyped the command. Try using Help->Search R Help for more options.").arg (command->command ().section ("\"", 1, 1)), i18n ("No help found"));
+ KMessageBox::sorry (this, i18n ("No help found on '%1'. Maybe the corresponding package is not installed/loaded, or maybe you mistyped the command. Try using Help->Search R Help for more options.", command->command ().section ("\"", 1, 1)), i18n ("No help found"));
}
} else if (command->getFlags () == GET_INSTALLED_PACKAGES) {
RK_ASSERT (command->getDataType () == RData::StringVector);
Modified: branches/KDE4_port/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkhtmlwindow.cpp 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/windows/rkhtmlwindow.cpp 2007-10-22 23:32:27 UTC (rev 2110)
@@ -171,7 +171,7 @@
// asyncrhonously dealing with non-local files would be quite a task. We chose the simple answer instead...
if (!url.isLocalFile ()) {
- if (KMessageBox::questionYesNo (this, i18n ("The url you are trying to open ('%1') is not a local file. Do you want to open the url in the default application?").arg (url.prettyUrl ()), i18n ("Open in default application?")) != KMessageBox::Yes) {
+ if (KMessageBox::questionYesNo (this, i18n ("The url you are trying to open ('%1') is not a local file. Do you want to open the url in the default application?", url.prettyUrl ()), i18n ("Open in default application?")) != KMessageBox::Yes) {
return false;
}
KRun *runner = new KRun (url, topLevelWidget()); // according to KRun-documentation, KRun will self-destruct when done.
@@ -660,7 +660,7 @@
RKComponentHandle *chandle = componentPathToHandle (url.path ());
if (chandle) text = chandle->getLabel ();
} else if (url.host () == "rhelp") {
- text = i18n ("R Reference on '%1'").arg (url.path ().mid (1));
+ text = i18n ("R Reference on '%1'", url.path ().mid (1));
} else if (url.host () == "page") {
QString help_base_dir = RKCommonFunctions::getRKWardDataDir () + "pages/";
Modified: branches/KDE4_port/rkward/windows/rkwindowcatcher.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkwindowcatcher.cpp 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/windows/rkwindowcatcher.cpp 2007-10-22 23:32:27 UTC (rev 2110)
@@ -227,19 +227,19 @@
void RKCaughtX11Window::activateDevice () {
RK_TRACE (MISC);
- RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ')', RCommand::App, i18n ("Activate graphics device number %1").arg (QString::number (device_number)), error_dialog);
+ RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ')', RCommand::App, i18n ("Activate graphics device number %1", device_number), error_dialog);
}
void RKCaughtX11Window::copyDeviceToOutput () {
RK_TRACE (MISC);
- RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.copy (device=rk.graph.on)\nrk.graph.off ()", RCommand::App | RCommand::DirectToOutput, i18n ("Copy contents of graphics device number %1 to output").arg (QString::number (device_number)), error_dialog);
+ RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.copy (device=rk.graph.on)\nrk.graph.off ()", RCommand::App | RCommand::DirectToOutput, i18n ("Copy contents of graphics device number %1 to output", device_number), error_dialog);
}
void RKCaughtX11Window::printDevice () {
RK_TRACE (MISC);
- RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.print ()", RCommand::App, i18n ("Print contents of graphics device number %1").arg (QString::number (device_number)), error_dialog);
+ RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.print ()", RCommand::App, i18n ("Print contents of graphics device number %1", device_number), error_dialog);
}
void RKCaughtX11Window::copyDeviceToRObject () {
@@ -264,7 +264,7 @@
QString name = chooser->validizedSelectedObjectName ();
- RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\n" + RObject::rQuote (name) + " <- recordPlot ()", RCommand::App | RCommand::ObjectListUpdate, i18n ("Save contents of graphics device number %1 to object '%2'").arg (QString::number (device_number)).arg (name), error_dialog);
+ RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\n" + RObject::rQuote (name) + " <- recordPlot ()", RCommand::App | RCommand::ObjectListUpdate, i18n ("Save contents of graphics device number %1 to object '%2'", device_number, name), error_dialog);
}
delete dialog;
@@ -273,7 +273,7 @@
void RKCaughtX11Window::duplicateDevice () {
RK_TRACE (MISC);
- RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.copy (device=x11)", RCommand::App, i18n ("Duplicate graphics device number %1").arg (QString::number (device_number)), error_dialog);
+ RKGlobals::rInterface ()->issueCommand ("dev.set (" + QString::number (device_number) + ")\ndev.copy (device=x11)", RCommand::App, i18n ("Duplicate graphics device number %1", device_number), error_dialog);
}
Modified: branches/KDE4_port/rkward/windows/rkworkplace.cpp
===================================================================
--- branches/KDE4_port/rkward/windows/rkworkplace.cpp 2007-10-22 23:03:27 UTC (rev 2109)
+++ branches/KDE4_port/rkward/windows/rkworkplace.cpp 2007-10-22 23:32:27 UTC (rev 2110)
@@ -188,7 +188,7 @@
if (!url.isEmpty ()) {
if (!editor->openURL (url, use_r_highlighting, read_only)) {
delete editor;
- KMessageBox::messageBox (view (), KMessageBox::Error, i18n ("Unable to open \"%1\"").arg (url.prettyUrl ()), i18n ("Could not open command file"));
+ KMessageBox::messageBox (view (), KMessageBox::Error, i18n ("Unable to open \"%1\"", url.prettyUrl ()), i18n ("Could not open command file"));
return false;
}
}
@@ -300,7 +300,7 @@
size *= iobj->getDimension (i);
}
if ((RKSettingsModuleGeneral::warnLargeObjectThreshold () != 0) && (size > RKSettingsModuleGeneral::warnLargeObjectThreshold ())) {
- if (KMessageBox::warningContinueCancel (view (), i18n ("You are about to edit object \"%1\", which is very large (%2 fields). RKWard is not optimized to handle very large objects in the built in data editor. This will use a lot of memory, and - depending on your system - might be very slow. For large objects it is generally recommended to edit using command line means or to split into smaller chunks before editing. On the other hand, if you have enough memory, or the data is simple enough (numeric data is easier to handle, than factor), editing may not be a problem at all. You can configure this warning (or turn it off entirely) under Settings->Configure RKWard->General.\nReally edit object?").arg (iobj->getFullName ()).arg (QString::number (size)), i18n ("About to edit very large object")) != KMessageBox::Continue) {
+ if (KMessageBox::warningContinueCancel (view (), i18n ("You are about to edit object \"%1\", which is very large (%2 fields). RKWard is not optimized to handle very large objects in the built in data editor. This will use a lot of memory, and - depending on your system - might be very slow. For large objects it is generally recommended to edit using command line means or to split into smaller chunks before editing. On the other hand, if you have enough memory, or the data is simple enough (numeric data is easier to handle, than factor), editing may not be a problem at all. You can configure this warning (or turn it off entirely) under Settings->Configure RKWard->General.\nReally edit object?", iobj->getFullName (), size), i18n ("About to edit very large object")) != KMessageBox::Continue) {
return 0;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the rkward-tracker
mailing list