add dynamic language change support
add "en" ts
This commit is contained in:
54
qad/sql_table/lang/qad_sql_table_en.ts
Normal file
54
qad/sql_table/lang/qad_sql_table_en.ts
Normal file
@@ -0,0 +1,54 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="en_US">
|
||||
<context>
|
||||
<name>SQLTableWidget</name>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="14"/>
|
||||
<source>SQLTableWidget</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="51"/>
|
||||
<source>Table doesn`t exists!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="182"/>
|
||||
<source>Add record</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="295"/>
|
||||
<source>Configure filters</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="339"/>
|
||||
<source>Clear</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="347"/>
|
||||
<location filename="../sql_table_widget.ui" line="350"/>
|
||||
<source>Operator AND</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.ui" line="358"/>
|
||||
<location filename="../sql_table_widget.ui" line="361"/>
|
||||
<source>Operator OR</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.cpp" line="358"/>
|
||||
<source>Remove selected</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../sql_table_widget.cpp" line="447"/>
|
||||
<source>Table "%1" doesn`t exists!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1 +1,2 @@
|
||||
lupdate ../ -ts qad_sql_table_ru.ts
|
||||
lupdate ../ -ts qad_sql_table_en.ts
|
||||
|
||||
@@ -443,6 +443,19 @@ void SQLTableWidget::timerEvent(QTimerEvent * ) {
|
||||
}
|
||||
|
||||
|
||||
void SQLTableWidget::changeEvent(QEvent * e) {
|
||||
QWidget::changeEvent(e);
|
||||
switch (e->type()) {
|
||||
case QEvent::LanguageChange:
|
||||
ui->retranslateUi(this);
|
||||
action_del->setText(tr("Remove selected"));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SQLTableWidget::setTableName(const QString & t) {
|
||||
ui->labelEmpty->setText(tr("Table \"%1\" doesn`t exists!").arg(t));
|
||||
stopTimer();
|
||||
|
||||
@@ -282,6 +282,7 @@ private:
|
||||
|
||||
bool eventFilter(QObject * o, QEvent * e);
|
||||
void timerEvent(QTimerEvent * );
|
||||
void changeEvent(QEvent * e);
|
||||
void stopTimer() {if (timer != 0) killTimer(timer); timer = 0;}
|
||||
bool checkTable();
|
||||
QStringList getTableColumns(const QString & t);
|
||||
|
||||
Reference in New Issue
Block a user