Skip to content
Snippets Groups Projects
Commit 68cab507 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner: adding translation context for exception

parent 30a86cb2
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
** **
**************************************************************************/ **************************************************************************/
#include <QCoreApplication>
#include "invalididexception.h" #include "invalididexception.h"
namespace QmlDesigner { namespace QmlDesigner {
...@@ -55,12 +56,14 @@ QString InvalidIdException::description() const ...@@ -55,12 +56,14 @@ QString InvalidIdException::description() const
QString InvalidIdException::duplicateErrorMessage(const QString &id) QString InvalidIdException::duplicateErrorMessage(const QString &id)
{ {
return QObject::tr("Ids have to be unique: ") + id; return QCoreApplication::translate("InvalidIdException", "Ids have to be unique: ") + id;
} }
QString InvalidIdException::invalidErrorMessage(const QString &id) QString InvalidIdException::invalidErrorMessage(const QString &id)
{ {
return QObject::tr("Invalid Id: ") + id + QObject::tr("\nOnly alphanumeric characters and underscore allowed.\nIds must begin with a lowercase letter."); return QCoreApplication::translate("InvalidIdException", "Invalid Id: ") +
id + QCoreApplication::translate("InvalidIdException",
"\nOnly alphanumeric characters and underscore allowed.\nIds must begin with a lowercase letter.");
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment