aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2012-10-24 15:51:50 +0000
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2012-10-24 15:51:50 +0000
commit936082acb529b4e73b4d8d4f9fb8e13fb569efc1 (patch)
tree59ea356fd43e533166bcce0a2161950f97087eac
parent4438309f5eb607f746da7970b81f0406120df96d (diff)
Make new text translatable for Qtshark * export_dissection_dialog.cpp * file_set_dialog.ui * export_object_dialog.cpp * capture_file_dialog.cpp
svn path=/trunk/; revision=45761
-rw-r--r--ui/qt/capture_file_dialog.cpp38
-rw-r--r--ui/qt/export_dissection_dialog.cpp12
-rw-r--r--ui/qt/export_object_dialog.cpp2
-rw-r--r--ui/qt/file_set_dialog.ui8
4 files changed, 30 insertions, 30 deletions
diff --git a/ui/qt/capture_file_dialog.cpp b/ui/qt/capture_file_dialog.cpp
index 82f6773f52..6c37bf7f76 100644
--- a/ui/qt/capture_file_dialog.cpp
+++ b/ui/qt/capture_file_dialog.cpp
@@ -162,24 +162,24 @@ check_savability_t CaptureFileDialog::checkSaveAsWithComments(QWidget *
format you selected", or "Cancel", meaning "don't bother
saving the file at all". */
msg_dialog.setIcon(QMessageBox::Question);
- msg_dialog.setText("This capture file contains comments.");
- msg_dialog.setInformativeText("The file format you chose doesn't support comments. "
+ msg_dialog.setText(tr("This capture file contains comments."));
+ msg_dialog.setInformativeText(tr("The file format you chose doesn't support comments. "
"Do you want to save the capture in a format that supports comments "
- "or discard the comments and save in the format you chose?");
+ "or discard the comments and save in the format you chose?"));
msg_dialog.setStandardButtons(QMessageBox::Cancel);
// The predefined roles don't really match the tasks at hand...
- msg_dialog.addButton("Discard comments and save", QMessageBox::DestructiveRole);
- default_button = msg_dialog.addButton("Save in another format", QMessageBox::AcceptRole);
+ msg_dialog.addButton(tr("Discard comments and save"), QMessageBox::DestructiveRole);
+ default_button = msg_dialog.addButton(tr("Save in another format"), QMessageBox::AcceptRole);
msg_dialog.setDefaultButton(default_button);
} else {
/* No. Offer the user a choice of "Discard comments and
save in the format you selected" or "Cancel". */
msg_dialog.setIcon(QMessageBox::Question);
- msg_dialog.setText("This capture file contains comments.");
- msg_dialog.setInformativeText("No file format in which it can be saved supports comments. "
- "Do you want to discard the comments and save in the format you chose?");
+ msg_dialog.setText(tr("This capture file contains comments."));
+ msg_dialog.setInformativeText(tr("No file format in which it can be saved supports comments. "
+ "Do you want to discard the comments and save in the format you chose?"));
msg_dialog.setStandardButtons(QMessageBox::Cancel);
- msg_dialog.addButton("Discard comments and save", QMessageBox::DestructiveRole);
+ msg_dialog.addButton(tr("Discard comments and save"), QMessageBox::DestructiveRole);
msg_dialog.setDefaultButton(QMessageBox::Cancel);
}
@@ -402,17 +402,17 @@ void CaptureFileDialog::addPreview(QVBoxLayout &v_box) {
void CaptureFileDialog::addMergeControls(QVBoxLayout &v_box) {
- merge_prepend_.setText("Prepend packets");
- merge_prepend_.setToolTip("Insert packets from the selected file before the current file. Packet timestamps will be ignored.");
+ merge_prepend_.setText(tr("Prepend packets"));
+ merge_prepend_.setToolTip(tr("Insert packets from the selected file before the current file. Packet timestamps will be ignored."));
v_box.addWidget(&merge_prepend_, 0, Qt::AlignTop);
- merge_chrono_.setText("Merge chronologically");
- merge_chrono_.setToolTip("Insert packets in chronological order.");
+ merge_chrono_.setText(tr("Merge chronologically"));
+ merge_chrono_.setToolTip(tr("Insert packets in chronological order."));
merge_chrono_.setChecked(true);
v_box.addWidget(&merge_chrono_, 0, Qt::AlignTop);
- merge_append_.setText("Append packets");
- merge_append_.setToolTip("Insert packets from the selected file after the current file. Packet timestamps will be ignored.");
+ merge_append_.setText(tr("Append packets"));
+ merge_append_.setToolTip(tr("Insert packets from the selected file after the current file. Packet timestamps will be ignored."));
v_box.addWidget(&merge_append_, 0, Qt::AlignTop);
}
@@ -525,7 +525,7 @@ check_savability_t CaptureFileDialog::saveAs(QString &file_name, bool must_suppo
// let the user select anything.
setNameFilters(buildFileSaveAsTypeList(must_support_comments));
setAcceptMode(QFileDialog::AcceptSave);
- setLabelText(FileType, "Save as:");
+ setLabelText(FileType, tr("Save as:"));
addGzipControls(left_v_box_);
addHelpButton(HELP_SAVE_DIALOG);
@@ -709,7 +709,7 @@ void CaptureFileDialog::preview(const QString & path)
preview_format_.setText(QString::fromUtf8(wtap_file_type_string(wtap_file_type(wth))));
// Size
- preview_size_.setText(QString("%1 bytes").arg(wtap_file_size(wth, &err)));
+ preview_size_.setText(QString(tr("%1 bytes")).arg(wtap_file_size(wth, &err)));
time(&time_preview);
while ( (wtap_read(wth, &err, &err_info, &data_offset)) ) {
@@ -738,13 +738,13 @@ void CaptureFileDialog::preview(const QString & path)
}
if(err != 0) {
- preview_packets_.setText(QString("error after reading %1 packets").arg(packets));
+ preview_packets_.setText(QString(tr("error after reading %1 packets")).arg(packets));
return;
}
// Packet count
if(timed_out) {
- preview_packets_.setText(QString("more than %1 (preview timeout)").arg(packets));
+ preview_packets_.setText(QString(tr("more than %1 (preview timeout)")).arg(packets));
} else {
preview_packets_.setText(QString("%1").arg(packets));
}
diff --git a/ui/qt/export_dissection_dialog.cpp b/ui/qt/export_dissection_dialog.cpp
index c39700b983..3ce5943226 100644
--- a/ui/qt/export_dissection_dialog.cpp
+++ b/ui/qt/export_dissection_dialog.cpp
@@ -63,15 +63,15 @@ ExportDissectionDialog::ExportDissectionDialog(QWidget *parent, capture_file *ca
setWindowTitle(tr("Wireshark: Export Packet Dissections"));
setAcceptMode(QFileDialog::AcceptSave);
- setLabelText(FileType, "Export as:");
+ setLabelText(FileType, tr("Export as:"));
// export_type_map_keys() sorts alphabetically. We don't want that.
name_filters
- << "Plain text (*.txt)"
- << "Comma Separated Values - summary (*.csv)"
- << "PSML - summary (*.psml, *.xml)"
- << "PDML - details (*.pdml, *.xml)"
- << "C Arrays - bytes (*.c, *.h)";
+ << tr("Plain text (*.txt)")
+ << tr("Comma Separated Values - summary (*.csv)")
+ << tr("PSML - summary (*.psml, *.xml)")
+ << tr("PDML - details (*.pdml, *.xml)")
+ << tr("C Arrays - bytes (*.c, *.h)");
export_type_map_[name_filters[0]] = export_type_text;
export_type_map_[name_filters[1]] = export_type_csv;
export_type_map_[name_filters[2]] = export_type_psml;
diff --git a/ui/qt/export_object_dialog.cpp b/ui/qt/export_object_dialog.cpp
index 43f8ea9af9..ca61585147 100644
--- a/ui/qt/export_object_dialog.cpp
+++ b/ui/qt/export_object_dialog.cpp
@@ -182,7 +182,7 @@ void ExportObjectDialog::show()
QMessageBox::warning(
this,
tr("Tap registration error"),
- QString("Unable to register ") + name_ + QString(" tap: ") + error_msg->str,
+ QString(tr("Unable to register ")) + name_ + QString(tr(" tap: ")) + error_msg->str,
QMessageBox::Ok
);
g_string_free(error_msg, TRUE);
diff --git a/ui/qt/file_set_dialog.ui b/ui/qt/file_set_dialog.ui
index d734a3e156..718f17786c 100644
--- a/ui/qt/file_set_dialog.ui
+++ b/ui/qt/file_set_dialog.ui
@@ -87,22 +87,22 @@
</property>
<column>
<property name="text">
- <string notr="true">Filename</string>
+ <string>Filename</string>
</property>
</column>
<column>
<property name="text">
- <string notr="true">Created</string>
+ <string>Created</string>
</property>
</column>
<column>
<property name="text">
- <string notr="true">Modified</string>
+ <string>Modified</string>
</property>
</column>
<column>
<property name="text">
- <string notr="true">Size</string>
+ <string>Size</string>
</property>
</column>
</widget>