From 262403b63095ef2927088f0537faf4513a9f7116 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sat, 9 Feb 2008 21:42:17 +0000 Subject: [PATCH] Qt: ADDED short translation how-to FIXED some linux build errors --- lang/how-to.txt | 11 +++++++++++ project/qmake/vba-m.pro | 4 ++-- project/vc2008/vba-m.vcproj | 4 ++-- src/qt/MainWnd.cpp | 2 +- src/qt/main.cpp | 2 +- src/qt/precompile.h | 4 ++-- 6 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 lang/how-to.txt diff --git a/lang/how-to.txt b/lang/how-to.txt new file mode 100644 index 00000000..baadcfd6 --- /dev/null +++ b/lang/how-to.txt @@ -0,0 +1,11 @@ +How to create a new translation: + +- Add "TRANSLATIONS += language.ts" to vba-m.pro +- Call "lupdate vba-m.pro" to create the .ts file +- Edit & translate the .ts file with the "Qt Linguist" tool +- Call "lrelease vba-m.pro" to create the compiled .qm file +- Load the language file in the application: +<< +QTranslator translator; +translator.load( "language" ); // without .qm ending +>> diff --git a/project/qmake/vba-m.pro b/project/qmake/vba-m.pro index 6d490741..638b5e23 100644 --- a/project/qmake/vba-m.pro +++ b/project/qmake/vba-m.pro @@ -8,8 +8,8 @@ PRECOMPILED_HEADER = ../../src/qt/precompile.h HEADERS += ../../src/qt/main.h SOURCES += ../../src/qt/main.cpp -HEADERS += ../../src/qt/mainwnd.h -SOURCES += ../../src/qt/mainwnd.cpp +HEADERS += ../../src/qt/MainWnd.h +SOURCES += ../../src/qt/MainWnd.cpp HEADERS += ../../src/qt/glwidget.h SOURCES += ../../src/qt/glwidget.cpp diff --git a/project/vc2008/vba-m.vcproj b/project/vc2008/vba-m.vcproj index f01657a0..73d5fa6a 100644 --- a/project/vc2008/vba-m.vcproj +++ b/project/vc2008/vba-m.vcproj @@ -80,11 +80,11 @@ Name="MainWnd" > diff --git a/src/qt/MainWnd.cpp b/src/qt/MainWnd.cpp index b9c35846..363b5327 100644 --- a/src/qt/MainWnd.cpp +++ b/src/qt/MainWnd.cpp @@ -16,7 +16,7 @@ // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include "mainwnd.h" +#include "MainWnd.h" #include "glwidget.h" diff --git a/src/qt/main.cpp b/src/qt/main.cpp index dfaba417..678c58d5 100644 --- a/src/qt/main.cpp +++ b/src/qt/main.cpp @@ -18,7 +18,7 @@ #include "main.h" -#include "mainwnd.h" +#include "MainWnd.h" int main( int argc, char *argv[] ) { diff --git a/src/qt/precompile.h b/src/qt/precompile.h index fd1ea579..3abe2a67 100644 --- a/src/qt/precompile.h +++ b/src/qt/precompile.h @@ -21,8 +21,8 @@ #if defined __cplusplus // Add C++ includes here -#include -#include +#include +#include #endif #endif // #ifndef PRECOMPILE_H