Index: ui/qt/i10n.qrc
===================================================================
--- ui/qt/i10n.qrc (révision 0)
+++ ui/qt/i10n.qrc (révision 0)
@@ -0,0 +1,5 @@
+
+
+ wireshark_fr.qm
+
+
Index: ui/qt/display_filter_combo.cpp
===================================================================
--- ui/qt/display_filter_combo.cpp (révision 41338)
+++ ui/qt/display_filter_combo.cpp (copie de travail)
@@ -39,7 +39,7 @@
setEditable(true);
setLineEdit(new DisplayFilterEdit());
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
- setAccessibleName("Dispaly filter selector");
+ setAccessibleName(tr("Display filter selector"));
cur_display_filter_combo = this;
setStyleSheet(
"QComboBox {"
Index: ui/qt/main_welcome.cpp
===================================================================
--- ui/qt/main_welcome.cpp (révision 41338)
+++ ui/qt/main_welcome.cpp (copie de travail)
@@ -93,7 +93,7 @@
grid->setColumnStretch(0, 60);
// Banner row, 3 column span
- QString banner = QString("Wireshark");
+ QString banner = QString(tr("Wireshark"));
heading = new QLabel(banner);
grid->addWidget(heading, 0, 0, 1, 3);
@@ -101,13 +101,13 @@
column = new QVBoxLayout();
grid->addLayout(column, 1, 0, Qt::AlignTop);
- heading = new QLabel("
Capture
");
+ heading = new QLabel(tr("Capture
"));
column->addWidget(heading);
iface_tree = new InterfaceTree(this);
column->addWidget(iface_tree);
- heading = new QLabel("Capture Help
");
+ heading = new QLabel(tr("Capture Help
"));
column->addWidget(heading);
// Column 2: Files
@@ -115,7 +115,7 @@
grid->addLayout(column, 1, 1, Qt::AlignTop);
grid->setColumnStretch(1, 70);
- heading = new QLabel("Files
");
+ heading = new QLabel(tr("Files
"));
column->addWidget(heading);
m_recent_files.setStyleSheet(
@@ -133,7 +133,7 @@
grid->addLayout(column, 1, 2, Qt::AlignTop);
grid->setColumnStretch(2, 50);
- heading = new QLabel("Online
");
+ heading = new QLabel(tr("Online
"));
column->addWidget(heading);
// Sigh. This doesn't work in Qt 4.7 on OS X.
@@ -171,7 +171,7 @@
itemLabel.append(QString("%1 Bytes").arg(ri->size));
}
} else {
- itemLabel.append("not found)");
+ itemLabel.append(tr("not found)"));
}
rfFont.setItalic(!ri->accessible);
rfItem = m_recent_files.item(rfRow);
Index: ui/qt/main_status_bar.cpp
===================================================================
--- ui/qt/main_status_bar.cpp (révision 41338)
+++ ui/qt/main_status_bar.cpp (copie de travail)
@@ -38,9 +38,9 @@
#include
#ifdef HAVE_LIBPCAP
-#define DEF_READY_MESSAGE " Ready to load or capture"
+#define DEF_READY_MESSAGE QObject::tr(" Ready to load or capture")
#else
-#define DEF_READY_MESSAGE " Ready to load file"
+#define DEF_READY_MESSAGE QObject::tr(" Ready to load file")
#endif
// XXX - The GTK+ code assigns priorities to these and pushes/pops accordingly.
@@ -93,15 +93,15 @@
/* Do we have any packets? */
if (cfile.count) {
- packetsStr.append(QString("Packets: %1 Displayed: %2 Marked: %3")
+ packetsStr.append(QString(QObject::tr("Packets: %1 Displayed: %2 Marked: %3"))
.arg(cfile.count)
.arg(cfile.displayed_count)
.arg(cfile.marked_count));
if(cfile.drops_known) {
- packetsStr.append(QString(" Dropped: %1").arg(cfile.drops));
+ packetsStr.append(QString(QObject::tr(" Dropped: %1")).arg(cfile.drops));
}
if(cfile.ignored_count > 0) {
- packetsStr.append(QString(" Ignored: %1").arg(cfile.ignored_count));
+ packetsStr.append(QString(QObject::tr(" Ignored: %1")).arg(cfile.ignored_count));
}
if(!cfile.is_tempfile) {
/* Loading an existing file */
@@ -112,7 +112,7 @@
computed_elapsed%1000));
}
} else {
- packetsStr.append("No Packets");
+ packetsStr.append(QObject::tr("No Packets"));
}
cur_main_status_bar->pushPacketStatus(packetsStr);
Index: ui/qt/interface_tree.cpp
===================================================================
--- ui/qt/interface_tree.cpp (révision 41338)
+++ ui/qt/interface_tree.cpp (copie de travail)
@@ -46,7 +46,7 @@
header()->setVisible(false);
setRootIsDecorated(false);
setUniformRowHeights(true);
- setAccessibleName("Welcome screen list");
+ setAccessibleName(tr("Welcome screen list"));
setStyleSheet(
"QTreeWidget {"
@@ -60,7 +60,7 @@
if (if_list == NULL && err == CANT_GET_INTERFACE_LIST) {
ti = new QTreeWidgetItem();
- QLabel *label = new QLabel(QString("No interfaces found
%1").arg(QString().fromUtf8(err_str)));
+ QLabel *label = new QLabel(QString(tr("No interfaces found
%1")).arg(QString().fromUtf8(err_str)));
label->setWordWrap(true);
setDisabled(true);
Index: ui/qt/byte_view_tab.cpp
===================================================================
--- ui/qt/byte_view_tab.cpp (révision 41338)
+++ ui/qt/byte_view_tab.cpp (copie de travail)
@@ -29,7 +29,7 @@
ByteViewTab::ByteViewTab(QWidget *parent) :
QTabWidget(parent)
{
- setAccessibleName("Packet bytes");
+ setAccessibleName(tr("Packet bytes"));
addTab();
}
Index: ui/qt/wireshark_fr.ts
===================================================================
--- ui/qt/wireshark_fr.ts (révision 0)
+++ ui/qt/wireshark_fr.ts (révision 0)
@@ -0,0 +1,239 @@
+
+
+
+
+ ByteViewTab
+
+
+ Packet bytes
+ Taille du paquet
+
+
+
+ DisplayFilterCombo
+
+
+ Display filter selector
+ Le sélecteur de filtre
+
+
+
+ DisplayFilterEdit
+
+
+ Display filter entry
+ Dispaly filter entry
+ Filtre d'entrée
+
+
+
+ Invalid filter
+ Filtre invalide
+
+
+
+ InterfaceTree
+
+
+ Welcome screen list
+ Page de bienvenue
+
+
+
+ <h3>No interfaces found</h3>%1
+ <h3>Pas d'interface trouvée</h3>%1
+
+
+
+ MainWelcome
+
+
+ Wireshark
+
+
+
+
+ <h1>Capture</h1>
+ <h1>Capture</h1>
+
+
+
+ <h1>Capture Help</h1>
+ <h1>Aide Capture</h1>
+
+
+
+ <h1>Files</h1>
+ <h1>Fichier</h1>
+
+
+
+ <h1>Online</h1>
+ <h1>En Ligne</h1>
+
+
+
+ not found)
+ non trouvé)
+
+
+
+ MainWindow
+
+
+ Wireshark
+
+
+
+
+ File
+ Fichier
+
+
+
+ Open Recent
+ Dernier fichier ouvert
+
+
+
+ Edit
+ Editer
+
+
+
+ Capture
+ Capturer
+
+
+
+ toolBar
+ Bar d'Outils
+
+
+
+ Open
+ Ouvrir
+
+
+
+ Ctrl+O
+
+
+
+
+ Quit
+ Quitter
+
+
+
+ Ctrl+Q
+
+
+
+
+ Interfaces
+ Interfaces
+
+
+
+ Start
+ Démarrer
+
+
+
+ Start capturing packets
+ Démarrer la capture de paquet
+
+
+
+ Ctrl+K
+
+
+
+
+ Stop
+ Arreter
+
+
+
+ Stop capturing packets
+ Arreter la capturer de paquet
+
+
+
+ Close
+ Fermer
+
+
+
+ Ctrl+W
+
+
+
+
+ No files found
+ Pas de fichier trouvé
+
+
+
+ Wireshark: Open Capture File
+
+
+
+
+ Clear Menu
+ Effacer menu
+
+
+
+ ProtoTree
+
+
+ Packet details
+ Détail du paquet
+
+
+
+ , 1 byte
+ , 1 octet
+
+
+
+ , %1 bytes
+ , %1 octets
+
+
+
+ QObject
+
+
+ Ready to load or capture
+ Prêt pour charger ou capturer
+
+
+
+ Ready to load file
+ Prêt pour charger un fichier
+
+
+
+ Packets: %1 Displayed: %2 Marked: %3
+ Paquets: %1 Affichés: %2 Marqués: %3
+
+
+
+ Dropped: %1
+
+
+
+
+ Ignored: %1
+
+
+
+
+ No Packets
+
+
+
+
Index: ui/qt/display_filter_edit.cpp
===================================================================
--- ui/qt/display_filter_edit.cpp (révision 41338)
+++ ui/qt/display_filter_edit.cpp (copie de travail)
@@ -88,7 +88,7 @@
m_syntaxState = Empty;
emptyFilterMessage = QString::fromUtf8("Apply a display filter" UTF8_HORIZONTAL_ELLIPSIS " <%1/>").arg(DEFAULT_MODIFIER);
- setAccessibleName("Dispaly filter entry");
+ setAccessibleName(tr("Display filter entry"));
// DFCombo
// Bookmark (star)
@@ -280,7 +280,7 @@
dfilter_free(dfp);
} else {
m_syntaxState = Invalid;
- QString invalidMsg("Invalid filter");
+ QString invalidMsg(tr("Invalid filter"));
if (dfilter_error_msg) {
invalidMsg.append(QString().sprintf(": %s", dfilter_error_msg));
}
Index: ui/qt/wireshark_fr.qm
===================================================================
Impossible d'afficher : fichier considéré comme binaire.
svn:mime-type = application/octet-stream
Modification de propriétés sur ui/qt/wireshark_fr.qm
___________________________________________________________________
Ajouté : svn:mime-type
+ application/octet-stream
Index: ui/qt/proto_tree.cpp
===================================================================
--- ui/qt/proto_tree.cpp (révision 41338)
+++ ui/qt/proto_tree.cpp (copie de travail)
@@ -142,7 +142,7 @@
ProtoTree::ProtoTree(QWidget *parent) :
QTreeWidget(parent)
{
- setAccessibleName("Packet details");
+ setAccessibleName(tr("Packet details"));
setFont(get_monospace_font());
connect(this, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
@@ -184,9 +184,9 @@
finfo_length = fi->length + fi->appendix_length;
if (finfo_length == 1) {
- itemInfo.append(", 1 byte");
+ itemInfo.append(tr(", 1 byte"));
} else if (finfo_length > 1) {
- itemInfo.append(QString(", %1 bytes").arg(finfo_length));
+ itemInfo.append(QString(tr(", %1 bytes")).arg(finfo_length));
}
emit protoItemUnselected();
Index: ui/qt/main.cpp
===================================================================
--- ui/qt/main.cpp (révision 41338)
+++ ui/qt/main.cpp (copie de travail)
@@ -117,6 +117,8 @@
#include
#include
#include
+#include
+#include
capture_file cfile;
@@ -655,6 +657,16 @@
int optind_initial;
int status;
+
+ //initialize language !
+
+ QString locale = QLocale::system().name();
+
+ g_log(NULL, G_LOG_LEVEL_DEBUG, "Translator %s", locale.toStdString().c_str());
+ QTranslator translator;
+ translator.load(QString(":/lang/wireshark_") + locale);
+ a.installTranslator(&translator);
+
// Hopefully we won't have to use QString::fromUtf8() in as many places.
QTextCodec *utf8codec = QTextCodec::codecForName("UTF-8");
QTextCodec::setCodecForCStrings(utf8codec);
Index: ui/qt/main_window.cpp
===================================================================
--- ui/qt/main_window.cpp (révision 41338)
+++ ui/qt/main_window.cpp (copie de travail)
@@ -148,6 +148,7 @@
// main_set_for_capture_file(TRUE);
ui->statusBar->popFileStatus();
+ //TODO:i10n
QString msg = QString().sprintf("Loading: %s", get_basename(cf->filename));
ui->statusBar->pushFileStatus(msg);
}
@@ -379,7 +380,7 @@
recentMenu->insertAction(NULL, ra);
ra = new QAction(recentMenu);
- ra->setText("Clear Menu");
+ ra->setText(tr("Clear Menu"));
recentMenu->insertAction(NULL, ra);
connect(ra, SIGNAL(triggered()), wsApp, SLOT(clearRecentItems()));
} else {
Index: ui/qt/QtShark.pro
===================================================================
--- ui/qt/QtShark.pro (révision 41338)
+++ ui/qt/QtShark.pro (copie de travail)
@@ -290,8 +290,12 @@
RESOURCES += \
toolbar.qrc \
welcome.qrc \
- display_filter.qrc
+ display_filter.qrc \
+ i10n.qrc
+TRANSLATIONS = \
+ wireshark_fr.ts
+
ICON = ../../packaging/macosx/Resources/Wireshark.icns
win32: QMAKE_CLEAN += *.pdb