Qt: Use … instead of UTF8_HORIZONTAL_ELLIPSIS in translated strings.

Run

$ gsed -i -e 's/\(tr *(.*".*\)" *UTF8_HORIZONTAL_ELLIPSIS/\1…"/' $( ag -l 'tr *\(.*" *UTF8_HORIZONTAL_ELLIPSIS' )
$ gsed -i -e 's/\(tr *( *\)UTF8_HORIZONTAL_ELLIPSIS *"/\1"…/' $( ag -l 'tr *\( *UTF8_HORIZONTAL_ELLIPSIS *"' )

in ui/qt. As discussed in #16812, the UTF8_ macros were required at one
time because we only allowed ASCII in our source code. However, that
requirement has since been relaxed and Qt's translation framework
doesn't handle concatenating strings and macros very well.
This commit is contained in:
Gerald Combs 2020-09-28 17:40:05 -07:00 committed by AndersBroman
parent 9ad3d14ea4
commit d2da4c7afb
33 changed files with 70 additions and 70 deletions

View File

@ -199,13 +199,13 @@ FolderListModel::FolderListModel(QObject * parent):
/* pers conf */
appendRow(QStringList() << tr("Personal configuration")
<< gchar_free_to_qstring(get_persconffile_path("", FALSE))
<< tr("dfilters, preferences, ethers, " UTF8_HORIZONTAL_ELLIPSIS));
<< tr("dfilters, preferences, ethers, "));
/* global conf */
QString dirPath = get_datafile_dir();
if (! dirPath.isEmpty()) {
appendRow (QStringList() << tr("Global configuration") << dirPath
<< tr("dfilters, preferences, manuf, " UTF8_HORIZONTAL_ELLIPSIS));
<< tr("dfilters, preferences, manuf, "));
}
/* system */

View File

@ -86,9 +86,9 @@ ColoringRulesDialog::ColoringRulesDialog(QWidget *parent, QString add_filter) :
rowCountChanged();
import_button_ = ui->buttonBox->addButton(tr("Import" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ApplyRole);
import_button_ = ui->buttonBox->addButton(tr("Import"), QDialogButtonBox::ApplyRole);
import_button_->setToolTip(tr("Select a file and add its filters to the end of the list."));
export_button_ = ui->buttonBox->addButton(tr("Export" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ApplyRole);
export_button_ = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ApplyRole);
export_button_->setToolTip(tr("Save filters in a file."));
CopyFromProfileButton * copy_button = new CopyFromProfileButton(this, COLORFILTERS_FILE_NAME, tr("Copy coloring rules from another profile."));

View File

@ -56,11 +56,11 @@ ConversationDialog::ConversationDialog(QWidget &parent, CaptureFile &cf, int cli
TrafficTableDialog(parent, cf, filter, table_name_),
tcp_graph_requested_(false)
{
follow_bt_ = buttonBox()->addButton(tr("Follow Stream" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ActionRole);
follow_bt_ = buttonBox()->addButton(tr("Follow Stream"), QDialogButtonBox::ActionRole);
follow_bt_->setToolTip(tr("Follow a TCP or UDP stream."));
connect(follow_bt_, SIGNAL(clicked()), this, SLOT(followStream()));
graph_bt_ = buttonBox()->addButton(tr("Graph" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ActionRole);
graph_bt_ = buttonBox()->addButton(tr("Graph"), QDialogButtonBox::ActionRole);
graph_bt_->setToolTip(tr("Graph a TCP conversation."));
connect(graph_bt_, SIGNAL(clicked()), this, SLOT(graphTcp()));

View File

@ -63,7 +63,7 @@ DecodeAsDialog::DecodeAsDialog(QWidget *parent, capture_file *cf, bool create_ne
ui->pathLabel->setAttribute(Qt::WA_MacSmallSize, true);
#endif
setWindowTitle(wsApp->windowTitleString(tr("Decode As" UTF8_HORIZONTAL_ELLIPSIS)));
setWindowTitle(wsApp->windowTitleString(tr("Decode As")));
QString abs_path = gchar_free_to_qstring(get_persconffile_path(DECODE_AS_ENTRIES_FILE_NAME, TRUE));
if (file_exists(abs_path.toUtf8().constData())) {

View File

@ -47,7 +47,7 @@ EndpointDialog::EndpointDialog(QWidget &parent, CaptureFile &cf, int cli_proto_i
QAction *action;
action = map_menu_->addAction(tr("Open in browser"));
connect(action, &QAction::triggered, this, &EndpointDialog::openMap);
action = map_menu_->addAction(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
action = map_menu_->addAction(tr("Save As"));
connect(action, &QAction::triggered, this, &EndpointDialog::saveMap);
map_bt_->setMenu(map_menu_);
#endif

View File

@ -235,7 +235,7 @@ void ExportObjectDialog::saveCurrentEntry(QString *tempFile)
if (!tempFile)
{
GString *safe_filename = eo_massage_str(entry_filename.toUtf8().constData(), EXPORT_OBJECT_MAXFILELEN, 0);
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Object As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Object As")),
safe_filename->str);
g_string_free(safe_filename, TRUE);
} else {
@ -265,7 +265,7 @@ void ExportObjectDialog::saveAllEntries()
// as the native dialog is used, and it supports that; does
// that also work on Windows and with Qt's own dialog?
//
save_in_path = WiresharkFileDialog::getExistingDirectory(this, wsApp->windowTitleString(tr("Save All Objects In" UTF8_HORIZONTAL_ELLIPSIS)),
save_in_path = WiresharkFileDialog::getExistingDirectory(this, wsApp->windowTitleString(tr("Save All Objects In")),
save_in_dir.canonicalPath(),
QFileDialog::ShowDirsOnly);

View File

@ -113,16 +113,16 @@ const QString FilterAction::actionTypeName(ActionType type) {
return QObject::tr("Not Selected");
break;
case ActionTypeAnd:
return QObject::tr(UTF8_HORIZONTAL_ELLIPSIS "and Selected");
return QObject::tr("and Selected");
break;
case ActionTypeOr:
return QObject::tr(UTF8_HORIZONTAL_ELLIPSIS "or Selected");
return QObject::tr("or Selected");
break;
case ActionTypeAndNot:
return QObject::tr(UTF8_HORIZONTAL_ELLIPSIS "and not Selected");
return QObject::tr("and not Selected");
break;
case ActionTypeOrNot:
return QObject::tr(UTF8_HORIZONTAL_ELLIPSIS "or not Selected");
return QObject::tr("or not Selected");
break;
default:
return QObject::tr("UNKNOWN");
@ -203,16 +203,16 @@ QActionGroup * FilterAction::createFilterGroup(QString filter, bool prepare, boo
action->setProperty("filterType", FilterAction::ActionTypePlain);
action = group->addAction(tr("Not Selected"));
action->setProperty("filterType", FilterAction::ActionTypeNot);
action = group->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "and Selected"));
action = group->addAction(tr("and Selected"));
action->setProperty("filterType", FilterAction::ActionTypeAnd);
action->setEnabled(!filterEmpty);
action = group->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "or Selected"));
action = group->addAction(tr("or Selected"));
action->setProperty("filterType", FilterAction::ActionTypeOr);
action->setEnabled(!filterEmpty);
action = group->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "and not Selected"));
action = group->addAction(tr("and not Selected"));
action->setProperty("filterType", FilterAction::ActionTypeAndNot);
action->setEnabled(!filterEmpty);
action = group->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "or not Selected"));
action = group->addAction(tr("or not Selected"));
action->setProperty("filterType", FilterAction::ActionTypeOrNot);
action->setEnabled(!filterEmpty);
group->setEnabled(enabled);

View File

@ -131,7 +131,7 @@ FollowStreamDialog::FollowStreamDialog(QWidget &parent, CaptureFile &cf, follow_
b_print_ = ui->buttonBox->addButton(tr("Print"), QDialogButtonBox::ActionRole);
connect(b_print_, SIGNAL(clicked()), this, SLOT(printStream()));
b_save_ = ui->buttonBox->addButton(tr("Save as" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ActionRole);
b_save_ = ui->buttonBox->addButton(tr("Save as"), QDialogButtonBox::ActionRole);
connect(b_save_, SIGNAL(clicked()), this, SLOT(saveAs()));
b_back_ = ui->buttonBox->addButton(tr("Back"), QDialogButtonBox::ActionRole);
@ -285,7 +285,7 @@ void FollowStreamDialog::findText(bool go_back)
void FollowStreamDialog::saveAs()
{
QString file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Stream Content As" UTF8_HORIZONTAL_ELLIPSIS)));
QString file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Stream Content As")));
if (file_name.isEmpty()) {
return;
}

View File

@ -578,7 +578,7 @@ void Iax2AnalysisDialog::on_actionSaveGraph_triggered()
if (!file_closed_) {
save_file += QString("/%1").arg(cap_file_.fileBaseName());
}
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
save_file, filter, &extension);
if (!file_name.isEmpty()) {
@ -921,7 +921,7 @@ void Iax2AnalysisDialog::saveAudio(Iax2AnalysisDialog::StreamDirection direction
return;
}
ui->hintLabel->setText(tr("Saving %1" UTF8_HORIZONTAL_ELLIPSIS).arg(save_file.fileName()));
ui->hintLabel->setText(tr("Saving %1").arg(save_file.fileName()));
ui->progressFrame->showProgress(tr("Analyzing IAX2"), true, true, &stop_flag);
if (save_format == save_audio_au_) { /* au format; https://pubs.opengroup.org/external/auformat.html */

View File

@ -329,7 +329,7 @@ IOGraphDialog::IOGraphDialog(QWidget &parent, CaptureFile &cf, QString displayFi
#endif
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
save_bt->setText(tr("Save As"));
QPushButton *copy_bt = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
connect (copy_bt, SIGNAL(clicked()), this, SLOT(copyAsCsvClicked()));
@ -1484,7 +1484,7 @@ void IOGraphDialog::on_buttonBox_accepted()
if (!file_closed_) {
save_file += QString("/%1").arg(cap_file_.fileBaseName());
}
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
save_file, filter, &extension);
if (file_name.length() > 0) {

View File

@ -168,7 +168,7 @@ void LteRlcGraphDialog::completeGraph(bool may_be_empty)
// Change label on save/export button.
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
save_bt->setText(tr("Save As"));
// Don't want to connect again after first time. - causes mouse handlers to get called
// multiple times.
@ -856,7 +856,7 @@ void LteRlcGraphDialog::on_buttonBox_accepted()
.arg(bmp_filter)
.arg(jpeg_filter);
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
path.canonicalPath(), filter, &extension);
if (file_name.length() > 0) {

View File

@ -543,13 +543,13 @@ void MainStatusBar::showProfileMenu(const QPoint &global_pos, Qt::MouseButton bu
profile_menu_.setTitle(tr("Switch to"));
QMenu ctx_menu_;
QAction * action = ctx_menu_.addAction(tr("Manage Profiles" UTF8_HORIZONTAL_ELLIPSIS), this, SLOT(manageProfile()));
QAction * action = ctx_menu_.addAction(tr("Manage Profiles"), this, SLOT(manageProfile()));
action->setProperty("dialog_action_", (int)ProfileDialog::ShowProfiles);
ctx_menu_.addSeparator();
action = ctx_menu_.addAction(tr("New" UTF8_HORIZONTAL_ELLIPSIS), this, SLOT(manageProfile()));
action = ctx_menu_.addAction(tr("New"), this, SLOT(manageProfile()));
action->setProperty("dialog_action_", (int)ProfileDialog::NewProfile);
action = ctx_menu_.addAction(tr("Edit" UTF8_HORIZONTAL_ELLIPSIS), this, SLOT(manageProfile()));
action = ctx_menu_.addAction(tr("Edit"), this, SLOT(manageProfile()));
action->setProperty("dialog_action_", (int)ProfileDialog::EditCurrentProfile);
action->setEnabled(enable_edit);
action = ctx_menu_.addAction(tr("Delete"), this, SLOT(manageProfile()));

View File

@ -360,7 +360,7 @@ MainWindow::MainWindow(QWidget *parent) :
// The fewer children we have at this point the better.
main_ui_->setupUi(this);
#ifdef HAVE_SOFTWARE_UPDATE
update_action_ = new QAction(tr("Check for Updates" UTF8_HORIZONTAL_ELLIPSIS), main_ui_->menuHelp);
update_action_ = new QAction(tr("Check for Updates"), main_ui_->menuHelp);
#endif
#if defined(HAVE_LIBNL) && defined(HAVE_NL80211)
wireless_frame_ = new WirelessFrame(this);

View File

@ -682,7 +682,7 @@ void MainWindow::captureEventHandler(CaptureEvent ev)
{
QFileInfo file_info(ev.filePath());
wsApp->popStatus(WiresharkApplication::FileStatus);
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Saving %1" UTF8_HORIZONTAL_ELLIPSIS).arg(file_info.fileName()));
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Saving %1").arg(file_info.fileName()));
break;
}
default:
@ -1602,7 +1602,7 @@ void MainWindow::setFeaturesEnabled(bool enabled)
}
else
{
main_ui_->statusBar->showMessage(tr("Please wait while Wireshark is initializing" UTF8_HORIZONTAL_ELLIPSIS));
main_ui_->statusBar->showMessage(tr("Please wait while Wireshark is initializing"));
}
}

View File

@ -357,7 +357,7 @@ void PacketListModel::sort(int column, Qt::SortOrder order)
// XXX Use updateProgress instead. We'd have to switch from std::sort to
// something we can interrupt.
if (!col_title.isEmpty()) {
QString busy_msg = tr("Sorting \"%1\"" UTF8_HORIZONTAL_ELLIPSIS).arg(col_title);
QString busy_msg = tr("Sorting \"%1\"").arg(col_title);
wsApp->pushStatus(WiresharkApplication::BusyStatus, busy_msg);
}

View File

@ -172,7 +172,7 @@ pref_show(pref_t *pref, gpointer layout_ptr)
QLabel *label = new QLabel(prefs_get_title(pref));
label->setToolTip(tooltip);
hb->addWidget(label);
QPushButton *uat_pb = new QPushButton(QObject::tr("Edit" UTF8_HORIZONTAL_ELLIPSIS));
QPushButton *uat_pb = new QPushButton(QObject::tr("Edit"));
uat_pb->setToolTip(tooltip);
uat_pb->setProperty(pref_prop_, VariantPointer<pref_t>::asQVariant(pref));
hb->addWidget(uat_pb);
@ -200,7 +200,7 @@ pref_show(pref_t *pref, gpointer layout_ptr)
)
.arg(path_le->style()->subElementRect(QStyle::SE_CheckBoxContents, &style_opt).left()));
hb->addWidget(path_le);
QPushButton *path_pb = new QPushButton(QObject::tr("Browse" UTF8_HORIZONTAL_ELLIPSIS));
QPushButton *path_pb = new QPushButton(QObject::tr("Browse"));
path_pb->setProperty(pref_prop_, VariantPointer<pref_t>::asQVariant(pref));
hb->addWidget(path_pb);
hb->addSpacerItem(new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Minimum));

View File

@ -475,14 +475,14 @@ void PacketDiagram::contextMenuEvent(QContextMenuEvent *event)
ctx_menu.addSeparator();
action = ctx_menu.addAction(tr("Save Diagram As" UTF8_HORIZONTAL_ELLIPSIS));
action = ctx_menu.addAction(tr("Save Diagram As"));
connect(action, &QAction::triggered, this, &PacketDiagram::saveAsTriggered);
action = ctx_menu.addAction(tr("Copy as Raster Image"));
connect(action, &QAction::triggered, this, &PacketDiagram::copyAsRasterTriggered);
#if defined(QT_SVG_LIB) && !defined(Q_OS_MAC)
action = ctx_menu.addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as SVG"));
action = ctx_menu.addAction(tr("as SVG"));
connect(action, &QAction::triggered, this, &PacketDiagram::copyAsSvgTriggered);
#endif
@ -770,7 +770,7 @@ void PacketDiagram::saveAsTriggered()
#endif
QString filter = fl.join(";;");
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
path.canonicalPath(), filter, &extension);
if (file_name.length() > 0) {

View File

@ -697,10 +697,10 @@ void PacketList::contextMenuEvent(QContextMenuEvent *event)
QAction * action = submenu->addAction(tr("Summary as Text"));
action->setData(CopyAsText);
connect(action, SIGNAL(triggered()), this, SLOT(copySummary()));
action = submenu->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as CSV"));
action = submenu->addAction(tr("as CSV"));
action->setData(CopyAsCSV);
connect(action, SIGNAL(triggered()), this, SLOT(copySummary()));
action = submenu->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as YAML"));
action = submenu->addAction(tr("as YAML"));
action->setData(CopyAsYAML);
connect(action, SIGNAL(triggered()), this, SLOT(copySummary()));
submenu->addSeparator();
@ -715,7 +715,7 @@ void PacketList::contextMenuEvent(QContextMenuEvent *event)
ctx_menu->addSeparator();
ctx_menu->addMenu(&proto_prefs_menus_);
action = ctx_menu->addAction(tr("Decode As" UTF8_HORIZONTAL_ELLIPSIS));
action = ctx_menu->addAction(tr("Decode As"));
action->setProperty("create_new", QVariant(true));
connect(action, &QAction::triggered, this, &PacketList::ctxDecodeAsDialog);
// "Print" not ported intentionally

View File

@ -65,7 +65,7 @@ void PreferenceEditorFrame::editPreference(preference *pref, pref_module *module
return;
}
ui->modulePreferencesToolButton->setText(tr("Open %1 preferences" UTF8_HORIZONTAL_ELLIPSIS).arg(module_->title));
ui->modulePreferencesToolButton->setText(tr("Open %1 preferences").arg(module_->title));
pref_stash(pref_, NULL);
ui->preferenceTitleLabel->setText(QString("%1:").arg(prefs_get_title(pref)));

View File

@ -69,7 +69,7 @@ PrintDialog::PrintDialog(QWidget *parent, capture_file *cf, QString selRange) :
cur_printer_(NULL),
cur_painter_(NULL),
preview_(new QPrintPreviewWidget(&printer_)),
print_bt_(new QPushButton(tr("&Print" UTF8_HORIZONTAL_ELLIPSIS))),
print_bt_(new QPushButton(tr("&Print"))),
cap_file_(cf),
page_pos_(0),
in_preview_(FALSE)
@ -113,7 +113,7 @@ PrintDialog::PrintDialog(QWidget *parent, capture_file *cf, QString selRange) :
pd_ui_->rangeGroupBox->initRange(&print_args_.range, selRange);
pd_ui_->buttonBox->addButton(print_bt_, QDialogButtonBox::ActionRole);
pd_ui_->buttonBox->addButton(tr("Page &Setup" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ResetRole);
pd_ui_->buttonBox->addButton(tr("Page &Setup"), QDialogButtonBox::ResetRole);
print_bt_->setDefault(true);
connect(preview_, SIGNAL(paintRequested(QPrinter*)), this, SLOT(paintPreview(QPrinter*)));

View File

@ -178,7 +178,7 @@ void ProtocolPreferencesMenu::setModule(const QString module_name)
module_name_ = module_name;
action = addAction(tr("Open %1 preferences" UTF8_HORIZONTAL_ELLIPSIS).arg(long_name));
action = addAction(tr("Open %1 preferences").arg(long_name));
action->setData(QString(module_name));
connect(action, SIGNAL(triggered(bool)), this, SLOT(modulePreferencesTriggered()));
addSeparator();

View File

@ -617,7 +617,7 @@ void RtpAnalysisDialog::on_actionSaveGraph_triggered()
if (!file_closed_) {
save_file += QString("/%1").arg(cap_file_.fileBaseName());
}
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
save_file, filter, &extension);
if (!file_name.isEmpty()) {
@ -1459,7 +1459,7 @@ void RtpAnalysisDialog::saveAudio(RtpAnalysisDialog::StreamDirection direction,
return;
}
ui->hintLabel->setText(tr("Saving %1" UTF8_HORIZONTAL_ELLIPSIS).arg(save_file.fileName()));
ui->hintLabel->setText(tr("Saving %1").arg(save_file.fileName()));
ui->progressFrame->showProgress(tr("Analyzing RTP"), true, true, &stop_flag);
clearSAEErrors();

View File

@ -228,7 +228,7 @@ RtpStreamDialog::RtpStreamDialog(QWidget &parent, CaptureFile &cf) :
find_reverse_button_->setToolTip(ui->actionFindReverse->toolTip());
prepare_button_ = ui->buttonBox->addButton(ui->actionPrepareFilter->text(), QDialogButtonBox::ApplyRole);
prepare_button_->setToolTip(ui->actionPrepareFilter->toolTip());
export_button_ = ui->buttonBox->addButton(tr("Export" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ApplyRole);
export_button_ = ui->buttonBox->addButton(tr("Export"), QDialogButtonBox::ApplyRole);
export_button_->setToolTip(ui->actionExportAsRtpDump->toolTip());
copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ApplyRole);
analyze_button_ = ui->buttonBox->addButton(ui->actionAnalyze->text(), QDialogButtonBox::ApplyRole);
@ -502,7 +502,7 @@ void RtpStreamDialog::on_actionExportAsRtpDump_triggered()
QDir path(wsApp->lastOpenDir());
QString save_file = path.canonicalPath() + "/" + cap_file_.fileBaseName();
QString extension;
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save RTPDump As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save RTPDump As")),
save_file, "RTPDump Format (*.rtpdump)", &extension);
if (file_name.length() > 0) {

View File

@ -490,7 +490,7 @@ void SCTPGraphDialog::save_graph(QDialog *dlg, QCustomPlot *plot)
.arg(bmp_filter)
.arg(jpeg_filter);
file_name = WiresharkFileDialog::getSaveFileName(dlg, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(dlg, wsApp->windowTitleString(tr("Save Graph As")),
path.canonicalPath(), filter, &extension);
if (file_name.length() > 0) {

View File

@ -449,7 +449,7 @@ void SearchFrame::on_findButton_clicked()
g_free(cap_file_->sfilter);
cap_file_->sfilter = g_strdup(sf_ui_->searchLineEdit->text().toUtf8().constData());
wsApp->popStatus(WiresharkApplication::FileStatus);
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Searching for %1" UTF8_HORIZONTAL_ELLIPSIS).arg(sf_ui_->searchLineEdit->text()));
wsApp->pushStatus(WiresharkApplication::FileStatus, tr("Searching for %1").arg(sf_ui_->searchLineEdit->text()));
if (cap_file_->hex) {
/* Hex value in packet data */

View File

@ -168,7 +168,7 @@ SequenceDialog::SequenceDialog(QWidget &parent, CaptureFile &cf, SequenceInfo *i
}
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
save_bt->setText(tr("Save As"));
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
if (close_bt) {
@ -382,7 +382,7 @@ void SequenceDialog::on_buttonBox_accepted()
filter.append(QString(";;%5").arg(ascii_filter));
}
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
path.canonicalPath(), filter, &extension);
if (file_name.length() > 0) {

View File

@ -87,7 +87,7 @@ ShowPacketBytesDialog::ShowPacketBytesDialog(QWidget &parent, CaptureFile &cf) :
copy_button_ = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
connect(copy_button_, SIGNAL(clicked()), this, SLOT(copyBytes()));
save_as_button_ = ui->buttonBox->addButton(tr("Save as" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ActionRole);
save_as_button_ = ui->buttonBox->addButton(tr("Save as"), QDialogButtonBox::ActionRole);
connect(save_as_button_, SIGNAL(clicked()), this, SLOT(saveAs()));
connect(ui->buttonBox, SIGNAL(helpRequested()), this, SLOT(helpButton()));
@ -304,7 +304,7 @@ void ShowPacketBytesDialog::copyBytes()
void ShowPacketBytesDialog::saveAs()
{
QString file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Selected Packet Bytes As" UTF8_HORIZONTAL_ELLIPSIS)));
QString file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Selected Packet Bytes As")));
if (file_name.isEmpty())
return;

View File

@ -81,7 +81,7 @@ TapParameterDialog::TapParameterDialog(QWidget &parent, CaptureFile &cf, int hel
button = ui->buttonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
connect(button, SIGNAL(clicked()), this, SLOT(on_actionCopyToClipboard_triggered()));
button = ui->buttonBox->addButton(tr("Save as" UTF8_HORIZONTAL_ELLIPSIS), QDialogButtonBox::ActionRole);
button = ui->buttonBox->addButton(tr("Save as"), QDialogButtonBox::ActionRole);
connect(button, SIGNAL(clicked()), this, SLOT(on_actionSaveAs_triggered()));
connect(ui->displayFilterLineEdit, SIGNAL(textChanged(QString)),
@ -528,7 +528,7 @@ void TapParameterDialog::on_actionSaveAs_triggered()
#ifdef Q_OS_WIN
HANDLE da_ctx = set_thread_per_monitor_v2_awareness();
#endif
QFileDialog SaveAsDialog(this, wsApp->windowTitleString(tr("Save Statistics As" UTF8_HORIZONTAL_ELLIPSIS)),
QFileDialog SaveAsDialog(this, wsApp->windowTitleString(tr("Save Statistics As")),
get_last_open_dir());
SaveAsDialog.setNameFilter(tr("Plain text file (*.txt);;"
"Comma separated values (*.csv);;"

View File

@ -336,7 +336,7 @@ TCPStreamDialog::TCPStreamDialog(QWidget *parent, capture_file *cf, tcp_graph_ty
toggleTracerStyle(true);
QPushButton *save_bt = ui->buttonBox->button(QDialogButtonBox::Save);
save_bt->setText(tr("Save As" UTF8_HORIZONTAL_ELLIPSIS));
save_bt->setText(tr("Save As"));
QPushButton *close_bt = ui->buttonBox->button(QDialogButtonBox::Close);
if (close_bt) {
@ -1839,7 +1839,7 @@ void TCPStreamDialog::on_buttonBox_accepted()
.arg(bmp_filter)
.arg(jpeg_filter);
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As" UTF8_HORIZONTAL_ELLIPSIS)),
file_name = WiresharkFileDialog::getSaveFileName(this, wsApp->windowTitleString(tr("Save Graph As")),
path.canonicalPath(), filter, &extension);
if (file_name.length() > 0) {

View File

@ -197,27 +197,27 @@ QActionGroup * DataPrinter::copyActions(QObject * copyClass, QObject * data)
action->setProperty("printertype", DataPrinter::DP_HexDump);
connect(action, &QAction::triggered, dpi, &DataPrinter::copyIDataBytes);
action = new QAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as Hex Dump"), actions);
action = new QAction(tr("as Hex Dump"), actions);
action->setToolTip(tr("Copy packet bytes as a hex dump."));
action->setProperty("printertype", DataPrinter::DP_HexOnly);
connect(action, &QAction::triggered, dpi, &DataPrinter::copyIDataBytes);
action = new QAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as Printable Text"), actions);
action = new QAction(tr("as Printable Text"), actions);
action->setToolTip(tr("Copy only the printable text in the packet."));
action->setProperty("printertype", DataPrinter::DP_PrintableText);
connect(action, &QAction::triggered, dpi, &DataPrinter::copyIDataBytes);
action = new QAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as a Hex Stream"), actions);
action = new QAction(tr("as a Hex Stream"), actions);
action->setToolTip(tr("Copy packet bytes as a stream of hex."));
action->setProperty("printertype", DataPrinter::DP_HexStream);
connect(action, &QAction::triggered, dpi, &DataPrinter::copyIDataBytes);
action = new QAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as Raw Binary"), actions);
action = new QAction(tr("as Raw Binary"), actions);
action->setToolTip(tr("Copy packet bytes as application/octet-stream MIME data."));
action->setProperty("printertype", DataPrinter::DP_Binary);
connect(action, &QAction::triggered, dpi, &DataPrinter::copyIDataBytes);
action = new QAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as Escaped String"), actions);
action = new QAction(tr("as Escaped String"), actions);
action->setToolTip(tr("Copy packet bytes as an escaped string."));
action->setProperty("printertype", DataPrinter::DP_EscapedString);
connect(action, &QAction::triggered, dpi, &DataPrinter::copyIDataBytes);

View File

@ -88,7 +88,7 @@ void ByteViewText::createContextMenu()
action_bytes_hex_->setData(QVariant::fromValue(BYTES_HEX));
action_bytes_hex_->setCheckable(true);
action_bytes_bits_ = format_actions->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as bits"));
action_bytes_bits_ = format_actions->addAction(tr("as bits"));
action_bytes_bits_->setData(QVariant::fromValue(BYTES_BITS));
action_bytes_bits_->setCheckable(true);
@ -102,11 +102,11 @@ void ByteViewText::createContextMenu()
action_bytes_enc_from_packet_->setData(QVariant::fromValue(BYTES_ENC_FROM_PACKET));
action_bytes_enc_from_packet_->setCheckable(true);
action_bytes_enc_ascii_ = encoding_actions->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as ASCII"));
action_bytes_enc_ascii_ = encoding_actions->addAction(tr("as ASCII"));
action_bytes_enc_ascii_->setData(QVariant::fromValue(BYTES_ENC_ASCII));
action_bytes_enc_ascii_->setCheckable(true);
action_bytes_enc_ebcdic_ = encoding_actions->addAction(tr(UTF8_HORIZONTAL_ELLIPSIS "as EBCDIC"));
action_bytes_enc_ebcdic_ = encoding_actions->addAction(tr("as EBCDIC"));
action_bytes_enc_ebcdic_->setData(QVariant::fromValue(BYTES_ENC_EBCDIC));
action_bytes_enc_ebcdic_->setCheckable(true);

View File

@ -152,7 +152,7 @@ void DisplayFilterEdit::contextMenuEvent(QContextMenuEvent *event) {
menu->addSeparator();
menu->addAction(na);
na = new QAction(tr("Display Filter Expression" UTF8_HORIZONTAL_ELLIPSIS), this);
na = new QAction(tr("Display Filter Expression"), this);
connect(na, &QAction::triggered, this, &DisplayFilterEdit::displayFilterExpression);
menu->insertAction(first, na);

View File

@ -186,13 +186,13 @@ void PacketListHeader::contextMenuEvent(QContextMenuEvent *event)
contextMenu->addActions(alignmentActions->actions());
contextMenu->addSeparator();
action = contextMenu->addAction(tr("Column Preferences" UTF8_HORIZONTAL_ELLIPSIS));
action = contextMenu->addAction(tr("Column Preferences"));
connect(action, &QAction::triggered, this, &PacketListHeader::showColumnPrefs);
action = contextMenu->addAction(tr("Edit Column"));
connect(action, &QAction::triggered, this, &PacketListHeader::doEditColumn);
action = contextMenu->addAction(tr("Resize to Contents"));
connect(action, &QAction::triggered, this, &PacketListHeader::resizeToContent);
action = contextMenu->addAction(tr("Resize Column to Width" UTF8_HORIZONTAL_ELLIPSIS));
action = contextMenu->addAction(tr("Resize Column to Width"));
connect(action, &QAction::triggered, this, &PacketListHeader::resizeToWidth);
action = contextMenu->addAction(tr("Resolve Names"));