qttranslator.patch
| src/libaudqt/util.cc | ||
|---|---|---|
| 21 | 21 |
#include <QDialog> |
| 22 | 22 |
#include <QDialogButtonBox> |
| 23 | 23 |
#include <QLabel> |
| 24 |
#include <QLibraryInfo> |
|
| 24 | 25 |
#include <QPushButton> |
| 26 |
#include <QTranslator> |
|
| 25 | 27 |
#include <QVBoxLayout> |
| 26 | 28 | |
| 27 | 29 |
#include <libaudcore/audstrings.h> |
| ... | ... | |
| 48 | 50 |
qapp->setAttribute (Qt::AA_UseHighDpiPixmaps); |
| 49 | 51 |
qapp->setApplicationName (_("Audacious"));
|
| 50 | 52 |
qapp->setWindowIcon (QIcon::fromTheme (app_name)); |
| 53 | ||
| 54 |
QTranslator translator; |
|
| 55 |
QLocale locale = QLocale::system (); |
|
| 56 | ||
| 57 |
if (translator.load (locale, "qt", "_", |
|
| 58 |
QLibraryInfo::location (QLibraryInfo::TranslationsPath))) |
|
| 59 |
qapp->installTranslator (& translator); |
|
| 51 | 60 |
} |
| 52 | 61 | |
| 53 | 62 |
EXPORT void run () |
