diff options
author | Tobias Markmann <tm@ayena.de> | 2016-02-18 16:45:14 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2016-03-11 10:32:02 (GMT) |
commit | fcb5204aeacd6c4bf49223f133df285f22f7cd4b (patch) | |
tree | bbc4680d89515bbd55142a9acc5b60c5e5e6d957 /Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h | |
parent | 2ec46186d21b0e9620e56da2430c6eadf170bf3b (diff) | |
download | swift-fcb5204aeacd6c4bf49223f133df285f22f7cd4b.zip swift-fcb5204aeacd6c4bf49223f133df285f22f7cd4b.tar.bz2 |
Fix translatability of vCard editor popup menu items
Previously a preprocess macro expansion variable was passed
into Qt's tr() function. Qt's translation tool did not pick
these stings up.
Test-Information:
Builds on OS X 10.11.3 with Qt 5.4.2. Provided german
translations for some of the items in the popup menu and then
ran Swift with --language de. The translated popup menu items
were correctly translated in the UI as expected.
Change-Id: I50aeac9dd7277e1ce07b5a362c7474962dbcfad4
Diffstat (limited to 'Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h')
-rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h b/Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h index 168c01b..12f990a 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h +++ b/Swift/QtUI/QtVCardWidget/QtVCardFieldInfo.h @@ -4,13 +4,19 @@ * See Documentation/Licenses/BSD-simplified.txt for more information. */ +/* + * Copyright (c) 2016 Isode Limited. + * All rights reserved. + * See the COPYING file for more information. + */ + #pragma once +#include <typeinfo> + #include <QGridLayout> #include <QObject> #include <QString> -#include <typeinfo> - #define GENERIC_QT_VCARD_FIELD_INFO(MENU_NAME, ALLOWED_INSTANCES, FIELD_CLASS) \ class FieldInfo : public QtVCardFieldInfo { \ public: \ @@ -18,7 +24,7 @@ } \ \ virtual QString getMenuName() const { \ - return QObject::tr(MENU_NAME); \ + return MENU_NAME; \ } \ \ virtual int getAllowedInstances() const { \ |