Changeset b26801b000 in tspsg
- Timestamp:
- Jul 10, 2012, 5:44:43 PM (12 years ago)
- Branches:
- appveyor, imgbot, master, readme
- Children:
- 0af510a462
- Parents:
- 1299ea5b49
- git-author:
- Oleksii Serdiuk <contacts@…> (07/10/12 17:44:43)
- git-committer:
- Oleksii Serdiuk <contacts@…> (07/10/12 17:51:53)
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
l10n/l10n.qrc
r1299ea5b49 rb26801b000 1 1 <RCC> 2 2 <qresource prefix="/l10n"> 3 <file>qt_ru.qm</file>4 <file>qt_uk.qm</file>5 3 <file>tspsg_en.qm</file> 6 4 <file>tspsg_ru.qm</file> -
src/mainwindow.cpp
r1299ea5b49 rb26801b000 1402 1402 // Trying to load system Qt library translation... 1403 1403 qtTranslator = new QTranslator(this); 1404 if (qtTranslator->load("qt_" + lng, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) 1404 if (qtTranslator->load("qt_" + lng, QLibraryInfo::location(QLibraryInfo::TranslationsPath))) { 1405 1405 qApp->installTranslator(qtTranslator); 1406 else { 1407 // No luck. Let's try to load a bundled one. 1408 if (qtTranslator->load("qt_" + lng, PATH_L10N)) { 1409 // We have a translation in the localization direcotry. 1410 qApp->installTranslator(qtTranslator); 1411 } else if (qtTranslator->load("qt_" + lng, ":/l10n")) { 1412 // We have a translation "built-in" into application resources. 1413 qApp->installTranslator(qtTranslator); 1414 } else { 1415 // Qt library translation unavailable for this language. 1416 delete qtTranslator; 1417 qtTranslator = NULL; 1418 } 1406 } else { 1407 // Qt library translation unavailable for this language. 1408 delete qtTranslator; 1409 qtTranslator = NULL; 1419 1410 } 1420 1411 -
tspsg.pro
r1299ea5b49 rb26801b000 56 56 UI_DIR = tmp 57 57 58 # We need to generate translations before building. 59 # Either way, resource files won't compile. 60 translations.name = Translations 61 translations.input = TRANSLATIONS 62 translations.output = $$_PRO_FILE_PWD_/l10n/${QMAKE_FILE_BASE}.qm 63 translations.commands = $$[QT_INSTALL_BINS]/lrelease ${QMAKE_FILE_IN} 64 translations.CONFIG = no_link 65 QMAKE_EXTRA_COMPILERS += translations 66 PRE_TARGETDEPS += compiler_translations_make_all 67 58 68 # Include 3rd party libraries 59 69 !handheld {
Note: See TracChangeset
for help on using the changeset viewer.