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

master
morg 4 years ago committed by Adam Honse
parent e4bb578801
commit f7f41596cc

4
.gitignore vendored

@ -114,3 +114,7 @@ compile_commands.json
# Clang tooling files # Clang tooling files
compile_commands.json compile_commands.json
# Generated i18n files
*.qm

@ -27,6 +27,9 @@ before_script:
- export QT_SELECT=qt5 - export QT_SELECT=qt5
- export APPIMAGE_EXTRACT_AND_RUN=1 - export APPIMAGE_EXTRACT_AND_RUN=1
.generate-qm-files: &generate-qm-files
- lrelease OpenRGB.pro
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
# Linux (AppImage) 32-bit Build Target # # Linux (AppImage) 32-bit Build Target #
#-----------------------------------------------------------------------# #-----------------------------------------------------------------------#
@ -36,6 +39,7 @@ before_script:
stage: build stage: build
script: script:
- export $(dpkg-architecture) - export $(dpkg-architecture)
- *generate-qm-files
- ./scripts/build-appimage.sh - ./scripts/build-appimage.sh
artifacts: artifacts:
@ -55,6 +59,7 @@ before_script:
stage: build stage: build
script: script:
- export $(dpkg-architecture) - export $(dpkg-architecture)
- *generate-qm-files
- ./scripts/build-appimage.sh - ./scripts/build-appimage.sh
artifacts: artifacts:
@ -74,6 +79,7 @@ before_script:
stage: build stage: build
script: script:
- dpkg-architecture -l - dpkg-architecture -l
- *generate-qm-files
- dpkg-buildpackage --target-arch i386 -us -B - dpkg-buildpackage --target-arch i386 -us -B
- rm -v ../openrgb-dbgsym*.deb - rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./ - mv -v ../openrgb*.deb ./
@ -95,6 +101,7 @@ before_script:
stage: build stage: build
script: script:
- dpkg-architecture -l - dpkg-architecture -l
- *generate-qm-files
- dpkg-buildpackage -us -B - dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb - rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./ - mv -v ../openrgb*.deb ./
@ -116,6 +123,7 @@ before_script:
stage: build stage: build
script: script:
- dpkg-architecture -l - dpkg-architecture -l
- *generate-qm-files
- dpkg-buildpackage --target-arch i386 -us -B - dpkg-buildpackage --target-arch i386 -us -B
- rm -v ../openrgb-dbgsym*.deb - rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./ - mv -v ../openrgb*.deb ./
@ -137,6 +145,7 @@ before_script:
stage: build stage: build
script: script:
- dpkg-architecture -l - dpkg-architecture -l
- *generate-qm-files
- dpkg-buildpackage -us -B - dpkg-buildpackage -us -B
- rm -v ../openrgb-dbgsym*.deb - rm -v ../openrgb-dbgsym*.deb
- mv -v ../openrgb*.deb ./ - mv -v ../openrgb*.deb ./
@ -156,7 +165,7 @@ before_script:
image: fedora:35 image: fedora:35
stage: build stage: build
script: script:
- dnf install rpmdevtools dnf-plugins-core -y - dnf install rpmdevtools dnf-plugins-core -y
- rpmdev-setuptree - rpmdev-setuptree
- ls /root/ - ls /root/
- cp fedora/OpenRGB.spec /root/rpmbuild/SPECS - cp fedora/OpenRGB.spec /root/rpmbuild/SPECS
@ -380,6 +389,10 @@ before_script:
- Pop-Location - Pop-Location
- _fold_final_ - _fold_final_
- _fold_start_ 'Generate qm files'
- .\_qt\5.15.0\msvc2019\bin\lrelease OpenRGB.pro
- _fold_final_
- _fold_start_ 'run qmake and generate the msvc nmake makefile' - _fold_start_ 'run qmake and generate the msvc nmake makefile'
- mkdir _build; cd _build - mkdir _build; cd _build
- ..\_qt\5.15.0\msvc2019\bin\qmake ..\OpenRGB.pro - ..\_qt\5.15.0\msvc2019\bin\qmake ..\OpenRGB.pro
@ -449,6 +462,10 @@ before_script:
- Pop-Location - Pop-Location
- _fold_final_ - _fold_final_
- _fold_start_ 'Generate qm files'
- .\_qt\5.15.0\msvc2019_64\bin\lrelease OpenRGB.pro
- _fold_final_
- _fold_start_ 'run qmake and generate the msvc nmake makefile' - _fold_start_ 'run qmake and generate the msvc nmake makefile'
- mkdir _build; cd _build - mkdir _build; cd _build
- ..\_qt\5.15.0\msvc2019_64\bin\qmake ..\OpenRGB.pro - ..\_qt\5.15.0\msvc2019_64\bin\qmake ..\OpenRGB.pro
@ -484,6 +501,7 @@ before_script:
stage: build stage: build
script: script:
- eval $(/opt/homebrew/bin/brew shellenv) - eval $(/opt/homebrew/bin/brew shellenv)
- *generate-qm-files
- qmake OpenRGB.pro - qmake OpenRGB.pro
- make -j16 - make -j16
- macdeployqt OpenRGB.app -codesign=OpenRGB - macdeployqt OpenRGB.app -codesign=OpenRGB
@ -506,6 +524,7 @@ before_script:
stage: build stage: build
script: script:
- eval $(/usr/local/bin/brew shellenv) - eval $(/usr/local/bin/brew shellenv)
- *generate-qm-files
- arch -x86_64 /usr/local/bin/qmake OpenRGB.pro - arch -x86_64 /usr/local/bin/qmake OpenRGB.pro
- arch -x86_64 make -j16 - arch -x86_64 make -j16
- arch -x86_64 macdeployqt OpenRGB.app -codesign=OpenRGB - arch -x86_64 macdeployqt OpenRGB.app -codesign=OpenRGB

@ -1089,7 +1089,15 @@ contains(QMAKE_PLATFORM, freebsd) {
} }
RESOURCES += \ RESOURCES += \
qt/resources.qrc qt/resources.qrc \
qt/languages.qrc \
TRANSLATIONS += \
qt/i18n/OpenRGB_en.ts \
qt/i18n/OpenRGB_de.ts \
qt/i18n/OpenRGB_es.ts \
qt/i18n/OpenRGB_fr.ts \
qt/i18n/OpenRGB_ru.ts \
FORMS += \ FORMS += \
qt/OpenRGBClientInfoPage.ui \ qt/OpenRGBClientInfoPage.ui \

@ -9,7 +9,7 @@ License: GPLv2
URL: https://gitlab.com/CalcProgrammer1/%{_name} URL: https://gitlab.com/CalcProgrammer1/%{_name}
Source0: OpenRGB.tar.gz Source0: OpenRGB.tar.gz
BuildRequires: gcc-c++ libusb-devel libstdc++-devel qt5-qtbase-devel desktop-file-utils hidapi-devel mbedtls-devel systemd-rpm-macros BuildRequires: gcc-c++ libusb-devel libstdc++-devel qt5-qtbase-devel qt5-linguist desktop-file-utils hidapi-devel mbedtls-devel systemd-rpm-macros
Requires: hicolor-icon-theme Requires: hicolor-icon-theme
%description %description
@ -22,6 +22,7 @@ cp %{_sourcedir}/%{_name}/* %{_builddir} -r
%build %build
cd %{_builddir} cd %{_builddir}
/usr/bin/lrelease-qt5 OpenRGB.pro
%qmake_qt5 PREFIX=%{_prefix} "QMAKE_CXXFLAGS+=-save-temps" %qmake_qt5 PREFIX=%{_prefix} "QMAKE_CXXFLAGS+=-save-temps"
%make_build %make_build
@ -47,6 +48,9 @@ fi
%doc README.md %doc README.md
%changelog %changelog
* Mon Jan 03 2022 Morgan Guimard <morgan.gimard@gmail.com> 0.7.1-1
- Add linguist package from qt and add lrelease build step.
* Thu Dec 30 2021 Adam Honse <calcprogrammer1@gmail.com> - 0.7.1-0 * Thu Dec 30 2021 Adam Honse <calcprogrammer1@gmail.com> - 0.7.1-0
- Updated to 0.7.1 - Updated to 0.7.1

@ -18,6 +18,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <thread> #include <thread>
#include <QTranslator>
#include "OpenRGBDialog2.h" #include "OpenRGBDialog2.h"
@ -332,6 +333,46 @@ int main(int argc, char* argv[])
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv); QApplication a(argc, argv);
/*---------------------------------------------------------*\
| App translation |
| How to add a new language: |
| Create a file under qt/i18n/OpenRGB_<locale>.ts |
| Add it to TRANSLATIONS in OpenRGB.pro |
| Run: lupdate -verbose OpenRGB.pro |
| Edit this file (manually or with |
| linguist qt/i18n/OpenRGB_en.ts qt/i18n/OpenRGB_XX.ts |
| Generate the .qm file: lrelease OpenRGB.pro |
\*---------------------------------------------------------*/
QTranslator translator;
QString defaultLocale = QLocale::system().name();
defaultLocale.truncate(defaultLocale.lastIndexOf('_'));
// For local tests without changing the PC locale, override this value.
//defaultLocale="fr";
QLocale locale = QLocale(defaultLocale);
QLocale::setDefault(locale);
QString languageName = QLocale::languageToString(locale.language());
a.removeTranslator(&translator);
QString path = ":/i18n/";
if(translator.load(path + QString("OpenRGB_%1.qm").arg(defaultLocale)))
{
a.installTranslator(&translator);
printf("Current Language changed to %s\n", languageName.toStdString().c_str());
}
else
{
printf("Failed to load translation file for default locale '%s'\n", defaultLocale.toStdString().c_str());
}
/*---------------------------------------------------------*\
| Main UI widget |
\*---------------------------------------------------------*/
Ui::OpenRGBDialog2 dlg; Ui::OpenRGBDialog2 dlg;
if(ret_flags & RET_FLAG_I2C_TOOLS) if(ret_flags & RET_FLAG_I2C_TOOLS)

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

@ -82,7 +82,7 @@ void OpenRGBClientInfoPage::UpdateInfo()
ui->ClientTree->setColumnWidth(1, 100); ui->ClientTree->setColumnWidth(1, 100);
ui->ClientTree->setColumnWidth(2, 100); ui->ClientTree->setColumnWidth(2, 100);
ui->ClientTree->setColumnWidth(3, 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 | | 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 | | Create the disconnect buttons and connect them to the |
| signal mapper | | signal mapper |
\*-----------------------------------------------------*/ \*-----------------------------------------------------*/
QPushButton* new_button = new QPushButton( "Disconnect" ); QPushButton* new_button = new QPushButton(tr("Disconnect"));
ui->ClientTree->setItemWidget(new_top_item, 3, new_button); ui->ClientTree->setItemWidget(new_top_item, 3, new_button);
connect(new_button, SIGNAL(clicked()), signalMapper, SLOT(map())); 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 + ", "; 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(std::to_string(ResourceManager::get()->GetClients()[client_idx]->server_controllers[dev_idx]->zones[zone_idx].leds_count));
zone_str.append(" LEDs, "); zone_str.append(" LEDs, ");
// TODO : translate
switch(ResourceManager::get()->GetClients()[client_idx]->server_controllers[dev_idx]->zones[zone_idx].type) switch(ResourceManager::get()->GetClients()[client_idx]->server_controllers[dev_idx]->zones[zone_idx].type)
{ {
case ZONE_TYPE_SINGLE: 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()->SetSettings("Client", client_settings);
ResourceManager::get()->GetSettingsManager()->SaveSettings(); ResourceManager::get()->GetSettingsManager()->SaveSettings();
} }

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

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

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

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

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

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

@ -268,52 +268,52 @@ OpenRGBDialog2::OpenRGBDialog2(QWidget *parent) : QMainWindow(parent), ui(new Op
trayIcon = new QSystemTrayIcon(this); 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())); connect(actionShowHide, SIGNAL(triggered()), this, SLOT(on_ShowHide()));
trayIconMenu->addAction(actionShowHide); trayIconMenu->addAction(actionShowHide);
profileMenu = new QMenu("Profiles", this); profileMenu = new QMenu(tr("Profiles"), this);
trayIconMenu->addMenu(profileMenu); 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())); connect(actionQuickRed, SIGNAL(triggered()), this, SLOT(on_QuickRed()));
quickColorsMenu->addAction(actionQuickRed); quickColorsMenu->addAction(actionQuickRed);
QAction* actionQuickYellow = new QAction("Yellow", this); QAction* actionQuickYellow = new QAction(tr("Yellow"), this);
connect(actionQuickYellow, SIGNAL(triggered()), this, SLOT(on_QuickYellow())); connect(actionQuickYellow, SIGNAL(triggered()), this, SLOT(on_QuickYellow()));
quickColorsMenu->addAction(actionQuickYellow); quickColorsMenu->addAction(actionQuickYellow);
QAction* actionQuickGreen = new QAction("Green", this); QAction* actionQuickGreen = new QAction(tr("Green"), this);
connect(actionQuickGreen, SIGNAL(triggered()), this, SLOT(on_QuickGreen())); connect(actionQuickGreen, SIGNAL(triggered()), this, SLOT(on_QuickGreen()));
quickColorsMenu->addAction(actionQuickGreen); quickColorsMenu->addAction(actionQuickGreen);
QAction* actionQuickCyan = new QAction("Cyan", this); QAction* actionQuickCyan = new QAction(tr("Cyan"), this);
connect(actionQuickCyan, SIGNAL(triggered()), this, SLOT(on_QuickCyan())); connect(actionQuickCyan, SIGNAL(triggered()), this, SLOT(on_QuickCyan()));
quickColorsMenu->addAction(actionQuickCyan); quickColorsMenu->addAction(actionQuickCyan);
QAction* actionQuickBlue = new QAction("Blue", this); QAction* actionQuickBlue = new QAction(tr("Blue"), this);
connect(actionQuickBlue, SIGNAL(triggered()), this, SLOT(on_QuickBlue())); connect(actionQuickBlue, SIGNAL(triggered()), this, SLOT(on_QuickBlue()));
quickColorsMenu->addAction(actionQuickBlue); quickColorsMenu->addAction(actionQuickBlue);
QAction* actionQuickMagenta = new QAction("Magenta", this); QAction* actionQuickMagenta = new QAction(tr("Magenta"), this);
connect(actionQuickMagenta, SIGNAL(triggered()), this, SLOT(on_QuickMagenta())); connect(actionQuickMagenta, SIGNAL(triggered()), this, SLOT(on_QuickMagenta()));
quickColorsMenu->addAction(actionQuickMagenta); quickColorsMenu->addAction(actionQuickMagenta);
QAction* actionQuickWhite = new QAction("White", this); QAction* actionQuickWhite = new QAction(tr("White"), this);
connect(actionQuickWhite, SIGNAL(triggered()), this, SLOT(on_QuickWhite())); connect(actionQuickWhite, SIGNAL(triggered()), this, SLOT(on_QuickWhite()));
quickColorsMenu->addAction(actionQuickWhite); quickColorsMenu->addAction(actionQuickWhite);
trayIconMenu->addMenu(quickColorsMenu); trayIconMenu->addMenu(quickColorsMenu);
QAction* actionLightsOff = new QAction("Lights Off", this); QAction* actionLightsOff = new QAction(tr("Lights Off"), this);
actionLightsOff->setObjectName("ActionLightsOff"); actionLightsOff->setObjectName("ActionLightsOff");
connect(actionLightsOff, SIGNAL(triggered()), this, SLOT(on_LightsOff())); connect(actionLightsOff, SIGNAL(triggered()), this, SLOT(on_LightsOff()));
trayIconMenu->addAction(actionLightsOff); trayIconMenu->addAction(actionLightsOff);
actionExit = new QAction( "Exit", this ); actionExit = new QAction(tr("Exit"), this );
connect( actionExit, SIGNAL( triggered() ), this, SLOT( on_Exit() )); connect( actionExit, SIGNAL( triggered() ), this, SLOT( on_Exit() ));
trayIconMenu->addAction(actionExit); trayIconMenu->addAction(actionExit);
@ -552,7 +552,7 @@ void OpenRGBDialog2::AddPluginsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, PluginTabLabel);
} }
@ -580,7 +580,7 @@ void OpenRGBDialog2::AddSoftwareInfoPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SoftwareTabLabel);
} }
@ -608,7 +608,7 @@ void OpenRGBDialog2::AddSupportedDevicesPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SupportedTabLabel);
} }
@ -637,7 +637,7 @@ void OpenRGBDialog2::AddSettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
@ -670,7 +670,7 @@ void OpenRGBDialog2::AddE131SettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
} }
@ -726,7 +726,7 @@ void OpenRGBDialog2::AddPhilipsHueSettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
} }
@ -754,7 +754,7 @@ void OpenRGBDialog2::AddPhilipsWizSettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
} }
@ -782,7 +782,7 @@ void OpenRGBDialog2::AddQMKORGBSettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
} }
@ -810,7 +810,7 @@ void OpenRGBDialog2::AddSerialSettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
} }
@ -838,7 +838,7 @@ void OpenRGBDialog2::AddYeelightSettingsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->SettingsTabBar->tabBar()->setTabButton(ui->SettingsTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SettingsTabLabel);
} }
@ -1080,7 +1080,7 @@ void OpenRGBDialog2::AddI2CToolsPage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, SMBusToolsTabLabel);
} }
@ -1093,7 +1093,7 @@ void OpenRGBDialog2::AddClientTab()
if(ClientInfoPage == NULL) if(ClientInfoPage == NULL)
{ {
ClientInfoPage = new OpenRGBClientInfoPage(); 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 | | Add server information tab if there is a server |
\*-----------------------------------------------------*/ \*-----------------------------------------------------*/
OpenRGBServerInfoPage *ServerInfoPage = new OpenRGBServerInfoPage(ResourceManager::get()->GetServer()); 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() void OpenRGBDialog2::ClearDevicesList()
@ -1606,7 +1606,7 @@ void Ui::OpenRGBDialog2::on_ButtonDeleteProfile_clicked()
| Confirm we want to delete the profile | | Confirm we want to delete the profile |
\*---------------------------------------------------------*/ \*---------------------------------------------------------*/
QMessageBox::StandardButton reply; 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 | | Load the profile |
@ -1876,7 +1876,7 @@ void Ui::OpenRGBDialog2::AddConsolePage()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Create the tab label | | 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); ui->InformationTabBar->tabBar()->setTabButton(ui->InformationTabBar->tabBar()->count() - 1, QTabBar::LeftSide, ConsoleTabLabel);
} }

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

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

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

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

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

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

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

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

@ -87,7 +87,7 @@ void Ui::OpenRGBPluginsPage::on_InstallPluginButton_clicked()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Open a file selection prompt to choose the plugin file| | 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()); bool installed = InstallPlugin(install_file.toStdString());
@ -125,7 +125,7 @@ bool Ui::OpenRGBPluginsPage::InstallPlugin(std::string install_file)
{ {
QMessageBox::StandardButton reply; 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) if(reply != QMessageBox::Yes)
{ {
@ -163,7 +163,7 @@ void Ui::OpenRGBPluginsPage::on_RemovePluginButton_clicked()
/*-----------------------------------------------------*\ /*-----------------------------------------------------*\
| Confirm plugin removal with message box | | 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) if(reply != QMessageBox::Yes)
{ {

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

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

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

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

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

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

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

@ -433,7 +433,7 @@ void OpenRGBSettingsPage::ConfigureAutoStart()
if (!auto_start.EnableAutoStart(auto_start_info)) 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(); ui->AutoStartStatusLabel->show();
SetAutoStartVisibility(true); SetAutoStartVisibility(true);
} }

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

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

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

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

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

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

@ -63,7 +63,7 @@ void OpenRGBZonesBulkResizer::RunChecks(QWidget *parent)
if(!zones.empty()) if(!zones.empty())
{ {
QDialog* dialog = new QDialog(parent); QDialog* dialog = new QDialog(parent);
dialog->setWindowTitle("Resize the zones"); dialog->setWindowTitle(tr("Resize the zones"));
dialog->setMinimumSize(600,480); dialog->setMinimumSize(600,480);
dialog->setModal(true); 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(1, QHeaderView::Stretch);
ui->zones_table->horizontalHeader()->setSectionResizeMode(2, QHeaderView::Fixed); 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) | | Fill the table with widgets (labels, spinbox) |

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

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

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

File diff suppressed because it is too large Load Diff

@ -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>
Loading…
Cancel
Save