Qt:
DETACHED language file handling from MSVC project file ADDED Windows shell scripts for creating language files UPDATED how-to
This commit is contained in:
parent
ee8906b92e
commit
667fb7a175
|
@ -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
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
cd ..\project\qmake
|
||||
lrelease vba-m.pro
|
|
@ -0,0 +1,2 @@
|
|||
cd ..\project\qmake
|
||||
lupdate vba-m.pro
|
|
@ -24,9 +24,9 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="qmake -makefile -win32 "CONFIG+=debug" ..\qmake\vba-m.pro
nmake debug
lupdate ..\qmake\vba-m.pro"
|
||||
BuildCommandLine="qmake -makefile -win32 "CONFIG+=debug" ..\qmake\vba-m.pro
nmake debug"
|
||||
ReBuildCommandLine=""
|
||||
CleanCommandLine="nmake distclean
rmdir /S /Q debug
rmdir /S /Q release
"
|
||||
CleanCommandLine="nmake distclean
rmdir /S /Q debug
rmdir /S /Q release"
|
||||
Output="$(OutDir)\VisualBoyAdvance.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG"
|
||||
IncludeSearchPath=""
|
||||
|
@ -44,9 +44,9 @@
|
|||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="qmake -makefile -win32 ..\qmake\vba-m.pro
nmake release
upx -9 "$(TargetPath)"
lrelease ..\qmake\vba-m.pro
echo "Copying translation files to release directory..."
mkdir $(OutDir)\lang
copy /Y ..\..\lang\*.qm $(OutDir)\lang"
|
||||
BuildCommandLine="qmake -makefile -win32 ..\qmake\vba-m.pro
nmake release
upx --best "$(TargetPath)""
|
||||
ReBuildCommandLine=""
|
||||
CleanCommandLine="nmake distclean
rmdir /S /Q debug
rmdir /S /Q release
"
|
||||
CleanCommandLine="nmake distclean
rmdir /S /Q debug
rmdir /S /Q release"
|
||||
Output="$(OutDir)\VisualBoyAdvance.exe"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
IncludeSearchPath=""
|
||||
|
@ -98,19 +98,6 @@
|
|||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Translations"
|
||||
Filter="ts;qm"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\lang\german.ts"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\lang\spanish.ts"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Other"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue