mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-07-22 18:19:56 +00:00
refactor: change ui translation mechanism
This commit is contained in:
@ -18,8 +18,6 @@
|
||||
#include "extweather.h"
|
||||
#include "ui_extweather.h"
|
||||
|
||||
#include <KI18n/KLocalizedString>
|
||||
|
||||
#include <QDir>
|
||||
#include <QJsonDocument>
|
||||
#include <QSettings>
|
||||
@ -266,7 +264,6 @@ int ExtWeather::showConfiguration(QWidget *_parent, const QVariant &_args)
|
||||
auto dialog = new QDialog(_parent);
|
||||
auto ui = new Ui::ExtWeather();
|
||||
ui->setupUi(dialog);
|
||||
translate(ui);
|
||||
|
||||
ui->lineEdit_name->setText(name());
|
||||
ui->lineEdit_comment->setText(comment());
|
||||
@ -366,22 +363,3 @@ void ExtWeather::initProvider()
|
||||
|
||||
return m_providerObject->initUrl(city(), country(), ts());
|
||||
}
|
||||
|
||||
|
||||
void ExtWeather::translate(void *_ui)
|
||||
{
|
||||
auto ui = reinterpret_cast<Ui::ExtWeather *>(_ui);
|
||||
|
||||
ui->label_name->setText(i18n("Name"));
|
||||
ui->label_comment->setText(i18n("Comment"));
|
||||
ui->label_number->setText(i18n("Tag"));
|
||||
ui->label_provider->setText(i18n("Provider"));
|
||||
ui->label_city->setText(i18n("City"));
|
||||
ui->label_country->setText(i18n("Country"));
|
||||
ui->label_timestamp->setText(i18n("Timestamp"));
|
||||
ui->checkBox_image->setText(i18n("Use images"));
|
||||
ui->checkBox_active->setText(i18n("Active"));
|
||||
ui->label_schedule->setText(i18n("Schedule"));
|
||||
ui->label_socket->setText(i18n("Socket"));
|
||||
ui->label_interval->setText(i18n("Interval"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user