[rkward-cvs] [rkward] rkward: i18n fixes

Pino Toscano pino at kde.org
Fri Nov 21 08:56:24 UTC 2014


Git commit 067112f41b805b17a955e6f68b833bfdbddfb111 by Pino Toscano.
Committed on 21/11/2014 at 08:54.
Pushed by pino into branch 'master'.

i18n fixes

- spell "PostScript" correctly
- fix few string puzzles
- pass arguments directly to i18n()
- remove workaround for not translating names of people in credits
  (some languages may want them translitterated, for example)
- remove string contractions ("you're" -> "you are", etc)
- remove extra exclamation marks
- style fixes

M  +1    -1    rkward/agents/rkloadagent.cpp
M  +1    -1    rkward/agents/rkprintagent.cpp
M  +1    -1    rkward/dataeditor/twintable.cpp
M  +1    -1    rkward/dialogs/rkimportdialog.cpp
M  +1    -1    rkward/dialogs/rkloadlibsdialog.cpp
M  +17   -17   rkward/main.cpp
M  +1    -1    rkward/misc/rkprogresscontrol.cpp
M  +3    -3    rkward/misc/rkspecialactions.cpp
M  +1    -1    rkward/misc/xmlhelper.cpp
M  +2    -2    rkward/plugin/rkcomponentmeta.cpp
M  +3    -3    rkward/plugin/rkoptionset.cpp
M  +1    -1    rkward/rkward.cpp
M  +1    -1    rkward/robjectviewer.cpp

http://commits.kde.org/rkward/067112f41b805b17a955e6f68b833bfdbddfb111

diff --git a/rkward/agents/rkloadagent.cpp b/rkward/agents/rkloadagent.cpp
index bf5a77f..66f377a 100644
--- a/rkward/agents/rkloadagent.cpp
+++ b/rkward/agents/rkloadagent.cpp
@@ -36,7 +36,7 @@
 
 RKLoadAgent::RKLoadAgent (const KUrl &url, bool merge) {
 	RK_TRACE (APP);
-	RKWardMainWindow::getMain ()->slotSetStatusBarText (i18n ("Loading Workspace ..."));
+	RKWardMainWindow::getMain ()->slotSetStatusBarText (i18n ("Loading Workspace..."));
 
 	QString filename;
 	if (!url.isLocalFile ()) {
diff --git a/rkward/agents/rkprintagent.cpp b/rkward/agents/rkprintagent.cpp
index fd2307c..b74cd57 100644
--- a/rkward/agents/rkprintagent.cpp
+++ b/rkward/agents/rkprintagent.cpp
@@ -69,7 +69,7 @@ void RKPrintAgent::printPostscript (const QString &file, bool delete_file) {
 
 	if (!provider) {
 		RK_DEBUG (APP, DL_WARNING, "No valid postscript postscript provider was found");
-		KMessageBox::sorry (RKWardMainWindow::getMain (), i18n ("No service was found to provide a KDE print dialog for postscript files. We will try to open a generic postscript viewer (if any), instead.<br><br>Consider installing 'okular', or configure RKWard not to attempt to print using a KDE print dialog."), i18n ("Unable to open KDE print dialog"));
+		KMessageBox::sorry (RKWardMainWindow::getMain (), i18n ("No service was found to provide a KDE print dialog for PostScript files. We will try to open a generic PostScript viewer (if any), instead.<br><br>Consider installing 'okular', or configure RKWard not to attempt to print using a KDE print dialog."), i18n ("Unable to open KDE print dialog"));
 		// fallback: If we can't find a proper part, try to invoke a standalone PS reader, instead
 		KRun::runUrl (KUrl::fromLocalFile (file), "appication/postscript", RKWardMainWindow::getMain ());
 		return;
diff --git a/rkward/dataeditor/twintable.cpp b/rkward/dataeditor/twintable.cpp
index 8f824d1..c6cd2b2 100644
--- a/rkward/dataeditor/twintable.cpp
+++ b/rkward/dataeditor/twintable.cpp
@@ -188,7 +188,7 @@ void TwinTable::objectMetaChanged (RObject* changed) {
 
 	RK_ASSERT (changed == main_object);
 	QString caption = main_object->getShortName ();
-	if (!rw) caption += i18n (" [read-only]");
+	if (!rw) caption = i18n ("%1 [read-only]", caption);
 	setCaption (caption);
 }
 
diff --git a/rkward/dialogs/rkimportdialog.cpp b/rkward/dialogs/rkimportdialog.cpp
index 146ece8..3540f98 100644
--- a/rkward/dialogs/rkimportdialog.cpp
+++ b/rkward/dialogs/rkimportdialog.cpp
@@ -32,7 +32,7 @@
 RKImportDialogFormatSelector::RKImportDialogFormatSelector () : KHBox () {
 	RK_TRACE (DIALOGS);
 
-	new QLabel (i18n ("File format: "), this);
+	new QLabel (i18n ("File format:"), this);
 	combo = new QComboBox (this);
 }
 
diff --git a/rkward/dialogs/rkloadlibsdialog.cpp b/rkward/dialogs/rkloadlibsdialog.cpp
index a737822..5f3209a 100644
--- a/rkward/dialogs/rkloadlibsdialog.cpp
+++ b/rkward/dialogs/rkloadlibsdialog.cpp
@@ -717,7 +717,7 @@ void InstallPackagesWidget::trySelectPackage (const QString &package_name) {
 
 	QModelIndex index = packages_status->markPackageForInstallation (package_name);
 	if (!index.isValid ()) {
-		KMessageBox::sorry (0, i18n ("The package requested by the backend (\"%1\") was not found in the package repositories. Maybe the package name was mis-spelled. Or maybe you need to add additional repositories via the \"Configure Repositories\"-button.", package_name), i18n ("Package not available"));
+		KMessageBox::sorry (0, i18n ("The package requested by the backend (\"%1\") was not found in the package repositories. Maybe the package name was mis-spelled. Or maybe you need to add additional repositories via the \"Configure Repositories\" button.", package_name), i18n ("Package not available"));
 	} else {
 		packages_view->scrollTo (model->mapFromSource (index));
 	}
diff --git a/rkward/main.cpp b/rkward/main.cpp
index 55216e3..6d462e4 100644
--- a/rkward/main.cpp
+++ b/rkward/main.cpp
@@ -129,24 +129,24 @@ int main(int argc, char *argv[]) {
 	options.add ("+[File]", ki18n ("R workspace file to open"), 0);
 
 	KAboutData aboutData("rkward", QByteArray (), ki18n ("RKWard"), RKWARD_VERSION, ki18n ("Frontend to the R statistics language"), KAboutData::License_GPL, ki18n ("(c) 2002, 2004 - 2014"), KLocalizedString (), "http://rkward.sf.net", "rkward-devel at lists.sourceforge.net");
-	aboutData.addAuthor (ki18n ("%1").subs ("Thomas Friedrichsmeier"), ki18n ("Project leader / main developer"));
-	aboutData.addAuthor (ki18n ("%1").subs ("Pierre Ecochard"), ki18n ("C++ developer between 2004 and 2007"));
-	aboutData.addAuthor (ki18n ("%1").subs ("Prasenjit Kapat"), ki18n ("Many plugins, suggestions, plot history feature"));
-	aboutData.addAuthor (ki18n ("%1").subs ("Meik Michalke"), ki18n ("Many plugins, suggestions, rkwarddev package"));
-	aboutData.addAuthor (ki18n ("%1").subs ("Stefan Roediger"), ki18n ("Many plugins, suggestions, marketing, translations"));
+	aboutData.addAuthor (ki18n ("Thomas Friedrichsmeier"), ki18n ("Project leader / main developer"));
+	aboutData.addAuthor (ki18n ("Pierre Ecochard"), ki18n ("C++ developer between 2004 and 2007"));
+	aboutData.addAuthor (ki18n ("Prasenjit Kapat"), ki18n ("Many plugins, suggestions, plot history feature"));
+	aboutData.addAuthor (ki18n ("Meik Michalke"), ki18n ("Many plugins, suggestions, rkwarddev package"));
+	aboutData.addAuthor (ki18n ("Stefan Roediger"), ki18n ("Many plugins, suggestions, marketing, translations"));
 	aboutData.addCredit (ki18n ("Contributors in alphabetical order"));
-	aboutData.addCredit (ki18n ("%1").subs ("Philippe Grosjean"), ki18n ("Several helpful comments and discussions"));
-	aboutData.addCredit (ki18n ("%1").subs ("Adrien d'Hardemare"), ki18n ("Plugins and patches"));
-	aboutData.addCredit (ki18n ("%1").subs ("Yves Jacolin"), ki18n ("New website"));
-	aboutData.addCredit (ki18n ("%1").subs ("Germán Márquez Mejía"), ki18n ("HP filter plugin, spanish translation"), 0);
-	aboutData.addCredit (ki18n ("%1").subs ("Marco Martin"), ki18n ("A cool icon"));
-	aboutData.addCredit (ki18n ("%1").subs ("Daniele Medri"), ki18n ("RKWard logo, many suggestions, help on wording"));
-	aboutData.addCredit (ki18n ("%1").subs ("David Sibai"), ki18n ("Several valuable comments, hints and patches"));
-	aboutData.addCredit (ki18n ("%1").subs ("Ilias Soumpasis"), ki18n ("Translation, Suggestions, plugins"));
-	aboutData.addCredit (ki18n ("%1").subs ("Ralf Tautenhahn"), ki18n ("Many comments, useful suggestions, and bug reports"));
-	aboutData.addCredit (ki18n ("%1").subs ("Jannis Vajen"), ki18n ("German Translation, bug reports"));
-	aboutData.addCredit (ki18n ("%1").subs ("Roland Vollgraf"), ki18n ("Some patches"));
-	aboutData.addCredit (ki18n ("%1").subs ("Roy Qu"), ki18n ("patches and helpful comments"));
+	aboutData.addCredit (ki18n ("Philippe Grosjean"), ki18n ("Several helpful comments and discussions"));
+	aboutData.addCredit (ki18n ("Adrien d'Hardemare"), ki18n ("Plugins and patches"));
+	aboutData.addCredit (ki18n ("Yves Jacolin"), ki18n ("New website"));
+	aboutData.addCredit (ki18n ("Germán Márquez Mejía"), ki18n ("HP filter plugin, spanish translation"), 0);
+	aboutData.addCredit (ki18n ("Marco Martin"), ki18n ("A cool icon"));
+	aboutData.addCredit (ki18n ("Daniele Medri"), ki18n ("RKWard logo, many suggestions, help on wording"));
+	aboutData.addCredit (ki18n ("David Sibai"), ki18n ("Several valuable comments, hints and patches"));
+	aboutData.addCredit (ki18n ("Ilias Soumpasis"), ki18n ("Translation, Suggestions, plugins"));
+	aboutData.addCredit (ki18n ("Ralf Tautenhahn"), ki18n ("Many comments, useful suggestions, and bug reports"));
+	aboutData.addCredit (ki18n ("Jannis Vajen"), ki18n ("German Translation, bug reports"));
+	aboutData.addCredit (ki18n ("Roland Vollgraf"), ki18n ("Some patches"));
+	aboutData.addCredit (ki18n ("Roy Qu"), ki18n ("patches and helpful comments"));
 	aboutData.addCredit (ki18n ("Many more people on rkward-devel at lists.sourceforge.net"), ki18n ("Sorry, if we forgot to list you. Please contact us to get added"));
 
 	// before initializing the commandline args, remove the ".bin" from "rkward.bin".
diff --git a/rkward/misc/rkprogresscontrol.cpp b/rkward/misc/rkprogresscontrol.cpp
index 697b47b..71f890b 100644
--- a/rkward/misc/rkprogresscontrol.cpp
+++ b/rkward/misc/rkprogresscontrol.cpp
@@ -216,7 +216,7 @@ RKProgressControlDialog::RKProgressControlDialog (const QString &text, const QSt
 	QLabel *label = new QLabel (text, vbox);
 	label->setWordWrap (true);
 
-	error_indicator = new QLabel (i18n ("<b>There have been errors and / or warnings! See below for a transcript</b>"), vbox);
+	error_indicator = new QLabel (i18n ("<b>There have been errors and / or warnings. See below for a transcript</b>"), vbox);
 	QPalette palette = error_indicator->palette ();
 	palette.setColor (error_indicator->foregroundRole (), QColor (255, 0, 0));
 	error_indicator->setPalette (palette);
diff --git a/rkward/misc/rkspecialactions.cpp b/rkward/misc/rkspecialactions.cpp
index d9567ae..ab799db 100644
--- a/rkward/misc/rkspecialactions.cpp
+++ b/rkward/misc/rkspecialactions.cpp
@@ -63,7 +63,7 @@ void RKPasteSpecialAction::doSpecialPaste () {
 RKPasteSpecialDialog::RKPasteSpecialDialog (QWidget* parent) : KDialog (parent) {
 	RK_TRACE (MISC);
 
-	setCaption (i18n ("Paste special..."));
+	setCaption (i18n ("Paste Special..."));
 	setButtons (KDialog::Ok | KDialog::Cancel);
 
 	KVBox* page = new KVBox (this);
@@ -76,7 +76,7 @@ RKPasteSpecialDialog::RKPasteSpecialDialog (QWidget* parent) : KDialog (parent)
 	QRadioButton* rbutton;
 
 	// Mode box
-	box = new QGroupBox (i18n ("Paste mode"), row);
+	box = new QGroupBox (i18n ("Paste Mode"), row);
 	group_layout = new QVBoxLayout (box);
 	dimensionality_group = new QButtonGroup (box);
 	rbutton = new QRadioButton (i18n ("Single string"), box);
@@ -94,7 +94,7 @@ RKPasteSpecialDialog::RKPasteSpecialDialog (QWidget* parent) : KDialog (parent)
 	const QMimeData* clipdata = QApplication::clipboard ()->mimeData ();
 
 	// Separator box
-	box = new QGroupBox (i18n ("Field separator"), row);
+	box = new QGroupBox (i18n ("Field Separator"), row);
 	group_layout = new QVBoxLayout (box);
 	separator_group = new QButtonGroup (box);
 	rbutton = new QRadioButton (i18n ("Tab"), box);
diff --git a/rkward/misc/xmlhelper.cpp b/rkward/misc/xmlhelper.cpp
index 1e2565d..61d606b 100644
--- a/rkward/misc/xmlhelper.cpp
+++ b/rkward/misc/xmlhelper.cpp
@@ -48,7 +48,7 @@ QDomElement XMLHelper::openXMLFile (int debug_level, bool with_includes, bool wi
 	QDomDocument doc;
 
 	QFile f (filename);
-	if (!f.open (QIODevice::ReadOnly)) displayError (0, i18n("Could not open file %1 for reading").arg (filename), debug_level, DL_ERROR);
+	if (!f.open (QIODevice::ReadOnly)) displayError (0, i18n("Could not open file %1 for reading", filename), debug_level, DL_ERROR);
 	if (!doc.setContent(&f, false, &error_message, &error_line, &error_column)) {
 		displayError (0, i18n ("Error parsing XML-file. Error-message was: '%1' in line '%2', column '%3'. Expect further errors to be reported below", error_message, error_line, error_column), debug_level, DL_ERROR);
 		return QDomElement ();
diff --git a/rkward/plugin/rkcomponentmeta.cpp b/rkward/plugin/rkcomponentmeta.cpp
index 592d29a..8b7f89f 100644
--- a/rkward/plugin/rkcomponentmeta.cpp
+++ b/rkward/plugin/rkcomponentmeta.cpp
@@ -74,8 +74,8 @@ QString RKComponentAboutData::toHtml () const {
 	if (!shortinfo.isEmpty ()) ret.append (":</p>\n<p>" + shortinfo);
 	ret.append ("</p>\n");
 	if (!url.isEmpty ()) ret.append ("URL: <a href=\"" + url + "\">" + url + "</a></p>\n<p>");
-	if (!copyright.isEmpty ()) ret.append (i18n ("Copyright (c)") + ": " + copyright + "</p>\n<p>");
-	if (!license.isEmpty ()) ret.append (i18n ("License") + ": " + license + "</p>\n<p>");
+	if (!copyright.isEmpty ()) ret.append (i18n ("Copyright (c): %1", copyright) + "</p>\n<p>");
+	if (!license.isEmpty ()) ret.append (i18n ("License: %1", license) + "</p>\n<p>");
 
 	if (!authors.isEmpty ()) {
 		ret.append ("<b>" + i18n ("Authors:") + "</b></p>\n<p><ul>");
diff --git a/rkward/plugin/rkoptionset.cpp b/rkward/plugin/rkoptionset.cpp
index 8c06342..f38e814 100644
--- a/rkward/plugin/rkoptionset.cpp
+++ b/rkward/plugin/rkoptionset.cpp
@@ -860,9 +860,9 @@ QVariant RKOptionSetDisplayModel::headerData (int section, Qt::Orientation orien
 			if (!set->isValid ()) {
 				QStringList probs;
 				if (set->n_invalid_rows > set->n_unfinished_rows) probs.append (i18n ("One or more rows contain invalid settings."));
-				if ((set->rowCount () > 0) && (set->rowCount () < set->min_rows_if_any)) probs.append (i18n ("At least %1 rows have to be defined (if any)").arg (set->min_rows_if_any));
-				if (set->rowCount () < set->min_rows) probs.append (i18n ("At least %1 rows have to be defined").arg (set->min_rows));
-				if (set->rowCount () > set->max_rows) probs.append (i18n ("At most %1 rows may be defined").arg (set->max_rows));
+				if ((set->rowCount () > 0) && (set->rowCount () < set->min_rows_if_any)) probs.append (i18n ("At least %1 rows have to be defined (if any)", set->min_rows_if_any));
+				if (set->rowCount () < set->min_rows) probs.append (i18n ("At least %1 rows have to be defined", set->min_rows));
+				if (set->rowCount () > set->max_rows) probs.append (i18n ("At most %1 rows may be defined", set->max_rows));
 				return (QString ("<p>%1</p><ul><li>%2</li></ul>").arg (i18n ("This element is not valid for the following reason(s):")).arg (probs.join ("</li>\n<li>")));
 			}
 		}
diff --git a/rkward/rkward.cpp b/rkward/rkward.cpp
index 1915aa0..0056f28 100644
--- a/rkward/rkward.cpp
+++ b/rkward/rkward.cpp
@@ -698,7 +698,7 @@ bool RKWardMainWindow::doQueryQuit () {
 
 //	if (!RObjectList::getGlobalEnv ()->isEmpty ()) {
 	int res;
-	res = KMessageBox::questionYesNoCancel (this, i18n ("Quitting RKWard: Do you want to save the workspace?"), i18n ("Save Workspace?"), KStandardGuiItem::save (), KStandardGuiItem::discard (), KGuiItem (i18n ("Don't quit")));
+	res = KMessageBox::questionYesNoCancel (this, i18n ("Quitting RKWard: Do you want to save the workspace?"), i18n ("Save Workspace?"), KStandardGuiItem::save (), KStandardGuiItem::discard (), KGuiItem (i18n ("Do Not Quit")));
 	if (res == KMessageBox::Yes) {
 		new RKSaveAgent (RKWorkplace::mainWorkplace ()->workspaceURL (), false, RKSaveAgent::DoNothing);
 	} else if (res == KMessageBox::Cancel) {
diff --git a/rkward/robjectviewer.cpp b/rkward/robjectviewer.cpp
index 3a225a8..d23d1a9 100644
--- a/rkward/robjectviewer.cpp
+++ b/rkward/robjectviewer.cpp
@@ -85,7 +85,7 @@ void RObjectViewer::objectRemoved (RObject *object) {
 		print_widget->objectKilled ();
 		structure_widget->objectKilled ();
 
-		QString reason = i18n ("<b>Object was deleted!</b>");
+		QString reason = i18n ("<b>Object was deleted</b>");
 		summary_widget->invalidate (reason);
 		print_widget->invalidate (reason);
 		structure_widget->invalidate (reason);




More information about the rkward-tracker mailing list