diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-11-14 22:35:10 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-11-14 22:35:10 +0000 |
commit | 1745e131fcc50e5791a147549b79e72751dcca42 (patch) | |
tree | 8f86cdf8bdbee99abe0d15a700df23e1ab015c25 /ui | |
parent | 64f4e13fff579b3a4a78e6cd327f15516e1ef3bb (diff) |
Create a plural-only English translation. Use it to pluralize the Follow
Stream and Flow Graph hint statistics.
svn path=/trunk/; revision=53326
Diffstat (limited to 'ui')
-rw-r--r-- | ui/qt/CMakeLists.txt | 1 | ||||
-rw-r--r-- | ui/qt/Makefile.common | 11 | ||||
-rw-r--r-- | ui/qt/QtShark.pro | 6 | ||||
-rw-r--r-- | ui/qt/follow_stream_dialog.cpp | 5 | ||||
-rw-r--r-- | ui/qt/i18n.qrc | 3 | ||||
-rwxr-xr-x | ui/qt/qtshark_en.qm | bin | 0 -> 595 bytes | |||
-rwxr-xr-x | ui/qt/qtshark_en.ts | 50 | ||||
-rw-r--r-- | ui/qt/sequence_dialog.cpp | 3 |
8 files changed, 69 insertions, 10 deletions
diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index 7269d7abe6..c4ba1fc528 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -194,6 +194,7 @@ set(QTSHARK_QRC set(QTSHARK_TS qtshark_de.ts + qtshark_en.ts # lupdate -pluralonly qtshark_fr.ts qtshark_zh_CN.ts ) diff --git a/ui/qt/Makefile.common b/ui/qt/Makefile.common index beac38ac59..7ca3cc991e 100644 --- a/ui/qt/Makefile.common +++ b/ui/qt/Makefile.common @@ -203,20 +203,23 @@ QRC_FILES = \ # # .ts files. +# qtshark_en should be pluralonly. # TS_FILES = \ + qtshark_de.ts \ + qtshark_en.ts \ qtshark_fr.ts \ - qtshark_zh_CN.ts \ - qtshark_de.ts + qtshark_zh_CN.ts # # .qm files. # # Should be auto-generated ? QM_FILES = \ + qtshark_de.qm \ + qtshark_en.qm \ qtshark_fr.qm \ - qtshark_zh_CN.qm \ - qtshark_de.qm + qtshark_zh_CN.qm # # The .rcc.cpp files generated from them. diff --git a/ui/qt/QtShark.pro b/ui/qt/QtShark.pro index 83abfe558e..c7ba7da1e9 100644 --- a/ui/qt/QtShark.pro +++ b/ui/qt/QtShark.pro @@ -438,10 +438,12 @@ RESOURCES += \ welcome.qrc \ +# qtshark_en should be pluralonly. TRANSLATIONS = \ qtshark_de.ts \ - qtshark_zh_CN.ts \ - qtshark_fr.ts + qtshark_en.ts \ + qtshark_fr.ts \ + qtshark_zh_CN.ts ICON = ../../packaging/macosx/Resources/Wireshark.icns diff --git a/ui/qt/follow_stream_dialog.cpp b/ui/qt/follow_stream_dialog.cpp index 1590afc064..b1126f49d1 100644 --- a/ui/qt/follow_stream_dialog.cpp +++ b/ui/qt/follow_stream_dialog.cpp @@ -136,8 +136,9 @@ void FollowStreamDialog::fillHintLabel(int text_pos) hint = QString("Packet %1. ").arg(pkt); } - hint.append(QString("%1 client pkts, %2 server pkts, %3 turns.") - .arg(client_packet_count_).arg(server_packet_count_).arg(turns_)); + hint += tr("%Ln client pkt(s), ", "", client_packet_count_) + + tr("%Ln server pkt(s), ", "", server_packet_count_) + + tr("%Ln turn(s).", "", turns_); if (pkt > 0) { hint.append(QString(" Click to select.")); diff --git a/ui/qt/i18n.qrc b/ui/qt/i18n.qrc index 48eed8f265..e5bafa310d 100644 --- a/ui/qt/i18n.qrc +++ b/ui/qt/i18n.qrc @@ -22,7 +22,8 @@ <RCC> <qresource prefix="/i18n"> <file>qtshark_de.qm</file> - <file>qtshark_zh_CN.qm</file> + <file>qtshark_en.qm</file> <file>qtshark_fr.qm</file> + <file>qtshark_zh_CN.qm</file> </qresource> </RCC> diff --git a/ui/qt/qtshark_en.qm b/ui/qt/qtshark_en.qm Binary files differnew file mode 100755 index 0000000000..fc4bf1e190 --- /dev/null +++ b/ui/qt/qtshark_en.qm diff --git a/ui/qt/qtshark_en.ts b/ui/qt/qtshark_en.ts new file mode 100755 index 0000000000..6b4b312cae --- /dev/null +++ b/ui/qt/qtshark_en.ts @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.0" language="en"> +<context> + <name>FollowStreamDialog</name> + <message numerus="yes"> + <location filename="follow_stream_dialog.cpp" line="139"/> + <source>%Ln client pkt(s), </source> + <translation> + <numerusform>%Ln client pkt, </numerusform> + <numerusform>%Ln client pkts, </numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="follow_stream_dialog.cpp" line="140"/> + <source>%Ln server pkt(s), </source> + <translation> + <numerusform>%Ln server pkt, </numerusform> + <numerusform>%Ln server pkts, </numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="follow_stream_dialog.cpp" line="141"/> + <source>%Ln turn(s).</source> + <translation> + <numerusform>%Ln turn.</numerusform> + <numerusform>%Ln turns.</numerusform> + </translation> + </message> +</context> +<context> + <name>SequenceDialog</name> + <message numerus="yes"> + <location filename="sequence_dialog.cpp" line="284"/> + <source>%Ln node(s)</source> + <translation> + <numerusform>%Ln node</numerusform> + <numerusform>%Ln nodes</numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="sequence_dialog.cpp" line="285"/> + <source>%Ln item(s)</source> + <translation> + <numerusform>%Ln item</numerusform> + <numerusform>%Ln items</numerusform> + </translation> + </message> +</context> +</TS> diff --git a/ui/qt/sequence_dialog.cpp b/ui/qt/sequence_dialog.cpp index dfb954e124..f814e1c5bd 100644 --- a/ui/qt/sequence_dialog.cpp +++ b/ui/qt/sequence_dialog.cpp @@ -281,7 +281,8 @@ void SequenceDialog::mouseMoved(QMouseEvent *event) } if (hint.isEmpty()) { - hint += QString("%1 nodes, %2 items").arg(seq_analysis_.num_nodes).arg(num_items_); + hint += tr("%Ln node(s)", "", seq_analysis_.num_nodes) + QString(", ") + + tr("%Ln item(s)", "", num_items_); } hint.prepend("<small><i>"); |