mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Properly load QT translations on windows
This commit is contained in:
parent
152828042f
commit
2b6d3799ec
@ -42,7 +42,7 @@ build_script:
|
|||||||
|
|
||||||
xcopy pkg\maps installer\maps /i
|
xcopy pkg\maps installer\maps /i
|
||||||
|
|
||||||
xcopy lang\*.qm installer\locale\ /sy
|
xcopy lang\*.qm installer\translations\ /sy
|
||||||
|
|
||||||
copy licence.txt installer
|
copy licence.txt installer
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
<location filename="../src/GUI/exportdialog.cpp" line="156"/>
|
||||||
<source>%1 is not writable.</source>
|
<source>%1 is not writable.</source>
|
||||||
<translation>%1 n'est pas inscriptible.</translation>
|
<translation>%1 n'est pas inscriptible.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@ -297,7 +297,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="562"/>
|
<location filename="../src/GUI/gui.cpp" line="562"/>
|
||||||
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at </source>
|
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at </source>
|
||||||
<translation>GPXSee est distribué selon les termes de la licence publique générale GNU (version 3). Pour plus d'information sur GPXSee, visiter le site du projet sur </translation>
|
<translation>GPXSee est distribué selon les termes de la licence publique générale GNU (version 3). Pour plus d'information sur GPXSee, visiter le site du projet sur </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="617"/>
|
<location filename="../src/GUI/gui.cpp" line="617"/>
|
||||||
@ -327,7 +327,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="625"/>
|
<location filename="../src/GUI/gui.cpp" line="625"/>
|
||||||
<source>User override directory:</source>
|
<source>User override directory:</source>
|
||||||
<translation>Dossier de l'utilisateur :</translation>
|
<translation>Dossier de l'utilisateur :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="634"/>
|
<location filename="../src/GUI/gui.cpp" line="634"/>
|
||||||
@ -412,7 +412,7 @@
|
|||||||
<location filename="../src/GUI/gui.cpp" line="613"/>
|
<location filename="../src/GUI/gui.cpp" line="613"/>
|
||||||
<location filename="../src/GUI/gui.cpp" line="614"/>
|
<location filename="../src/GUI/gui.cpp" line="614"/>
|
||||||
<source>Paths</source>
|
<source>Paths</source>
|
||||||
<translation>Chemin d'accès</translation>
|
<translation>Chemin d'accès</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="244"/>
|
<location filename="../src/GUI/gui.cpp" line="244"/>
|
||||||
@ -469,7 +469,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="348"/>
|
<location filename="../src/GUI/gui.cpp" line="348"/>
|
||||||
<source>Show toolbars</source>
|
<source>Show toolbars</source>
|
||||||
<translation>Afficher la barre d'outils</translation>
|
<translation>Afficher la barre d'outils</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="354"/>
|
<location filename="../src/GUI/gui.cpp" line="354"/>
|
||||||
@ -560,7 +560,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="463"/>
|
<location filename="../src/GUI/gui.cpp" line="463"/>
|
||||||
<source>Units</source>
|
<source>Units</source>
|
||||||
<translation>Système d'unités</translation>
|
<translation>Système d'unités</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="472"/>
|
<location filename="../src/GUI/gui.cpp" line="472"/>
|
||||||
@ -908,7 +908,7 @@
|
|||||||
<location filename="../src/GUI/optionsdialog.cpp" line="110"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="110"/>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="192"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="192"/>
|
||||||
<source>Use anti-aliasing</source>
|
<source>Use anti-aliasing</source>
|
||||||
<translation>Utiliser l'anticrénelage</translation>
|
<translation>Utiliser l'anticrénelage</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="189"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="189"/>
|
||||||
@ -933,7 +933,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="212"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="212"/>
|
||||||
<source>Background color:</source>
|
<source>Background color:</source>
|
||||||
<translation>Couleur d'arrière plan :</translation>
|
<translation>Couleur d'arrière plan :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="223"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="223"/>
|
||||||
@ -1145,12 +1145,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="351"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="351"/>
|
||||||
<source>The printed area is approximately the display area. The map zoom level does not change.</source>
|
<source>The printed area is approximately the display area. The map zoom level does not change.</source>
|
||||||
<translation>La zone d'impression est presque celle affichée. L'échelle reste la même.</translation>
|
<translation>La zone d'impression est presque celle affichée. L'échelle reste la même.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="353"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="353"/>
|
||||||
<source>The zoom level will be changed so that the whole content (tracks/waypoints) fits to the printed area and the map resolution is as close as possible to the print resolution.</source>
|
<source>The zoom level will be changed so that the whole content (tracks/waypoints) fits to the printed area and the map resolution is as close as possible to the print resolution.</source>
|
||||||
<translation>L'échelle est ajustée pour que tout le contenu (traces et points de jalonnement) rentre dans la zone d'impression tout en gardant proches les résolutions d'impression et de carte.</translation>
|
<translation>L'échelle est ajustée pour que tout le contenu (traces et points de jalonnement) rentre dans la zone d'impression tout en gardant proches les résolutions d'impression et de carte.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="375"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="375"/>
|
||||||
@ -1180,7 +1180,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="385"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="385"/>
|
||||||
<source>Item count (>1)</source>
|
<source>Item count (>1)</source>
|
||||||
<translation>Nombre d'éléments (>1)</translation>
|
<translation>Nombre d'éléments (>1)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="400"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="400"/>
|
||||||
@ -1190,7 +1190,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="410"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="410"/>
|
||||||
<source>Print mode</source>
|
<source>Print mode</source>
|
||||||
<translation>Mode d'impression</translation>
|
<translation>Mode d'impression</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="411"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="411"/>
|
||||||
@ -1499,4 +1499,3 @@
|
|||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
</TS>
|
</TS>
|
||||||
|
|
||||||
|
@ -196,30 +196,35 @@ Section "ANGLE" SEC_ANGLE
|
|||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SectionGroup "Localization" SEC_LOCALE
|
SectionGroup "Localization" SEC_LOCALIZATION
|
||||||
Section "Czech"
|
Section "Czech"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_cs.qm locale\gpxsee_cs.qm
|
File /oname=translations\gpxsee_cs.qm translations\gpxsee_cs.qm
|
||||||
|
File /oname=translations\qt_cs.qm translations\qt_cs.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Finnish"
|
Section "Finnish"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_fi.qm locale\gpxsee_fi.qm
|
File /oname=translations\gpxsee_fi.qm translations\gpxsee_fi.qm
|
||||||
|
File /oname=translations\qt_fi.qm translations\qt_fi.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "French"
|
Section "French"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_fr.qm locale\gpxsee_fr.qm
|
File /oname=translations\gpxsee_fr.qm translations\gpxsee_fr.qm
|
||||||
|
File /oname=translations\qt_fr.qm translations\qt_fr.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "German"
|
Section "German"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_de.qm locale\gpxsee_de.qm
|
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
|
||||||
|
File /oname=translations\qt_de.qm translations\qt_de.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Russian"
|
Section "Russian"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_ru.qm locale\gpxsee_ru.qm
|
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
|
||||||
|
File /oname=translations\qt_ru.qm translations\qt_ru.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Swedish"
|
Section "Swedish"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_sv.qm locale\gpxsee_sv.qm
|
File /oname=translations\gpxsee_sv.qm translations\gpxsee_sv.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
SectionGroupEnd
|
SectionGroupEnd
|
||||||
|
|
||||||
@ -274,7 +279,7 @@ LangString DESC_ANGLE ${LANG_ENGLISH} \
|
|||||||
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
||||||
LangString DESC_APP ${LANG_ENGLISH} \
|
LangString DESC_APP ${LANG_ENGLISH} \
|
||||||
"GPXSee application"
|
"GPXSee application"
|
||||||
LangString DESC_LOCALE ${LANG_ENGLISH} \
|
LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||||
"Localization"
|
"Localization"
|
||||||
|
|
||||||
;Assign language strings to sections
|
;Assign language strings to sections
|
||||||
@ -284,5 +289,5 @@ LangString DESC_LOCALE ${LANG_ENGLISH} \
|
|||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALE} $(DESC_LOCALE)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
@ -198,30 +198,35 @@ Section "ANGLE" SEC_ANGLE
|
|||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
SectionGroup "Localization" SEC_LOCALE
|
SectionGroup "Localization" SEC_LOCALIZATION
|
||||||
Section "Czech"
|
Section "Czech"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_cs.qm locale\gpxsee_cs.qm
|
File /oname=translations\gpxsee_cs.qm translations\gpxsee_cs.qm
|
||||||
|
File /oname=translations\qt_cs.qm translations\qt_cs.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Finnish"
|
Section "Finnish"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_fi.qm locale\gpxsee_fi.qm
|
File /oname=translations\gpxsee_fi.qm translations\gpxsee_fi.qm
|
||||||
|
File /oname=translations\qt_fi.qm translations\qt_fi.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "French"
|
Section "French"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_fr.qm locale\gpxsee_fr.qm
|
File /oname=translations\gpxsee_fr.qm translations\gpxsee_fr.qm
|
||||||
|
File /oname=translations\qt_fr.qm translations\qt_fr.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "German"
|
Section "German"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_de.qm locale\gpxsee_de.qm
|
File /oname=translations\gpxsee_de.qm translations\gpxsee_de.qm
|
||||||
|
File /oname=translations\qt_de.qm translations\qt_de.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Russian"
|
Section "Russian"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_ru.qm locale\gpxsee_ru.qm
|
File /oname=translations\gpxsee_ru.qm translations\gpxsee_ru.qm
|
||||||
|
File /oname=translations\qt_ru.qm translations\qt_ru.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
Section "Swedish"
|
Section "Swedish"
|
||||||
CreateDirectory "$INSTDIR\locale"
|
CreateDirectory "$INSTDIR\translations"
|
||||||
File /oname=locale\gpxsee_sv.qm locale\gpxsee_sv.qm
|
File /oname=translations\gpxsee_sv.qm translations\gpxsee_sv.qm
|
||||||
SectionEnd
|
SectionEnd
|
||||||
SectionGroupEnd
|
SectionGroupEnd
|
||||||
|
|
||||||
@ -277,7 +282,7 @@ LangString DESC_ANGLE ${LANG_ENGLISH} \
|
|||||||
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
"ANGLE (OpenGL via Direct3D). Enables OpenGL on systems without native OpenGL drivers."
|
||||||
LangString DESC_APP ${LANG_ENGLISH} \
|
LangString DESC_APP ${LANG_ENGLISH} \
|
||||||
"GPXSee application"
|
"GPXSee application"
|
||||||
LangString DESC_LOCALE ${LANG_ENGLISH} \
|
LangString DESC_LOCALIZATION ${LANG_ENGLISH} \
|
||||||
"Localization"
|
"Localization"
|
||||||
|
|
||||||
;Assign language strings to sections
|
;Assign language strings to sections
|
||||||
@ -287,5 +292,5 @@ LangString DESC_LOCALE ${LANG_ENGLISH} \
|
|||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_ANGLE} $(DESC_ANGLE)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_MSVC} $(DESC_MSVC)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_APP} $(DESC_APP)
|
||||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALE} $(DESC_LOCALE)
|
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_LOCALIZATION} $(DESC_LOCALIZATION)
|
||||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||||
|
@ -19,12 +19,16 @@ App::App(int &argc, char **argv) : QApplication(argc, argv),
|
|||||||
_argc(argc), _argv(argv)
|
_argc(argc), _argv(argv)
|
||||||
{
|
{
|
||||||
QTranslator *gpxsee = new QTranslator(this);
|
QTranslator *gpxsee = new QTranslator(this);
|
||||||
gpxsee->load(QLocale::system(), "gpxsee", "_", LOCALE_DIR);
|
gpxsee->load(QLocale::system(), "gpxsee", "_", TRANSLATIONS_DIR);
|
||||||
installTranslator(gpxsee);
|
installTranslator(gpxsee);
|
||||||
|
|
||||||
QTranslator *qt = new QTranslator(this);
|
QTranslator *qt = new QTranslator(this);
|
||||||
|
#ifdef Q_OS_WINDOWS
|
||||||
|
qt->load(QLocale::system(), "qt", "_", TRANSLATIONS_DIR);
|
||||||
|
#else // Q_OS_WINDOWS
|
||||||
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
qt->load(QLocale::system(), "qt", "_", QLibraryInfo::location(
|
||||||
QLibraryInfo::TranslationsPath));
|
QLibraryInfo::TranslationsPath));
|
||||||
|
#endif // Q_OS_WINDOWS
|
||||||
installTranslator(qt);
|
installTranslator(qt);
|
||||||
|
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
|
@ -41,6 +41,6 @@
|
|||||||
#define GLOBAL_MAP_DIR GLOBAL_DIR + QString("/") + MAP_DIR
|
#define GLOBAL_MAP_DIR GLOBAL_DIR + QString("/") + MAP_DIR
|
||||||
#define GLOBAL_POI_DIR GLOBAL_DIR + QString("/") + POI_DIR
|
#define GLOBAL_POI_DIR GLOBAL_DIR + QString("/") + POI_DIR
|
||||||
#define TILES_DIR USER_DIR + QString("/tiles")
|
#define TILES_DIR USER_DIR + QString("/tiles")
|
||||||
#define LOCALE_DIR GLOBAL_DIR + QString("/locale")
|
#define TRANSLATIONS_DIR GLOBAL_DIR + QString("/locale")
|
||||||
|
|
||||||
#endif /* CONFIG_H */
|
#endif /* CONFIG_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user