Misc work in translation

Update translations
Fix the translation in t55xxtab
(QTranslator must be created before wigets)
Reduce unnecessary translations
master
wh201906 2 years ago
parent 92d704bc96
commit b788d6a15f
No known key found for this signature in database

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

@ -128,7 +128,7 @@ bool Util::chooseLanguage(QSettings* guiSettings, QMainWindow* window)
return false;
if(langMap[selectedText] == "(ext)")
{
QString extPath = QFileDialog::getOpenFileName(nullptr, tr("Select the translation file:"));
QString extPath = QFileDialog::getOpenFileName(window, tr("Select the translation file:"));
if(extPath.isEmpty())
return false;

@ -59,7 +59,7 @@ public:
static ClientType getClientType();
static int rawTabIndex;
static QDockWidget* rawDockPtr;
static bool chooseLanguage(QSettings *guiSettings, QMainWindow *window);
static bool chooseLanguage(QSettings *guiSettings, QMainWindow *window = nullptr);
public slots:
void processOutput(const QString& output);
static void setClientType(Util::ClientType clientType);

@ -23,7 +23,6 @@ int main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QApplication a(argc, argv);
MainWindow w;
QSettings* settings = new QSettings("GUIsettings.ini", QSettings::IniFormat);
settings->setIniCodec("UTF-8");
@ -36,7 +35,7 @@ int main(int argc, char *argv[])
settings->endGroup();
if(languageName == "")
{
if(Util::chooseLanguage(settings, &w))
if(Util::chooseLanguage(settings))
{
settings->beginGroup("language");
languageName = settings->value("name").toString();
@ -53,11 +52,13 @@ int main(int argc, char *argv[])
}
else
languageFile = ":/i18n/" + languageName + ".qm";
QTranslator* translator = new QTranslator(&w);
// Note that the translator must be created before the application's widgets.
QTranslator* translator = new QTranslator();
if(translator->load(languageFile))
a.installTranslator(translator);
else
QMessageBox::information(&w, "Error", "Can't load " + languageFile + " as translation file.");
QMessageBox::information(nullptr, "Error", "Can't load " + languageFile + " as translation file.");
QFile* themeFile = new QFile();
QTextStream* themeStream = new QTextStream();
@ -87,6 +88,7 @@ int main(int argc, char *argv[])
delete settings;
settings = nullptr;
MainWindow w;
w.initUI();
w.show();
return a.exec();

@ -1286,7 +1286,7 @@
</sizepolicy>
</property>
<property name="text">
<string>125k</string>
<string notr="true">125k</string>
</property>
<property name="checked">
<bool>true</bool>
@ -1302,7 +1302,7 @@
</sizepolicy>
</property>
<property name="text">
<string>134k</string>
<string notr="true">134k</string>
</property>
</widget>
</item>
@ -3192,7 +3192,7 @@ or the communication between a tag and a reader.</string>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/wh201906/Proxmark3GUI/releases/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/wh201906/Proxmark3GUI/releases/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/wh201906/Proxmark3GUI/releases/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/wh201906/Proxmark3GUI/releases/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
@ -3222,7 +3222,7 @@ or the communication between a tag and a reader.</string>
</sizepolicy>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/wh201906/Proxmark3GUI/issues/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/wh201906/Proxmark3GUI/issues/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string notr="true">&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/wh201906/Proxmark3GUI/issues/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;https://github.com/wh201906/Proxmark3GUI/issues/&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>

@ -35,7 +35,7 @@
<item>
<widget class="QCheckBox" name="uBox">
<property name="text">
<string>u</string>
<string notr="true">u</string>
</property>
</widget>
</item>
@ -102,7 +102,7 @@
<item>
<widget class="QCheckBox" name="atqaBox">
<property name="text">
<string>--atqa</string>
<string notr="true">--atqa</string>
</property>
</widget>
</item>
@ -169,7 +169,7 @@
<item>
<widget class="QCheckBox" name="sakBox">
<property name="text">
<string>--sak</string>
<string notr="true">--sak</string>
</property>
</widget>
</item>
@ -236,7 +236,7 @@
<item>
<widget class="QCheckBox" name="nBox">
<property name="text">
<string>n</string>
<string notr="true">n</string>
</property>
</widget>
</item>
@ -303,7 +303,7 @@
<item>
<widget class="QCheckBox" name="iBox">
<property name="text">
<string>i</string>
<string notr="true">i</string>
</property>
</widget>
</item>
@ -354,7 +354,7 @@
<item>
<widget class="QCheckBox" name="xBox">
<property name="text">
<string>x</string>
<string notr="true">x</string>
</property>
</widget>
</item>
@ -405,7 +405,7 @@
<item>
<widget class="QCheckBox" name="eBox">
<property name="text">
<string>e</string>
<string notr="true">e</string>
</property>
</widget>
</item>
@ -456,7 +456,7 @@
<item>
<widget class="QCheckBox" name="fBox">
<property name="text">
<string>f</string>
<string notr="true">f</string>
</property>
</widget>
</item>
@ -523,7 +523,7 @@
<item>
<widget class="QCheckBox" name="rBox">
<property name="text">
<string>r</string>
<string notr="true">r</string>
</property>
</widget>
</item>
@ -574,7 +574,7 @@
<item>
<widget class="QCheckBox" name="vBox">
<property name="text">
<string>-v</string>
<string notr="true">-v</string>
</property>
</widget>
</item>

@ -25,7 +25,7 @@
<item>
<widget class="QRadioButton" name="size4Button">
<property name="text">
<string>4</string>
<string notr="true">4</string>
</property>
<property name="checked">
<bool>true</bool>
@ -35,7 +35,7 @@
<item>
<widget class="QRadioButton" name="size16Button">
<property name="text">
<string>16</string>
<string notr="true">16</string>
</property>
</widget>
</item>
@ -131,7 +131,7 @@
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Cx0</string>
<string notr="true">Cx0</string>
</property>
</widget>
</item>
@ -152,7 +152,7 @@
<item>
<widget class="QLabel" name="label_7">
<property name="text">
<string>Cx1</string>
<string notr="true">Cx1</string>
</property>
</widget>
</item>
@ -173,7 +173,7 @@
<item>
<widget class="QLabel" name="label_8">
<property name="text">
<string>Cx2</string>
<string notr="true">Cx2</string>
</property>
</widget>
</item>
@ -194,7 +194,7 @@
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Cx3</string>
<string notr="true">Cx3</string>
</property>
</widget>
</item>
@ -214,84 +214,84 @@
<item row="0" column="0">
<widget class="QLabel" name="C10Label">
<property name="text">
<string>C10</string>
<string notr="true">C10</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="C11Label">
<property name="text">
<string>C11</string>
<string notr="true">C11</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="C12Label">
<property name="text">
<string>C12</string>
<string notr="true">C12</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QLabel" name="C13Label">
<property name="text">
<string>C13</string>
<string notr="true">C13</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="C20Label">
<property name="text">
<string>C20</string>
<string notr="true">C20</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="C21Label">
<property name="text">
<string>C21</string>
<string notr="true">C21</string>
</property>
</widget>
</item>
<item row="1" column="2">
<widget class="QLabel" name="C22Label">
<property name="text">
<string>C22</string>
<string notr="true">C22</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QLabel" name="C23Label">
<property name="text">
<string>C23</string>
<string notr="true">C23</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="C30Label">
<property name="text">
<string>C30</string>
<string notr="true">C30</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="C31Label">
<property name="text">
<string>C31</string>
<string notr="true">C31</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="C32Label">
<property name="text">
<string>C32</string>
<string notr="true">C32</string>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="C33Label">
<property name="text">
<string>C33</string>
<string notr="true">C33</string>
</property>
</widget>
</item>

@ -19,7 +19,7 @@
<item row="0" column="0">
<widget class="QLabel" name="uIDLabel">
<property name="text">
<string>UID:</string>
<string notr="true">UID:</string>
</property>
</widget>
</item>
@ -29,7 +29,7 @@
<item row="1" column="0">
<widget class="QLabel" name="ATQALabel">
<property name="text">
<string>ATQA:</string>
<string notr="true">ATQA:</string>
</property>
</widget>
</item>
@ -39,7 +39,7 @@
<item row="2" column="0">
<widget class="QLabel" name="SAKLabel">
<property name="text">
<string>SAK:</string>
<string notr="true">SAK:</string>
</property>
</widget>
</item>

@ -29,14 +29,14 @@
<item>
<widget class="QRadioButton" name="Clone_T5555Button">
<property name="text">
<string>T5555</string>
<string notr="true">T5555</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="Clone_T55x7Button">
<property name="text">
<string>T55x7</string>
<string notr="true">T55x7</string>
</property>
<property name="checked">
<bool>true</bool>
@ -61,7 +61,7 @@
<item>
<widget class="QGroupBox" name="Clone_EM410xGroupBox">
<property name="title">
<string>EM410x</string>
<string notr="true">EM410x</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>

Loading…
Cancel
Save