Added translations for LOG messages

* Added C Macro to allow QT lupdate parsing
* Added QTtrranslation wrapper around dialog message
* Updated all translation files
This commit is contained in:
Chris
2025-02-03 21:33:29 +11:00
committed by Adam Honse
parent e39fafc64f
commit 6934bbf802
20 changed files with 4105 additions and 5701 deletions

View File

@@ -30,6 +30,42 @@
#include "filesystem.h"
#include "StringUtils.h"
/*-------------------------------------------------------------------------*\
| Translation Strings |
\*-------------------------------------------------------------------------*/
const char* I2C_ERR_WIN = QT_TRANSLATE_NOOP("ResourceManager",
"<h2>Some internal devices may not be detected:</h2>"
"<p>One or more I2C or SMBus interfaces failed to initialize.</p>"
"<p><b>RGB DRAM modules, some motherboards' onboard RGB lighting, and RGB Graphics Cards, will not be available in OpenRGB</b> without I2C or SMBus.</p>"
"<h4>How to fix this:</h4>"
"<p>On Windows, this is usually caused by a failure to load the WinRing0 driver.</p>"
"<p>You must run OpenRGB as administrator at least once to allow WinRing0 to set up.</p>"
"<p>See <a href='https://help.openrgb.org/'>help.openrgb.org</a> for additional troubleshooting steps if you keep seeing this message.<br></p>"
"<h3>If you are not using internal RGB on a desktop this message is not important to you.</h3>");
const char* I2C_ERR_LINUX = QT_TRANSLATE_NOOP("ResourceManager",
"<h2>Some internal devices may not be detected:</h2>"
"<p>One or more I2C or SMBus interfaces failed to initialize.</p>"
"<p><b>RGB DRAM modules, some motherboards' onboard RGB lighting, and RGB Graphics Cards, will not be available in OpenRGB</b> without I2C or SMBus.</p>"
"<h4>How to fix this:</h4>"
"<p>On Linux, this is usually because the i2c-dev module is not loaded.</p>"
"<p>You must load the i2c-dev module along with the correct i2c driver for your motherboard. "
"This is usually i2c-piix4 for AMD systems and i2c-i801 for Intel systems.</p>"
"<p>See <a href='https://help.openrgb.org/'>help.openrgb.org</a> for additional troubleshooting steps if you keep seeing this message.<br></p>"
"<h3>If you are not using internal RGB on a desktop this message is not important to you.</h3>");
const char* UDEV_MISSING = QT_TRANSLATE_NOOP("ResourceManager",
"<h2>WARNING:</h2>"
"<p>The OpenRGB udev rules are not installed.</p>"
"<p>Most devices will not be available unless running OpenRGB as root.</p>"
"<p>If using AppImage, Flatpak, or self-compiled versions of OpenRGB you must install the udev rules manually</p>"
"<p>See <a href='https://openrgb.org/udev'>https://openrgb.org/udev</a> to install the udev rules manually</p>");
const char* UDEV_MUTLI = QT_TRANSLATE_NOOP("ResourceManager",
"<h2>WARNING:</h2>"
"<p>Multiple OpenRGB udev rules are installed.</p>"
"<p>The udev rules file 60-openrgb.rules is installed in both /etc/udev/rules.d and /usr/lib/udev/rules.d.</p>"
"<p>Multiple udev rules files can conflict, it is recommended to remove one of them.</p>");
const hidapi_wrapper default_wrapper =
{
NULL,
@@ -1572,13 +1608,7 @@ void ResourceManager::DetectDevicesCoroutine()
\*-------------------------------------------------*/
if(udev_not_exist)
{
const char* message = "<h2>WARNING:</h2>"
"<p>The OpenRGB udev rules are not installed.</p>"
"<p>Most devices will not be available unless running OpenRGB as root.</p>"
"<p>If using AppImage, Flatpak, or self-compiled versions of OpenRGB you must install the udev rules manually</p>"
"<p>See <a href='https://openrgb.org/udev'>https://openrgb.org/udev</a> to install the udev rules manually</p>";
LOG_DIALOG("%s", message);
LOG_DIALOG("%s", UDEV_MISSING);
udev_multiple = false;
i2c_interface_fail = false;
@@ -1590,12 +1620,7 @@ void ResourceManager::DetectDevicesCoroutine()
\*-------------------------------------------------*/
if(udev_multiple)
{
const char* message = "<h2>WARNING:</h2>"
"<p>Multiple OpenRGB udev rules are installed.</p>"
"<p>The udev rules file 60-openrgb.rules is installed in both /etc/udev/rules.d and /usr/lib/udev/rules.d.</p>"
"<p>Multiple udev rules files can conflict, it is recommended to remove one of them.</p>";
LOG_DIALOG("%s", message);
LOG_DIALOG("%s", UDEV_MUTLI);
i2c_interface_fail = false;
}
@@ -1608,24 +1633,12 @@ void ResourceManager::DetectDevicesCoroutine()
\*-------------------------------------------------*/
if(i2c_interface_fail)
{
const char* message = "<h2>Some internal devices may not be detected:</h2>"
"<p>One or more I2C or SMBus interfaces failed to initialize.</p>"
"<p><b>RGB DRAM modules, some motherboards' onboard RGB lighting, and RGB Graphics Cards, will not be available in OpenRGB</b> without I2C or SMBus.</p>"
"<h4>How to fix this:</h4>"
#ifdef _WIN32
"<p>On Windows, this is usually caused by a failure to load the WinRing0 driver.</p>"
"<p>You must run OpenRGB as administrator at least once to allow WinRing0 to set up.</p>"
LOG_DIALOG("%s", I2C_ERR_WIN);
#endif
#ifdef __linux__
"<p>On Linux, this is usually because the i2c-dev module is not loaded.</p>"
"<p>You must load the i2c-dev module along with the correct i2c driver for your motherboard. "
"This is usually i2c-piix4 for AMD systems and i2c-i801 for Intel systems.</p>"
LOG_DIALOG("%s", I2C_ERR_LINUX);
#endif
"<p>See <a href='https://help.openrgb.org/'>help.openrgb.org</a> for additional troubleshooting steps if you keep seeing this message.<br></p>"
"<h3>If you are not using internal RGB on a desktop this message is not important to you.</h3>";
LOG_DIALOG("%s", message);
}
}