Multilanguage support using I18n (German, Spanish, French, Russian)

This commit is contained in:
morg 2022-05-25 13:07:50 +00:00 committed by Adam Honse
parent e4bb578801
commit f7f41596cc
46 changed files with 6646 additions and 124 deletions

View file

@ -99,9 +99,9 @@ QVariant DetectorTableModel::headerData(int index, Qt::Orientation orientation,
switch(index)
{
case 0:
return "Name";
return tr("Name");
case 1:
return "Enabled";
return tr("Enabled");
}
}
}

View file

@ -82,7 +82,7 @@ void OpenRGBClientInfoPage::UpdateInfo()
ui->ClientTree->setColumnWidth(1, 100);
ui->ClientTree->setColumnWidth(2, 100);
ui->ClientTree->setColumnWidth(3, 100);
ui->ClientTree->setHeaderLabels(QStringList() << "Connected Clients" << "Protocol Version" << "Save Connection" << "");
ui->ClientTree->setHeaderLabels(QStringList() << tr("Connected Clients") << tr("Protocol Version") << tr("Save Connection") << "");
/*-----------------------------------------------------*\
| Set up a signal mapper to handle disconnect buttons |
@ -157,7 +157,7 @@ void OpenRGBClientInfoPage::UpdateInfo()
| Create the disconnect buttons and connect them to the |
| signal mapper |
\*-----------------------------------------------------*/
QPushButton* new_button = new QPushButton( "Disconnect" );
QPushButton* new_button = new QPushButton(tr("Disconnect"));
ui->ClientTree->setItemWidget(new_top_item, 3, new_button);
connect(new_button, SIGNAL(clicked()), signalMapper, SLOT(map()));
@ -194,7 +194,7 @@ void OpenRGBClientInfoPage::UpdateInfo()
std::string zone_str = ResourceManager::get()->GetClients()[client_idx]->server_controllers[dev_idx]->zones[zone_idx].name + ", ";
zone_str.append(std::to_string(ResourceManager::get()->GetClients()[client_idx]->server_controllers[dev_idx]->zones[zone_idx].leds_count));
zone_str.append(" LEDs, ");
// TODO : translate
switch(ResourceManager::get()->GetClients()[client_idx]->server_controllers[dev_idx]->zones[zone_idx].type)
{
case ZONE_TYPE_SINGLE:
@ -332,4 +332,4 @@ void Ui::OpenRGBClientInfoPage::onClientSaveCheckBox_clicked(QObject * arg)
ResourceManager::get()->GetSettingsManager()->SetSettings("Client", client_settings);
ResourceManager::get()->GetSettingsManager()->SaveSettings();
}
}

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
<string>Client info page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="6">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Log console page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
<string>Device info page</string>
</property>
<layout class="QGridLayout" name="gridLayout" columnstretch="20,80">
<item row="0" column="0" alignment="Qt::AlignHCenter">
@ -66,7 +66,7 @@
<item row="0" column="1">
<widget class="QLabel" name="NameValue">
<property name="text">
<string>Name Value</string>
<string notr="true">Name Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -76,7 +76,7 @@
<item row="1" column="1">
<widget class="QLabel" name="VendorValue">
<property name="text">
<string>Vendor Value</string>
<string notr="true">Vendor Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -86,7 +86,7 @@
<item row="2" column="1">
<widget class="QLabel" name="TypeValue">
<property name="text">
<string>Type Value</string>
<string notr="true">Type Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -96,7 +96,7 @@
<item row="3" column="1">
<widget class="QLabel" name="DescriptionValue">
<property name="text">
<string>Description Value</string>
<string notr="true">Description Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -106,7 +106,7 @@
<item row="4" column="1">
<widget class="QLabel" name="VersionValue">
<property name="text">
<string>Version Value</string>
<string notr="true">Version Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -116,7 +116,7 @@
<item row="5" column="1">
<widget class="QLabel" name="LocationValue">
<property name="text">
<string>Location Value</string>
<string notr="true">Location Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@ -126,7 +126,7 @@
<item row="6" column="1">
<widget class="QLabel" name="SerialValue">
<property name="text">
<string>Serial Value</string>
<string notr="true">Serial Value</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View file

@ -13,7 +13,7 @@ static void UpdateCallback(void * this_ptr)
QMetaObject::invokeMethod(this_obj, "UpdateInterface", Qt::QueuedConnection);
}
static QString ModeDescription(const mode& m)
QString OpenRGBDevicePage::ModeDescription(const mode& m)
{
/*-----------------------------------------------------------------*\
| List of common mode names can be found on the OpenRGB Wiki: |
@ -21,14 +21,14 @@ static QString ModeDescription(const mode& m)
\*-----------------------------------------------------------------*/
static const std::unordered_map<std::string, QString> descriptions =
{
{"Direct", "Set individual LEDs to static colors. Safe for use with software-driven effects." },
{"Custom", "Set individual LEDs to static colors. Not safe for use with software-driven effects." },
{"Static", "Sets the entire device or a zone to a single color." },
{"Breathing", "Gradually fades between fully off and fully on." },
{"Flashing", "Abruptly changes between fully off and fully on." },
{"Spectrum Cycle", "Gradually cycles through the entire color spectrum. All lights on the device are the same color." },
{"Rainbow Wave", "Gradually cycles through the entire color spectrum. Produces a rainbow pattern that moves." },
{"Reactive", "Flashes lights when keys or buttons are pressed." },
{"Direct", tr("Set individual LEDs to static colors. Safe for use with software-driven effects.") },
{"Custom", tr("Set individual LEDs to static colors. Not safe for use with software-driven effects.") },
{"Static", tr("Sets the entire device or a zone to a single color.") },
{"Breathing", tr("Gradually fades between fully off and fully on.") },
{"Flashing", tr("Abruptly changes between fully off and fully on.") },
{"Spectrum Cycle", tr("Gradually cycles through the entire color spectrum. All lights on the device are the same color.") },
{"Rainbow Wave", tr("Gradually cycles through the entire color spectrum. Produces a rainbow pattern that moves.") },
{"Reactive", tr("Flashes lights when keys or buttons are pressed.") },
};
/*-----------------------------------------------------------------*\
@ -165,7 +165,7 @@ void Ui::OpenRGBDevicePage::on_ZoneBox_currentIndexChanged(int /*index*/)
{
if(device->leds.size() > 1)
{
ui->LEDBox->addItem("Entire Device");
ui->LEDBox->addItem(tr("Entire Device"));
ui->LEDBox->setEnabled(1);
}
else
@ -197,7 +197,7 @@ void Ui::OpenRGBDevicePage::on_ZoneBox_currentIndexChanged(int /*index*/)
// Disable led box if there's only one LED anyway
if(device->zones[selected_zone].leds_count > 1)
{
ui->LEDBox->addItem("Entire Zone");
ui->LEDBox->addItem(tr("Entire Zone"));
ui->LEDBox->setEnabled(1);
}
else
@ -533,20 +533,20 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
if(supports_dir_lr)
{
ui->DirectionBox->addItem("Left");
ui->DirectionBox->addItem("Right");
ui->DirectionBox->addItem(tr("Left"));
ui->DirectionBox->addItem(tr("Right"));
}
if(supports_dir_ud)
{
ui->DirectionBox->addItem("Up");
ui->DirectionBox->addItem("Down");
ui->DirectionBox->addItem(tr("Up"));
ui->DirectionBox->addItem(tr("Down"));
}
if(supports_dir_hv)
{
ui->DirectionBox->addItem("Horizontal");
ui->DirectionBox->addItem("Vertical");
ui->DirectionBox->addItem(tr("Horizontal"));
ui->DirectionBox->addItem(tr("Vertical"));
}
if(supports_dir_lr || supports_dir_ud || supports_dir_hv)
@ -642,17 +642,17 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
if(automatic_save)
{
ui->DeviceSaveButton->setText("Saved To Device");
ui->DeviceSaveButton->setText(tr("Saved To Device"));
ui->DeviceSaveButton->setEnabled(false);
}
else if(manual_save)
{
ui->DeviceSaveButton->setText("Save To Device");
ui->DeviceSaveButton->setText(tr("Save To Device"));
ui->DeviceSaveButton->setEnabled(true);
}
else
{
ui->DeviceSaveButton->setText("Saving Not Supported");
ui->DeviceSaveButton->setText(tr("Saving Not Supported"));
ui->DeviceSaveButton->setEnabled(false);
}
@ -683,7 +683,7 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
if(device->zones.size() > 1)
{
ui->ZoneBox->setEnabled(1);
ui->ZoneBox->addItem("All Zones");
ui->ZoneBox->addItem(tr("All Zones"));
}
else
{
@ -714,7 +714,7 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
case MODE_COLORS_MODE_SPECIFIC:
ui->ZoneBox->blockSignals(true);
ui->ZoneBox->clear();
ui->ZoneBox->addItem("Mode Specific");
ui->ZoneBox->addItem(tr("Mode Specific"));
ui->ZoneBox->blockSignals(false);
ui->LEDBox->blockSignals(true);
@ -732,6 +732,7 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
for(unsigned int i = 0; i < device->modes[selected_mode].colors.size(); i++)
{
char id_buf[32];
// TODO: translate
snprintf(id_buf, 16, "Mode Color %u", i);
ui->LEDBox->addItem(id_buf);
}
@ -1039,6 +1040,7 @@ void Ui::OpenRGBDevicePage::on_DeviceViewBox_selectionChanged(QVector<int> indic
{
ui->LEDBox->removeItem(device->leds.size() + 1);
}
// TODO: translate
ui->LEDBox->addItem("Multiple (" + QVariant(indices.size()).toString() + ")");
ui->LEDBox->setCurrentIndex(device->leds.size() + 1);
MultipleSelected = 1;

View file

@ -73,6 +73,8 @@ private:
bool autoUpdateEnabled();
QString ModeDescription(const mode& m);
signals:
void SetAllDevices(unsigned char red, unsigned char green, unsigned char blue);
void SaveSizeProfile();

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
<string>Device page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="6" column="5">

View file

@ -268,52 +268,52 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op
trayIcon = new QSystemTrayIcon(this);
QAction* actionShowHide = new QAction("Show/Hide", this);
QAction* actionShowHide = new QAction(tr("Show/Hide"), this);
connect(actionShowHide, SIGNAL(triggered()), this, SLOT(on_ShowHide()));
trayIconMenu->addAction(actionShowHide);
profileMenu = new QMenu("Profiles", this);
profileMenu = new QMenu(tr("Profiles"), this);
trayIconMenu->addMenu(profileMenu);
QMenu* quickColorsMenu = new QMenu("Quick Colors", this);
QMenu* quickColorsMenu = new QMenu(tr("Quick Colors"), this);
QAction* actionQuickRed = new QAction("Red", this);
QAction* actionQuickRed = new QAction(tr("Red"), this);
connect(actionQuickRed, SIGNAL(triggered()), this, SLOT(on_QuickRed()));
quickColorsMenu->addAction(actionQuickRed);
QAction* actionQuickYellow = new QAction("Yellow", this);
QAction* actionQuickYellow = new QAction(tr("Yellow"), this);
connect(actionQuickYellow, SIGNAL(triggered()), this, SLOT(on_QuickYellow()));
quickColorsMenu->addAction(actionQuickYellow);
QAction* actionQuickGreen = new QAction("Green", this);
QAction* actionQuickGreen = new QAction(tr("Green"), this);
connect(actionQuickGreen, SIGNAL(triggered()), this, SLOT(on_QuickGreen()));
quickColorsMenu->addAction(actionQuickGreen);
QAction* actionQuickCyan = new QAction("Cyan", this);
QAction* actionQuickCyan = new QAction(tr("Cyan"), this);
connect(actionQuickCyan, SIGNAL(triggered()), this, SLOT(on_QuickCyan()));
quickColorsMenu->addAction(actionQuickCyan);
QAction* actionQuickBlue = new QAction("Blue", this);
QAction* actionQuickBlue = new QAction(tr("Blue"), this);
connect(actionQuickBlue, SIGNAL(triggered()), this, SLOT(on_QuickBlue()));
quickColorsMenu->addAction(actionQuickBlue);
QAction* actionQuickMagenta = new QAction("Magenta", this);
QAction* actionQuickMagenta = new QAction(tr("Magenta"), this);
connect(actionQuickMagenta, SIGNAL(triggered()), this, SLOT(on_QuickMagenta()));
quickColorsMenu->addAction(actionQuickMagenta);
QAction* actionQuickWhite = new QAction("White", this);
QAction* actionQuickWhite = new QAction(tr("White"), this);
connect(actionQuickWhite, SIGNAL(triggered()), this, SLOT(on_QuickWhite()));
quickColorsMenu->addAction(actionQuickWhite);
trayIconMenu->addMenu(quickColorsMenu);
QAction* actionLightsOff = new QAction("Lights Off", this);
QAction* actionLightsOff = new QAction(tr("Lights Off"), this);
actionLightsOff->setObjectName("ActionLightsOff");
connect(actionLightsOff, SIGNAL(triggered()), this, SLOT(on_LightsOff()));
trayIconMenu->addAction(actionLightsOff);
actionExit = new QAction( "Exit", this );
actionExit = new QAction(tr("Exit"), this );
connect( actionExit, SIGNAL( triggered() ), this, SLOT( on_Exit() ));
trayIconMenu->addAction(actionExit);
@ -552,7 +552,7 @@ void OpenRGBDialog2::AddPluginsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* PluginTabLabel = new TabLabel(PluginsLabelString, "Plugins");
TabLabel* PluginTabLabel = new TabLabel(PluginsLabelString, tr("Plugins"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, PluginTabLabel);
}
@ -580,7 +580,7 @@ void OpenRGBDialog2::AddSoftwareInfoPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SoftwareTabLabel = new TabLabel(SoftwareLabelString, "Software");
TabLabel* SoftwareTabLabel = new TabLabel(SoftwareLabelString, tr("Software"));
ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SoftwareTabLabel);
}
@ -608,7 +608,7 @@ void OpenRGBDialog2::AddSupportedDevicesPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SupportedTabLabel = new TabLabel(SettingsLabelString, "Supported Devices");
TabLabel* SupportedTabLabel = new TabLabel(SettingsLabelString, tr("Supported Devices"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SupportedTabLabel);
}
@ -637,7 +637,7 @@ void OpenRGBDialog2::AddSettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "General Settings");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("General Settings"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
@ -670,7 +670,7 @@ void OpenRGBDialog2::AddE131SettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "E1.31 Devices");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("E1.31 Devices"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
}
@ -726,7 +726,7 @@ void OpenRGBDialog2::AddPhilipsHueSettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "Philips Hue Devices");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("Philips Hue Devices"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
}
@ -754,7 +754,7 @@ void OpenRGBDialog2::AddPhilipsWizSettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "Philips Wiz Devices");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("Philips Wiz Devices"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
}
@ -782,7 +782,7 @@ void OpenRGBDialog2::AddQMKORGBSettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "OpenRGB QMK Protocol");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("OpenRGB QMK Protocol"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
}
@ -810,7 +810,7 @@ void OpenRGBDialog2::AddSerialSettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "Serial Devices");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("Serial Devices"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
}
@ -838,7 +838,7 @@ void OpenRGBDialog2::AddYeelightSettingsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, "Yeelight Devices");
TabLabel* SettingsTabLabel = new TabLabel(SettingsLabelString, tr("Yeelight Devices"));
ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
}
@ -1080,7 +1080,7 @@ void OpenRGBDialog2::AddI2CToolsPage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* SMBusToolsTabLabel = new TabLabel(SMBusToolsLabelString, "SMBus Tools");
TabLabel* SMBusToolsTabLabel = new TabLabel(SMBusToolsLabelString, tr("SMBus Tools"));
ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SMBusToolsTabLabel);
}
@ -1093,7 +1093,7 @@ void OpenRGBDialog2::AddClientTab()
if(ClientInfoPage == NULL)
{
ClientInfoPage = new OpenRGBClientInfoPage();
ui->MainTabBar->insertTab(2, ClientInfoPage, "SDK Client");
ui->MainTabBar->insertTab(2, ClientInfoPage, tr("SDK Client"));
}
}
@ -1114,7 +1114,7 @@ void OpenRGBDialog2::AddServerTab()
| Add server information tab if there is a server |
\*-----------------------------------------------------*/
OpenRGBServerInfoPage *ServerInfoPage = new OpenRGBServerInfoPage(ResourceManager::get()->GetServer());
ui->MainTabBar->insertTab(2, ServerInfoPage, "SDK Server");
ui->MainTabBar->insertTab(2, ServerInfoPage, tr("SDK Server"));
}
void OpenRGBDialog2::ClearDevicesList()
@ -1606,7 +1606,7 @@ void Ui::OpenRGBDialog2::on_ButtonDeleteProfile_clicked()
| Confirm we want to delete the profile |
\*---------------------------------------------------------*/
QMessageBox::StandardButton reply;
reply = QMessageBox::question(this, "Delete Profile", "Do you really want to delete this profile?", QMessageBox::Yes|QMessageBox::No);
reply = QMessageBox::question(this, tr("Delete Profile"), tr("Do you really want to delete this profile?"), QMessageBox::Yes|QMessageBox::No);
/*---------------------------------------------------------*\
| Load the profile |
@ -1876,7 +1876,7 @@ void Ui::OpenRGBDialog2::AddConsolePage()
/*-----------------------------------------------------*\
| Create the tab label |
\*-----------------------------------------------------*/
TabLabel* ConsoleTabLabel = new TabLabel(ConsoleLabelString, "Log Console");
TabLabel* ConsoleTabLabel = new TabLabel(ConsoleLabelString, tr("Log Console"));
ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, ConsoleTabLabel);
}

View file

@ -9,18 +9,18 @@ OpenRGBE131SettingsEntry::OpenRGBE131SettingsEntry(QWidget *parent) :
{
ui->setupUi(this);
ui->TypeComboBox->addItem("Single");
ui->TypeComboBox->addItem("Linear");
ui->TypeComboBox->addItem("Matrix");
ui->TypeComboBox->addItem(tr("Single"));
ui->TypeComboBox->addItem(tr("Linear"));
ui->TypeComboBox->addItem(tr("Matrix"));
ui->MatrixOrderComboBox->addItem("Horizontal Top Left");
ui->MatrixOrderComboBox->addItem("Horizontal Top Right");
ui->MatrixOrderComboBox->addItem("Horizontal Bottom Left");
ui->MatrixOrderComboBox->addItem("Horizontal Bottom Right");
ui->MatrixOrderComboBox->addItem("Vertical Top Left");
ui->MatrixOrderComboBox->addItem("Vertical Top Right");
ui->MatrixOrderComboBox->addItem("Vertical Bottom Left");
ui->MatrixOrderComboBox->addItem("Vertical Bottom Right");
ui->MatrixOrderComboBox->addItem(tr("Horizontal Top Left"));
ui->MatrixOrderComboBox->addItem(tr("Horizontal Top Right"));
ui->MatrixOrderComboBox->addItem(tr("Horizontal Bottom Left"));
ui->MatrixOrderComboBox->addItem(tr("Horizontal Bottom Right"));
ui->MatrixOrderComboBox->addItem(tr("Vertical Top Left"));
ui->MatrixOrderComboBox->addItem(tr("Vertical Top Right"));
ui->MatrixOrderComboBox->addItem(tr("Vertical Bottom Left"));
ui->MatrixOrderComboBox->addItem(tr("Vertical Bottom Right"));
ui->RGBOrderComboBox->addItem("RGB");
ui->RGBOrderComboBox->addItem("RBG");

View file

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>E131 settings entry</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>E131 settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Philips Hue settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="1">

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>190</width>
<height>59</height>
<height>68</height>
</rect>
</property>
<property name="sizePolicy">
@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Philips WIZ settings entry</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Philips WIZ settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Plugin container</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Plugins entry</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
@ -37,7 +37,7 @@
<item row="2" column="2">
<widget class="QLabel" name="PathValue">
<property name="text">
<string>Path Value</string>
<string notr="true">Path Value</string>
</property>
</widget>
</item>
@ -50,7 +50,7 @@
</sizepolicy>
</property>
<property name="text">
<string>Description Value</string>
<string notr="true">Description Value</string>
</property>
</widget>
</item>
@ -96,21 +96,21 @@
</sizepolicy>
</property>
<property name="text">
<string>Name Value</string>
<string notr="true">Name Value</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="VersionValue">
<property name="text">
<string>Version Value</string>
<string notr="true">Version Value</string>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="CommitValue">
<property name="text">
<string>Commit Value</string>
<string notr="true">Commit Value</string>
</property>
</widget>
</item>
@ -138,7 +138,7 @@
<item row="5" column="2">
<widget class="QLabel" name="URLValue">
<property name="text">
<string>URL Value</string>
<string notr="true">URL Value</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>

View file

@ -87,7 +87,7 @@ void Ui::OpenRGBPluginsPage::on_InstallPluginButton_clicked()
/*-----------------------------------------------------*\
| Open a file selection prompt to choose the plugin file|
\*-----------------------------------------------------*/
QString install_file = QFileDialog::getOpenFileName(this, "Install OpenRGB Plugin", "", "Plugin files (*.dll; *.dylib; *.so; *.so.*)");
QString install_file = QFileDialog::getOpenFileName(this, tr("Install OpenRGB Plugin"), "", tr("Plugin files (*.dll; *.dylib; *.so; *.so.*)"));
bool installed = InstallPlugin(install_file.toStdString());
@ -125,7 +125,7 @@ bool Ui::OpenRGBPluginsPage::InstallPlugin(std::string install_file)
{
QMessageBox::StandardButton reply;
reply = QMessageBox::question(this, "Replace Plugin", "A plugin with this filename is already installed. Are you sure you want to replace this plugin?", QMessageBox::Yes | QMessageBox::No);
reply = QMessageBox::question(this, tr("Replace Plugin"), tr("A plugin with this filename is already installed. Are you sure you want to replace this plugin?"), QMessageBox::Yes | QMessageBox::No);
if(reply != QMessageBox::Yes)
{
@ -163,7 +163,7 @@ void Ui::OpenRGBPluginsPage::on_RemovePluginButton_clicked()
/*-----------------------------------------------------*\
| Confirm plugin removal with message box |
\*-----------------------------------------------------*/
reply = QMessageBox::question(this, "Remove Plugin", "Are you sure you want to remove this plugin?", QMessageBox::Yes | QMessageBox::No);
reply = QMessageBox::question(this, tr("Remove Plugin"), tr("Are you sure you want to remove this plugin?"), QMessageBox::Yes | QMessageBox::No);
if(reply != QMessageBox::Yes)
{

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Plugins page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>QMK settings entry</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>QMK Settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Serial settings entry</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Serial settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -34,21 +34,21 @@ void OpenRGBServerInfoPage::UpdateInfo()
if(network_server->GetListening() && !network_server->GetOnline())
{
ui->ServerStatusValue->setText("Stopping...");
ui->ServerStatusValue->setText(tr("Stopping..."));
ui->ServerStartButton->setEnabled(false);
ui->ServerStopButton->setEnabled(false);
ui->ServerPortValue->setEnabled(false);
}
else if(network_server->GetListening())
{
ui->ServerStatusValue->setText("Online");
ui->ServerStatusValue->setText(tr("Online"));
ui->ServerStartButton->setEnabled(false);
ui->ServerStopButton->setEnabled(true);
ui->ServerPortValue->setEnabled(false);
}
else
{
ui->ServerStatusValue->setText("Offline");
ui->ServerStatusValue->setText(tr("Offline"));
ui->ServerStartButton->setEnabled(true);
ui->ServerStopButton->setEnabled(false);
ui->ServerPortValue->setEnabled(true);
@ -56,7 +56,7 @@ void OpenRGBServerInfoPage::UpdateInfo()
ui->ServerClientTree->clear();
ui->ServerClientTree->setColumnCount(3);
ui->ServerClientTree->setHeaderLabels(QStringList() << "Client IP" << "Protocol Version" << "Client Name");
ui->ServerClientTree->setHeaderLabels(QStringList() << tr("Client IP") << tr("Protocol Version") << tr("Client Name"));
for(unsigned int client_idx = 0; client_idx < network_server->GetNumClients(); client_idx++)
{
QTreeWidgetItem * new_item = new QTreeWidgetItem();

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
<string>Server info page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="3">

View file

@ -433,7 +433,7 @@ void OpenRGBSettingsPage::ConfigureAutoStart()
if (!auto_start.EnableAutoStart(auto_start_info))
{
ui->AutoStartStatusLabel->setText("A problem occurred enabling Start At Login.");
ui->AutoStartStatusLabel->setText(tr("A problem occurred enabling Start At Login."));
ui->AutoStartStatusLabel->show();
SetAutoStartVisibility(true);
}

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1" colspan="6">

View file

@ -11,13 +11,13 @@
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
<string>Software info page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="1">
<widget class="QLabel" name="VersionValue">
<property name="text">
<string>Version Value</string>
<string notr="true">Version Value</string>
</property>
</widget>
</item>
@ -38,14 +38,14 @@
<item row="4" column="1">
<widget class="QLabel" name="GitBranchValue">
<property name="text">
<string>Git Branch Value</string>
<string notr="true">Git Branch Value</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="GitCommitDateValue">
<property name="text">
<string>Git Commit Date Value</string>
<string notr="true">Git Commit Date Value</string>
</property>
</widget>
</item>
@ -73,14 +73,14 @@
<item row="1" column="1">
<widget class="QLabel" name="BuildDateValue">
<property name="text">
<string>Build Date Value</string>
<string notr="true">Build Date Value</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLabel" name="GitCommitIDValue">
<property name="text">
<string>Git Commit ID Value</string>
<string notr="true">Git Commit ID Value</string>
</property>
<property name="textInteractionFlags">
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Frame</string>
<string>System info page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">

View file

@ -36,8 +36,8 @@ void OpenRGBYeelightSettingsEntry::on_HostIPChooserButton_clicked()
inp.setOptions(QInputDialog::UseListViewForComboBoxItems);
inp.setComboBoxItems(in_addr_list);
inp.setWindowTitle("Choose an IP...");
inp.setLabelText("Choose the correct IP for the host");
inp.setWindowTitle(tr("Choose an IP..."));
inp.setLabelText(tr("Choose the correct IP for the host"));
if(!inp.exec())
{

View file

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Yeelight settings entry</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" colspan="2">

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Yeelight settings page</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0">

View file

@ -63,7 +63,7 @@ void OpenRGBZonesBulkResizer::RunChecks(QWidget *parent)
if(!zones.empty())
{
QDialog* dialog = new QDialog(parent);
dialog->setWindowTitle("Resize the zones");
dialog->setWindowTitle(tr("Resize the zones"));
dialog->setMinimumSize(600,480);
dialog->setModal(true);
@ -101,7 +101,7 @@ OpenRGBZonesBulkResizer::OpenRGBZonesBulkResizer(QWidget *parent, const std::ve
ui->zones_table->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
ui->zones_table->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Fixed);
ui->zones_table->setHorizontalHeaderLabels({"Controller", "Zone", "Size"});
ui->zones_table->setHorizontalHeaderLabels({tr("Controller"), tr("Zone"), tr("Size")});
/*---------------------------------------------------------*\
| Fill the table with widgets (labels, spinbox) |

View file

@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Zones resizer</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="0" colspan="2">

View file

@ -17,7 +17,7 @@
</sizepolicy>
</property>
<property name="windowTitle">
<string>Form</string>
<string>Tab Label</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="sizeConstraint">

1285
qt/i18n/OpenRGB_de.ts Normal file

File diff suppressed because it is too large Load diff

1284
qt/i18n/OpenRGB_en.ts Normal file

File diff suppressed because it is too large Load diff

1286
qt/i18n/OpenRGB_es.ts Normal file

File diff suppressed because it is too large Load diff

1284
qt/i18n/OpenRGB_fr.ts Normal file

File diff suppressed because it is too large Load diff

1294
qt/i18n/OpenRGB_ru.ts Normal file

File diff suppressed because it is too large Load diff

9
qt/languages.qrc Normal file
View file

@ -0,0 +1,9 @@
<RCC>
<qresource prefix="/">
<file>i18n/OpenRGB_en.qm</file>
<file>i18n/OpenRGB_fr.qm</file>
<file>i18n/OpenRGB_es.qm</file>
<file>i18n/OpenRGB_de.qm</file>
<file>i18n/OpenRGB_ru.qm</file>
</qresource>
</RCC>