Qt: Pluralize packet count in Size string

Change-Id: Ifb23f4d558aa30df4ec436e42a4e23b23c2af110
Reviewed-on: https://code.wireshark.org/review/20566
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2017-03-16 19:46:28 +01:00
parent 144a4acb29
commit 795b459443
2 changed files with 25 additions and 9 deletions

View File

@ -784,17 +784,17 @@ void CaptureFileDialog::preview(const QString & path)
}
if(err != 0) {
preview_size_.setText(QString(tr("%1, error after %2 packets"))
preview_size_.setText(tr("%1, error after %Ln packet(s)", "", packets)
.arg(size_str).arg(packets));
return;
}
// Packet count
if(timed_out) {
preview_size_.setText(QString(tr("%1, timed out at %2 packets"))
preview_size_.setText(tr("%1, timed out at %Ln packet(s)", "", packets)
.arg(size_str).arg(packets));
} else {
preview_size_.setText(QString("%1, %2 packets")
preview_size_.setText(tr("%1, %Ln packet(s)", "", packets)
.arg(size_str).arg(packets));
}

View File

@ -876,15 +876,31 @@
<source>Automatically detect file type</source>
<translation type="unfinished"></translation>
</message>
<message>
<message numerus="yes">
<location filename="capture_file_dialog.cpp" line="787"/>
<source>%1, error after %2 packets</source>
<translation type="unfinished"></translation>
<source>%1, error after %Ln packet(s)</source>
<oldsource>%1, error after %2 packets</oldsource>
<translation>
<numerusform>%1, error after %Ln packet</numerusform>
<numerusform>%1, error after %Ln packets</numerusform>
</translation>
</message>
<message>
<message numerus="yes">
<location filename="capture_file_dialog.cpp" line="794"/>
<source>%1, timed out at %2 packets</source>
<translation type="unfinished"></translation>
<source>%1, timed out at %Ln packet(s)</source>
<oldsource>%1, timed out at %2 packets</oldsource>
<translation>
<numerusform>%1, timed out at %Ln packet</numerusform>
<numerusform>%1, timed out at %Ln packets</numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="capture_file_dialog.cpp" line="797"/>
<source>%1, %Ln packet(s)</source>
<translation>
<numerusform>%1, %Ln packet</numerusform>
<numerusform>%1, %Ln packets</numerusform>
</translation>
</message>
<message>
<location filename="capture_file_dialog.cpp" line="455"/>