Merge pull request #12 from QuasarApp/task_11

Add translation
This commit is contained in:
Oleg-designer 2021-05-05 17:51:53 +03:00 committed by GitHub
commit db8a67d857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 10 deletions

View File

@ -113,3 +113,15 @@ Connections {
}
```
### Include translations
For include translations into your projects you need to use the QuasarAppUtils::Locales class. See oficiald [documentation](https://quasarapp.ddns.net:3031/docs/QuasarApp/QuasarAppLib/latest/classQuasarAppUtils_1_1Locales.html)
```cpp
if(!QuasarAppUtils::Locales::init(locale, {":/qmlNotify_languages/"})) {
QuasarAppUtils::Params::log("Error load language : " , QuasarAppUtils::Error);
}
```
Or you can manually load needed qm file.
All qm files located in qmlNotify_languages folder.

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<TS version="2.1" language="en_US">
<context>
<name>NotificationForm</name>
<message>
<location filename="../NotifyModule/NotificationForm.qml" line="16"/>
<location filename="../NotifyModule/NotificationForm.qml" line="18"/>
<source>Message</source>
<translation type="unfinished"></translation>
<translation>Message</translation>
</message>
</context>
</TS>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<TS version="2.1" language="ja_JP">
<context>
<name>NotificationForm</name>
<message>
<location filename="../NotifyModule/NotificationForm.qml" line="16"/>
<location filename="../NotifyModule/NotificationForm.qml" line="18"/>
<source>Message</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
</context>
</TS>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<TS version="2.1" language="ru_RU">
<context>
<name>NotificationForm</name>
<message>
<location filename="../NotifyModule/NotificationForm.qml" line="16"/>
<location filename="../NotifyModule/NotificationForm.qml" line="18"/>
<source>Message</source>
<translation type="unfinished"></translation>
<translation>Cообщение</translation>
</message>
</context>
</TS>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<TS version="2.1" language="tr_TR">
<context>
<name>NotificationForm</name>
<message>
<location filename="../NotifyModule/NotificationForm.qml" line="16"/>
<location filename="../NotifyModule/NotificationForm.qml" line="18"/>
<source>Message</source>
<translation type="unfinished"></translation>
<translation>İleti</translation>
</message>
</context>
</TS>

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<TS version="2.1" language="uk_UA">
<context>
<name>NotificationForm</name>
<message>
<location filename="../NotifyModule/NotificationForm.qml" line="16"/>
<location filename="../NotifyModule/NotificationForm.qml" line="18"/>
<source>Message</source>
<translation type="unfinished"></translation>
<translation>Повідомлення</translation>
</message>
</context>
</TS>