diff options
author | Edwin Mons <edwin.mons@isode.com> | 2016-02-10 12:48:21 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2016-02-11 09:31:49 (GMT) |
commit | bdbb6e8eb0c8e5a9b6e2db2195dd0518b5b4701d (patch) | |
tree | c476775e62a9cb4d1f0a2b4671fbf40fc85c1e53 | |
parent | af6493bf45fcd9174b485f8ae0532e2eb4e6914e (diff) | |
download | swift-bdbb6e8eb0c8e5a9b6e2db2195dd0518b5b4701d.zip swift-bdbb6e8eb0c8e5a9b6e2db2195dd0518b5b4701d.tar.bz2 |
Make Add <field> in the VCard wizard translatable
Used to use simple string contactenation, but that's unsuitable to at
least Dutch.
Test-Information:
Test platform OS X 10.11
Untranslated VCard field dropdown looks as before.
Change-Id: I371b47d570032deffa0ed662ba13964d96b22633
-rw-r--r-- | Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp b/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp index ac087ed..9092e08 100644 --- a/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp +++ b/Swift/QtUI/QtVCardWidget/QtVCardWidget.cpp @@ -316,61 +316,61 @@ void QtVCardWidget::addField() { QWidget* newField = fieldInfo->createFieldInstance(this, ui->cardFields, true); QtVCardGeneralField* newGeneralField = dynamic_cast<QtVCardGeneralField*>(newField); if (newGeneralField) { newGeneralField->initialize(); } appendField(newGeneralField); relayoutToolButton(); } } void QtVCardWidget::removeField(QtVCardGeneralField *field) { int sameFields = 0; QtVCardGeneralField* fieldToChange = NULL; foreach (QtVCardGeneralField* vcardField, fields) { if ((vcardField != field) && (typeid(*vcardField) == typeid(*field))) { sameFields++; fieldToChange = vcardField; } } if ((sameFields == 1) && fieldToChange) { fieldToChange->setStarVisible(false); } fields.remove(field); delete field; } void QtVCardWidget::addFieldType(QMenu* menu, boost::shared_ptr<QtVCardFieldInfo> fieldType) { if (!fieldType->getMenuName().isEmpty()) { - QAction* action = new QAction(tr("Add ") + fieldType->getMenuName(), this); + QAction* action = new QAction(tr("Add %1").arg(fieldType->getMenuName()), this); actionFieldInfo[action] = fieldType; connect(action, SIGNAL(triggered()), this, SLOT(addField())); menu->addAction(action); } } int QtVCardWidget::fieldTypeInstances(boost::shared_ptr<QtVCardFieldInfo> fieldType) { int instances = 0; for (int n = 0; n < ui->cardFields->count(); n++) { if (fieldType->testInstance(ui->cardFields->itemAt(n)->widget())) instances++; } return instances; } void layoutDeleteChildren(QLayout *layout) { while(layout->count() > 0) { QLayoutItem* child; if ((child = layout->takeAt(0)) != 0) { if (child->layout()) { layoutDeleteChildren(child->layout()); } if (dynamic_cast<QToolButton*>(child->widget())) { delete child; break; } delete child->widget(); delete child; } } } |