Separated translations from main resource file

This commit is contained in:
codestation
2014-01-14 12:22:59 -04:30
parent fca2ae25c4
commit 21369145e6
6 changed files with 10 additions and 6 deletions

View File

@@ -70,7 +70,7 @@ PKGCONFIG += libvitamtp libavformat libavcodec libavutil libswscale
QMAKE_CXXFLAGS += -Wno-write-strings -Wall -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS QMAKE_CXXFLAGS += -Wno-write-strings -Wall -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
RESOURCES += qcmares.qrc RESOURCES += qcmares.qrc translations.qrc
OTHER_FILES += \ OTHER_FILES += \
resources/xml/psp2-updatelist.xml \ resources/xml/psp2-updatelist.xml \
@@ -89,8 +89,8 @@ FORMS += \
src/forms/pinform.ui src/forms/pinform.ui
TRANSLATIONS += \ TRANSLATIONS += \
resources/translations/qcma.es.ts \ resources/translations/qcma_es.ts \
resources/translations/qcma.ja.ts resources/translations/qcma_ja.ts
VERSION = \\\"'0.2.8'\\\" VERSION = \\\"'0.2.8'\\\"

View File

@@ -1,8 +1,6 @@
<RCC> <RCC>
<qresource prefix="/main"> <qresource prefix="/main">
<file>resources/xml/psp2-updatelist.xml</file> <file>resources/xml/psp2-updatelist.xml</file>
<file>resources/translations/qcma.es.qm</file>
<file>resources/translations/qcma.ja.qm</file>
<file>resources/images/psv_icon.png</file> <file>resources/images/psv_icon.png</file>
<file>resources/images/psv_icon_16.png</file> <file>resources/images/psv_icon_16.png</file>
<file>resources/images/qcma.png</file> <file>resources/images/qcma.png</file>

View File

@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
} }
} }
if(translator.load("qcma." + locale, ":/main/resources/translations")) { if(translator.load("qcma_" + locale, ":/translations")) {
app.installTranslator(&translator); app.installTranslator(&translator);
} }

6
translations.qrc Normal file
View File

@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/translations">
<file>resources/translations/qcma_es.qm</file>
<file>resources/translations/qcma_ja.qm</file>
</qresource>
</RCC>