mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Necessary preparations for translation of Manually Added Devices
This commit is contained in:
@@ -297,4 +297,6 @@ static BaseManualDeviceEntry* SpawnE131Entry(const json& data)
|
||||
return entry;
|
||||
}
|
||||
|
||||
REGISTER_MANUAL_DEVICE_TYPE("E1.31 (including WLED)", "E131Devices", SpawnE131Entry);
|
||||
static const char* E131DeviceName = QT_TRANSLATE_NOOP("ManualDevice", "E1.31 (including WLED)");
|
||||
|
||||
REGISTER_MANUAL_DEVICE_TYPE(E131DeviceName, "E131Devices", SpawnE131Entry);
|
||||
|
||||
@@ -55,6 +55,7 @@ void ManualDevicesSettingsPage::changeEvent(QEvent *event)
|
||||
if(event->type() == QEvent::LanguageChange)
|
||||
{
|
||||
ui->retranslateUi(this);
|
||||
reloadMenu();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +132,7 @@ void ManualDevicesSettingsPage::reloadMenu()
|
||||
addDeviceMenu->clear();
|
||||
for(int i = 0; i < names.size(); ++i)
|
||||
{
|
||||
QAction* action = addDeviceMenu->addAction(QString::fromStdString(names[i]));
|
||||
QAction* action = addDeviceMenu->addAction(qApp->translate("ManualDevice", names[i].c_str()));
|
||||
action->setData(QString::fromStdString(names[i]));
|
||||
}
|
||||
}
|
||||
@@ -144,10 +145,13 @@ void ManualDevicesSettingsPage::reloadList()
|
||||
std::vector<ManualDeviceTypeBlock> blocks = ManualDevicesTypeManager::get()->getRegisteredTypes();
|
||||
for(int i = 0; i < blocks.size(); ++i)
|
||||
{
|
||||
QAction* action = addDeviceMenu->addAction(QString::fromStdString(blocks[i].name));
|
||||
action->setData(QString::fromStdString(blocks[i].name));
|
||||
|
||||
addEntries(blocks[i]);
|
||||
|
||||
/*------------------------------------------------------------*\
|
||||
| While we have all the data at hand, load in the menu as well |
|
||||
\*------------------------------------------------------------*/
|
||||
QAction* action = addDeviceMenu->addAction(qApp->translate("ManualDevice", blocks[i].name.c_str()));
|
||||
action->setData(QString::fromStdString(blocks[i].name));
|
||||
}
|
||||
|
||||
/*--------------------*\
|
||||
|
||||
@@ -74,4 +74,6 @@ static BaseManualDeviceEntry* SpawnQMKORGBSettingsEntry(const json& data)
|
||||
return entry;
|
||||
}
|
||||
|
||||
REGISTER_MANUAL_DEVICE_TYPE("QMK", "QMKOpenRGBDevices", SpawnQMKORGBSettingsEntry);
|
||||
static const char* QMKDeviceName = QT_TRANSLATE_NOOP("ManualDevice", "QMK (built with ORGB support)");
|
||||
|
||||
REGISTER_MANUAL_DEVICE_TYPE(QMKDeviceName, "QMKOpenRGBDevices", SpawnQMKORGBSettingsEntry);
|
||||
|
||||
@@ -135,4 +135,6 @@ static BaseManualDeviceEntry* SpawnSerialSettingsEntry(const json& data)
|
||||
return entry;
|
||||
}
|
||||
|
||||
REGISTER_MANUAL_DEVICE_TYPE("Serial Device", "LEDStripDevices", SpawnSerialSettingsEntry);
|
||||
static const char* SerialDeviceName = QT_TRANSLATE_NOOP("ManualDevice", "Serial Device");
|
||||
|
||||
REGISTER_MANUAL_DEVICE_TYPE(SerialDeviceName, "LEDStripDevices", SpawnSerialSettingsEntry);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user