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 @@ > - - - - - -