Qt: Pluralize "Copy Row(s)"
authorStig Bjørlykke <stig@bjorlykke.org>
Sun, 30 Dec 2018 19:23:04 +0000 (20:23 +0100)
committerStig Bjørlykke <stig@bjorlykke.org>
Tue, 1 Jan 2019 18:13:44 +0000 (18:13 +0000)
Properly pluralize "Copy Row(s)" entry in the popup menu.

Change-Id: Ifc4f9c69ab63d2d2594648db3115087ba51a941f
Reviewed-on: https://code.wireshark.org/review/31269
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
ui/qt/about_dialog.cpp
ui/qt/wireshark_en.ts

index ae43dcd5a22a64e773d100da149ac9d4bf9fc4e0..1497398751fd7a4a2e356cb48bd543c2548ca162 100644 (file)
@@ -491,7 +491,8 @@ void AboutDialog::handleCopyMenu(QPoint pos)
     copyColumnAction->setData(VariantPointer<QTreeView>::asQVariant(tree));
     connect(copyColumnAction, SIGNAL(triggered()), this, SLOT(copyActionTriggered()));
 
-    QAction * copyRowAction = menu->addAction(tr("Copy Row(s)"));
+    QModelIndexList selectedRows = tree->selectionModel()->selectedRows();
+    QAction * copyRowAction = menu->addAction(tr("Copy Row(s)", "", selectedRows.count()));
     copyRowAction->setData(VariantPointer<QTreeView>::asQVariant(tree));
     connect(copyRowAction, SIGNAL(triggered()), this, SLOT(copyRowActionTriggered()));
 
index a11108c276cd09609aca4267d749501b7f13bb91..d9390d5e11af721be64a347276c22afdd6c35dae 100644 (file)
         <source>Copy</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
+    <message numerus="yes">
         <source>Copy Row(s)</source>
-        <translation type="unfinished"></translation>
+        <translation type="unfinished">
+            <numerusform>Copy Row</numerusform>
+            <numerusform>Copy Rows</numerusform>
+        </translation>
     </message>
 </context>
 <context>