Added some initial translations, new flags for localizations and some other stuff.

This commit is contained in:
Martin Rotter 2013-06-07 18:18:09 +02:00
parent 3b89a8fe89
commit 89f95a4a34
6 changed files with 71 additions and 0 deletions

View File

@ -116,6 +116,8 @@ add_definitions(-DUNICODE -D_UNICODE)
# Find all needed Qt modules. # Find all needed Qt modules.
find_package(Qt5Sql) find_package(Qt5Sql)
find_package(Qt5WebKit)
find_package(Qt5WebKitWidgets)
find_package(Qt5Widgets) find_package(Qt5Widgets)
find_package(Qt5Xml) find_package(Qt5Xml)
find_package(Qt5Network) find_package(Qt5Network)
@ -218,6 +220,7 @@ include_directories (
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}/src
${Qt5Xml_INCLUDE_DIRS} ${Qt5Xml_INCLUDE_DIRS}
${Qt5Webkit_INCLUDE_DIRS}
) )
if(WIN32) if(WIN32)

View File

@ -1,4 +1,32 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.0" language="cs_CZ"> <TS version="2.0" language="cs_CZ">
<context>
<name>QObject</name>
<message>
<source>LANG_NAME</source>
<extracomment>Name of language, e.g. English.</extracomment>
<translation>Čeština</translation>
</message>
<message>
<source>LANG_ABBREV</source>
<extracomment>Abbreviation of language, e.g. en. Use ISO 639-1 code here!</extracomment>
<translation>cs</translation>
</message>
<message>
<source>LANG_VERSION</source>
<extracomment>Version of your translation, e.g. 1.0.</extracomment>
<translation>0.01</translation>
</message>
<message>
<source>LANG_AUTHOR</source>
<extracomment>Name of translator - optional.</extracomment>
<translation>Martin Rotter</translation>
</message>
<message>
<source>LANG_EMAIL</source>
<extracomment>Email of translator - optional.</extracomment>
<translation>martinrotter@users.sourceforge.net</translation>
</message>
</context>
</TS> </TS>

View File

@ -1,4 +1,32 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS> <!DOCTYPE TS>
<TS version="2.0" language="en_US"> <TS version="2.0" language="en_US">
<context>
<name>QObject</name>
<message>
<source>LANG_NAME</source>
<extracomment>Name of language, e.g. English.</extracomment>
<translation>English</translation>
</message>
<message>
<source>LANG_ABBREV</source>
<extracomment>Abbreviation of language, e.g. en. Use ISO 639-1 code here!</extracomment>
<translation>en</translation>
</message>
<message>
<source>LANG_VERSION</source>
<extracomment>Version of your translation, e.g. 1.0.</extracomment>
<translation>0.01</translation>
</message>
<message>
<source>LANG_AUTHOR</source>
<extracomment>Name of translator - optional.</extracomment>
<translation>Martin Rotter</translation>
</message>
<message>
<source>LANG_EMAIL</source>
<extracomment>Email of translator - optional.</extracomment>
<translation>martinrotter@users.sourceforge.net</translation>
</message>
</context>
</TS> </TS>

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -11,6 +11,18 @@
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
//: Name of language, e.g. English.
QObject::tr("LANG_NAME");
//: Abbreviation of language, e.g. en.
//: Use ISO 639-1 code here!
QObject::tr("LANG_ABBREV");
//: Version of your translation, e.g. 1.0.
QObject::tr("LANG_VERSION");
//: Name of translator - optional.
QObject::tr("LANG_AUTHOR");
//: Email of translator - optional.
QObject::tr("LANG_EMAIL");
QApplication a(argc, argv); QApplication a(argc, argv);
QMainWindow window; QMainWindow window;
window.show(); window.show();