From 5dd8dfba300ab7e0438f81de72e0cab1909c21ff Mon Sep 17 00:00:00 2001
From: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Date: Tue, 23 Mar 2010 17:24:59 +0100
Subject: [PATCH] tr()-Fixes

---
 src/libs/qmljs/qmljsinterpreter.cpp       | 11 +++++-----
 src/plugins/coreplugin/generalsettings.ui |  2 +-
 src/plugins/git/gitclient.cpp             |  8 ++++----
 src/plugins/help/docsettingspage.ui       | 10 +++------
 src/plugins/help/filtersettingspage.ui    | 25 +++++++++++------------
 5 files changed, 26 insertions(+), 30 deletions(-)

diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp
index fb825e7acc8..8de65a1b5bf 100644
--- a/src/libs/qmljs/qmljsinterpreter.cpp
+++ b/src/libs/qmljs/qmljsinterpreter.cpp
@@ -38,6 +38,7 @@
 #include <QtCore/QMetaObject>
 #include <QtCore/QMetaProperty>
 #include <QtCore/QXmlStreamReader>
+#include <QtCore/QCoreApplication>
 #include <QtCore/QDebug>
 
 using namespace QmlJS::Interpreter;
@@ -315,7 +316,7 @@ public:
             if (_xml.name() == "module")
                 readModule();
             else
-                _xml.raiseError(QObject::tr("The file is not module file."));
+                _xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "The file is not module file."));
         }
 
         return !_xml.error();
@@ -327,7 +328,7 @@ public:
 
 private:
     void unexpectedElement(const QStringRef &child, const QString &parent) {
-        _xml.raiseError(QObject::tr("Unexpected element <%1> in <%2>").arg(child.toString(), parent));
+        _xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "Unexpected element <%1> in <%2>").arg(child.toString(), parent));
     }
 
     void ignoreAttr(const QXmlStreamAttribute &attr) {
@@ -336,11 +337,11 @@ private:
     }
 
     void invalidAttr(const QString &value, const QString &attrName, const QString &tag) {
-        _xml.raiseError(QObject::tr("invalid value '%1' for attribute %2 in <%3>").arg(value, attrName, tag));
+        _xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "invalid value '%1' for attribute %2 in <%3>").arg(value, attrName, tag));
     }
 
     void noValidAttr(const QString &attrName, const QString &tag) {
-        _xml.raiseError(QObject::tr("<%1> has no valid %2 attribute").arg(tag, attrName));
+        _xml.raiseError(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "<%1> has no valid %2 attribute").arg(tag, attrName));
     }
 
     void readModule()
@@ -1857,7 +1858,7 @@ QStringList MetaTypeSystem::load(const QFileInfoList &xmlFiles)
             }
             file.close();
         } else {
-            errorMsgs.append(QObject::tr("%1: %2").arg(xmlFile.absoluteFilePath(),
+            errorMsgs.append(QCoreApplication::translate("QmlJS::Interpreter::QmlXmlReader", "%1: %2").arg(xmlFile.absoluteFilePath(),
                                                        file.errorString()));
         }
     }
diff --git a/src/plugins/coreplugin/generalsettings.ui b/src/plugins/coreplugin/generalsettings.ui
index a143b0eddd2..c708be98693 100644
--- a/src/plugins/coreplugin/generalsettings.ui
+++ b/src/plugins/coreplugin/generalsettings.ui
@@ -234,7 +234,7 @@
           </item>
           <item>
            <property name="text">
-            <string>Reload all unmodified files</string>
+            <string>Reload all unchanged editors</string>
            </property>
           </item>
           <item>
diff --git a/src/plugins/git/gitclient.cpp b/src/plugins/git/gitclient.cpp
index ab8094672ba..a2310888c24 100644
--- a/src/plugins/git/gitclient.cpp
+++ b/src/plugins/git/gitclient.cpp
@@ -924,7 +924,7 @@ bool GitClient::synchronousBranchCmd(const QString &workingDirectory, QStringLis
     QByteArray errorText;
     const bool rc = synchronousGit(workingDirectory, branchArgs, &outputText, &errorText);
     if (!rc) {
-        *errorMessage = tr("Unable to run branch command: %1: %2").arg(workingDirectory, commandOutputFromLocal8Bit(errorText));
+        *errorMessage = tr("Unable to run a 'git branch' command in %1: %2").arg(workingDirectory, commandOutputFromLocal8Bit(errorText));
         return false;
     }
     *output = commandOutputFromLocal8Bit(outputText);
@@ -942,7 +942,7 @@ bool GitClient::synchronousShow(const QString &workingDirectory, const QString &
     QByteArray errorText;
     const bool rc = synchronousGit(workingDirectory, args, &outputText, &errorText);
     if (!rc) {
-        *errorMessage = tr("Unable to run show: %1: %2").arg(workingDirectory, commandOutputFromLocal8Bit(errorText));
+        *errorMessage = tr("Unable to run 'git show' in %1: %2").arg(workingDirectory, commandOutputFromLocal8Bit(errorText));
         return false;
     }
     *output = commandOutputFromLocal8Bit(outputText);
@@ -962,7 +962,7 @@ bool GitClient::synchronousCleanList(const QString &workingDirectory,
     QByteArray errorText;
     const bool rc = synchronousGit(workingDirectory, args, &outputText, &errorText);
     if (!rc) {
-        *errorMessage = tr("Unable to run clean --dry-run: %1: %2").arg(workingDirectory, commandOutputFromLocal8Bit(errorText));
+        *errorMessage = tr("Unable to run 'git clean' in %1: %2").arg(workingDirectory, commandOutputFromLocal8Bit(errorText));
         return false;
     }
     // Filter files that git would remove
@@ -1469,7 +1469,7 @@ void GitClient::slotPullRebaseFinished(bool ok, int exitCode, const QVariant &co
         return;
     // Abort rebase to clean if something goes wrong
     VCSBase::VCSBaseOutputWindow *outwin = VCSBase::VCSBaseOutputWindow::instance();
-    outwin->appendError(tr("git pull --rebase failed, aborting rebase."));
+    outwin->appendError(tr("The command 'git pull --rebase' failed, aborting rebase."));
     const QString workingDir = cookie.toString();
     QStringList arguments;
     arguments << QLatin1String("rebase") << QLatin1String("--abort");
diff --git a/src/plugins/help/docsettingspage.ui b/src/plugins/help/docsettingspage.ui
index 03b5963b16d..07061ca2ed0 100644
--- a/src/plugins/help/docsettingspage.ui
+++ b/src/plugins/help/docsettingspage.ui
@@ -11,13 +11,9 @@
    </rect>
   </property>
   <property name="toolTip">
-   <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt;&quot;&gt;The Documentation&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt; font-weight:600;&quot;&gt; &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt;&quot;&gt;page lets you install and remove compressed help files.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt;&quot;&gt;Click the &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt; font-weight:600;&quot;&gt;Install&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt;&quot;&gt; button and choose the path of the compressed help file (*.qch) you would like to install. To delete a help file, select a documentation set in the list and click &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt; font-weight:600;&quot;&gt;Remove&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-size:8pt;&quot;&gt;.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   <string>&lt;html&gt;&lt;body&gt;&lt;p&gt;The Documentation page lets you install and remove compressed help files.&lt;/p&gt;
+&lt;p&gt;Click the &lt;b&gt;Install&lt;/b&gt; button and choose the path of the compressed help file (*.qch) you would like to install. To delete a help file, select a documentation set in the list and click &lt;b&gt;Remove&lt;/b&gt;.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
diff --git a/src/plugins/help/filtersettingspage.ui b/src/plugins/help/filtersettingspage.ui
index 76cae9b91e1..ec03b86d7ec 100644
--- a/src/plugins/help/filtersettingspage.ui
+++ b/src/plugins/help/filtersettingspage.ui
@@ -11,19 +11,18 @@
    </rect>
   </property>
   <property name="toolTip">
-   <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt;The &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt;Filters&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt; page lets you create and remove documentation filters.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt;To add a new filter, click the &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-weight:600;&quot;&gt;Add&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt; button, specify a filter name in the pop-up dialog and click &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-weight:600;&quot;&gt;OK&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt;, then select the filter attributes in the list box on the right hand side. You can delete a filter by selecting it and clicking the &lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif'; font-weight:600;&quot;&gt;Remove&lt;/span&gt;&lt;span style=&quot; font-family:'Arial,Geneva,Helvetica,sans-serif';&quot;&gt; button.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;A filter is identified by its name and contains a list of filter attributes. An attribute is just a string that can be freely chosen. Attributes are defined by the documentation itself, this means that every documentation set usually has one or more attributes.&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;For example, the Qt 4.7.0 Linguist documentation defines the attributes '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;qt&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;', '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;' and '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;4.7.0'&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;, Qt Designer defines &lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;'designer&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;', '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;tools&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;' and '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;4.7.0&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;'. The filter to display all tools would then define only the attribute '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;tools'&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; since this attribute is part of both documentation sets. &lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Adding the attribute '&lt;/span&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;qmake'&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; to the filter would then only show qmake documentation, since the Qt Designer documentation does not contain this attribute. Having an empty list of attributes in a filter will match all documentation; i.e., it is equivalent to requesting unfiltered documentation.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+   <string>&lt;html&gt;&lt;body&gt;
+&lt;p&gt;
+The Filters page lets you create and remove documentation filters.
+&lt;/p&gt;&lt;p&gt;
+To add a new filter, click the &lt;b&gt;Add&lt;/b&gt; button, specify a filter name in the pop-up dialog and click &lt;b&gt;OK&lt;/b&gt;, then select the filter attributes in the list box on the right hand side. You can delete a filter by selecting it and clicking the &lt;b&gt;Remove&lt;/b&gt; button.
+&lt;/p&gt;&lt;p&gt;
+A filter is identified by its name and contains a list of filter attributes. An attribute is just a string that can be freely chosen. Attributes are defined by the documentation itself, this means that every documentation set usually has one or more attributes.
+&lt;/p&gt;&lt;p&gt;
+For example, the Qt 4.7.0 Linguist documentation defines the attributes '&lt;b&gt;qt&lt;/b&gt;', '&lt;b&gt;tools&lt;/b&gt;' and '&lt;b&gt;4.7.0&lt;/b&gt;', Qt Designer defines '&lt;b&gt;designer&lt;/b&gt;', '&lt;b&gt;tools&lt;/b&gt;' and '&lt;b&gt;4.7.0&lt;/b&gt;'. The filter to display all tools would then define only the attribute '&lt;b&gt;tools&lt;/b&gt;' since this attribute is part of both documentation sets. 
+&lt;/p&gt;&lt;p&gt;
+Adding the attribute '&lt;b&gt;qmake&lt;/b&gt;' to the filter would then only show qmake documentation, since the Qt Designer documentation does not contain this attribute. Having an empty list of attributes in a filter will match all documentation; i.e., it is equivalent to requesting unfiltered documentation.
+&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
   </property>
   <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
-- 
GitLab