From 667fb7a17523364de9e96fadec2cea04925010b0 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sun, 10 Feb 2008 14:06:52 +0000 Subject: [PATCH] Qt: DETACHED language file handling from MSVC project file ADDED Windows shell scripts for creating language files UPDATED how-to --- lang/how-to.txt | 18 ++++++++++-------- lang/release.cmd | 2 ++ lang/update.cmd | 2 ++ project/vc2008/vba-m.vcproj | 21 ++++----------------- 4 files changed, 18 insertions(+), 25 deletions(-) create mode 100644 lang/release.cmd create mode 100644 lang/update.cmd diff --git a/lang/how-to.txt b/lang/how-to.txt index baadcfd6..7a3f61e1 100644 --- a/lang/how-to.txt +++ b/lang/how-to.txt @@ -1,11 +1,13 @@ How to create a new translation: -- Add "TRANSLATIONS += language.ts" to vba-m.pro -- Call "lupdate vba-m.pro" to create the .ts file +For Windows: + +- Add "TRANSLATIONS += path/to/language.ts" to vba-m.pro + +- Execute the "update.cmd" script to create .ts files + - 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 ->> + +- Execute the "release.cmd" script to compile it to a .qm file + +- The .qm file can now be loaded & used by the application diff --git a/lang/release.cmd b/lang/release.cmd new file mode 100644 index 00000000..102d695b --- /dev/null +++ b/lang/release.cmd @@ -0,0 +1,2 @@ +cd ..\project\qmake +lrelease vba-m.pro \ No newline at end of file diff --git a/lang/update.cmd b/lang/update.cmd new file mode 100644 index 00000000..0c01594c --- /dev/null +++ b/lang/update.cmd @@ -0,0 +1,2 @@ +cd ..\project\qmake +lupdate vba-m.pro \ No newline at end of file diff --git a/project/vc2008/vba-m.vcproj b/project/vc2008/vba-m.vcproj index df09f706..c271ea83 100644 --- a/project/vc2008/vba-m.vcproj +++ b/project/vc2008/vba-m.vcproj @@ -24,9 +24,9 @@ > - - - - - -