mirror of
https://github.com/QuasarApp/Hanoi-Towers.git
synced 2025-05-14 18:39:33 +00:00
commit
02af3046dc
@ -31,7 +31,7 @@ Item {
|
||||
width: parent.width * 0.8
|
||||
height: parent.height * 0.6
|
||||
color: theme.buttonsTextColor
|
||||
font.pixelSize: (ab.width < ab.height) ? ab.width / 16 : ab.height / 16
|
||||
font.pixelSize: (ab.width < ab.height) ? ab.width / 25 : ab.height / 25
|
||||
font.italic: true
|
||||
wrapMode: Text.Wrap
|
||||
text: qsTr("Product of QuasarApp
|
||||
|
@ -49,6 +49,8 @@ HEADERS += \
|
||||
|
||||
TRANSLATIONS += \
|
||||
languages/ru.ts \
|
||||
languages/ja.ts \
|
||||
languages/tr.ts \
|
||||
languages/en.ts
|
||||
|
||||
|
||||
|
@ -68,19 +68,19 @@
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="191"/>
|
||||
<location filename="../game.qml" line="192"/>
|
||||
<source>You have passed the level in %0 steps and unlocked level %1
|
||||
Minimum steps for this lvl: %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="198"/>
|
||||
<location filename="../game.qml" line="199"/>
|
||||
<source>You have passed the level in %0 steps.
|
||||
Minimum steps for this lvl: %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="300"/>
|
||||
<location filename="../game.qml" line="301"/>
|
||||
<source>Ok</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
BIN
source/languages/ja.qm
Normal file
BIN
source/languages/ja.qm
Normal file
Binary file not shown.
107
source/languages/ja.ts
Normal file
107
source/languages/ja.ts
Normal file
@ -0,0 +1,107 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ja_JP" sourcelanguage="en_US">
|
||||
<context>
|
||||
<name>BaseButton</name>
|
||||
<message>
|
||||
<location filename="../base/BaseButton.qml" line="8"/>
|
||||
<source>ok</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Help</name>
|
||||
<message>
|
||||
<location filename="../Help.qml" line="49"/>
|
||||
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
|
||||
<translation variants="yes">
|
||||
<lengthvariant>あなたの仕事は、左のタワーから別の空きスペースに異なるサイズのディスクを転送することです。あなたはタワーの一番上のドライブを移すことができます。一度に複数のディスクを移したり、大きなディスクを小さなディスクに入れることはできません。</lengthvariant>
|
||||
<lengthvariant>あなたの仕事は、左のタワーから別の空きスペースに異なるサイズのディスクを転送することです。あなたはタワーの一番上のドライブを移すことができます。一度に複数のディスクを移したり、大きなディスクを小さなディスクに入れることはできません。</lengthvariant>
|
||||
<lengthvariant>あなたの仕事は、左のタワーから別の空きスペースに異なるサイズのディスクを転送することです。あなたはタワーの一番上のドライブを移すことができます。一度に複数のディスクを移したり、大きなディスクを小さなディスクに入れることはできません。</lengthvariant>
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Help.qml" line="62"/>
|
||||
<source>Do not show again:</source>
|
||||
<translation>再び表示しない:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Help.qml" line="90"/>
|
||||
<source>Ok</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>about</name>
|
||||
<message>
|
||||
<location filename="../about.qml" line="14"/>
|
||||
<source>about</source>
|
||||
<translation>約</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../about.qml" line="37"/>
|
||||
<source>Product of QuasarApp
|
||||
* Developers:
|
||||
* Programmer: Yankovich N. Andrei.
|
||||
* This game is distributed under the LGPLv3 license.
|
||||
* Contact: https://github.com/EndrII
|
||||
* Copyright (C) 2018 Yankovich N. Andrei.</source>
|
||||
<translation>QuasarAppの製品
|
||||
*開発者:
|
||||
*プログラマー:Yankovich N. Andrei。
|
||||
*このゲームはLGPLv3ライセンスの下で配布されています。
|
||||
*お問い合わせ先:https://github.com/EndrII
|
||||
* Copyright(C)2018 Yankovich N. Andrei。</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>game</name>
|
||||
<message>
|
||||
<location filename="../game.qml" line="26"/>
|
||||
<source>Start</source>
|
||||
<translation>スタート</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="37"/>
|
||||
<source>Exit</source>
|
||||
<translation>出口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="48"/>
|
||||
<source>About</source>
|
||||
<translation>約</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="67"/>
|
||||
<source>Tower height:</source>
|
||||
<translation>タワーの高さ:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="192"/>
|
||||
<source>You have passed the level in %0 steps and unlocked level %1
|
||||
Minimum steps for this lvl: %2</source>
|
||||
<translation>あなたは %0 ステップでレベルを通過し、レベル %1 をロック解除しました
|
||||
このlvlの最小手順:%2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="199"/>
|
||||
<source>You have passed the level in %0 steps.
|
||||
Minimum steps for this lvl: %1</source>
|
||||
<translation>%0ステップでレベルを通過しました。
|
||||
このlvlの最小手順:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="301"/>
|
||||
<source>Ok</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../main.qml" line="9"/>
|
||||
<source>Hanoi Towers</source>
|
||||
<translation>ハノイタワーズ</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -73,21 +73,21 @@
|
||||
<translation>Высота башни:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="191"/>
|
||||
<location filename="../game.qml" line="192"/>
|
||||
<source>You have passed the level in %0 steps and unlocked level %1
|
||||
Minimum steps for this lvl: %2</source>
|
||||
<translation>Вы прошли этот уровень за %0 шагов и разблокировали уровень %1
|
||||
Минимум шагов на этом уровне: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="198"/>
|
||||
<location filename="../game.qml" line="199"/>
|
||||
<source>You have passed the level in %0 steps.
|
||||
Minimum steps for this lvl: %1</source>
|
||||
<translation>Вы прошли этот уровень за %0 шагов
|
||||
Минимум шагов на этом уровне: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="300"/>
|
||||
<location filename="../game.qml" line="301"/>
|
||||
<source>Ok</source>
|
||||
<translation>Ok</translation>
|
||||
</message>
|
||||
|
BIN
source/languages/tr.qm
Normal file
BIN
source/languages/tr.qm
Normal file
Binary file not shown.
103
source/languages/tr.ts
Normal file
103
source/languages/tr.ts
Normal file
@ -0,0 +1,103 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="tr_TR">
|
||||
<context>
|
||||
<name>BaseButton</name>
|
||||
<message>
|
||||
<location filename="../base/BaseButton.qml" line="8"/>
|
||||
<source>ok</source>
|
||||
<translation>ok</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Help</name>
|
||||
<message>
|
||||
<location filename="../Help.qml" line="49"/>
|
||||
<source>Your task is to transfer discs of different sizesfrom the left tower to any other free space.You can only transfer the top drive of the tower.You can not transfer several disks at once and put larger disks on small disks.</source>
|
||||
<translation>Göreviniz, sol kuleden farklı boyuttaki diskleri başka bir boş alana aktarmaktır. Kulenin sadece üst sürücüsünü aktarabilirsiniz. Birkaç diski aynı anda transfer edemez ve daha küçük disklere daha büyük diskler yerleştiremezsiniz.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Help.qml" line="62"/>
|
||||
<source>Do not show again:</source>
|
||||
<translation>Tekrar gösterme:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../Help.qml" line="90"/>
|
||||
<source>Ok</source>
|
||||
<translation>ok</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>about</name>
|
||||
<message>
|
||||
<location filename="../about.qml" line="14"/>
|
||||
<source>about</source>
|
||||
<translation>hakkında</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../about.qml" line="37"/>
|
||||
<source>Product of QuasarApp
|
||||
* Developers:
|
||||
* Programmer: Yankovich N. Andrei.
|
||||
* This game is distributed under the LGPLv3 license.
|
||||
* Contact: https://github.com/EndrII
|
||||
* Copyright (C) 2018 Yankovich N. Andrei.</source>
|
||||
<translation>QuasarApp ürünü
|
||||
* Geliştiriciler:
|
||||
* Programcı: Yankovich N. Andrei.
|
||||
* Bu oyun LGPLv3 lisansı altında dağıtılmaktadır.
|
||||
* İletişim: https://github.com/EndrII
|
||||
* Telif Hakkı (C) 2018 Yankovich N. Andrei.</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>game</name>
|
||||
<message>
|
||||
<location filename="../game.qml" line="26"/>
|
||||
<source>Start</source>
|
||||
<translation>başla</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="37"/>
|
||||
<source>Exit</source>
|
||||
<translation>çıkış</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="48"/>
|
||||
<source>About</source>
|
||||
<translation>hakkında</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="67"/>
|
||||
<source>Tower height:</source>
|
||||
<translation>Kule yüksekliği:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="192"/>
|
||||
<source>You have passed the level in %0 steps and unlocked level %1
|
||||
Minimum steps for this lvl: %2</source>
|
||||
<translation>Seviyeyi %0 adımından geçirdiniz ve %1 kilidini açtınız
|
||||
Bu lvl için minimum adımlar: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="199"/>
|
||||
<source>You have passed the level in %0 steps.
|
||||
Minimum steps for this lvl: %1</source>
|
||||
<translation>Seviyeyi %0 adımından geçtiniz.
|
||||
Bu lvl için minimum adımlar:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../game.qml" line="301"/>
|
||||
<source>Ok</source>
|
||||
<translation>ok</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>main</name>
|
||||
<message>
|
||||
<location filename="../main.qml" line="9"/>
|
||||
<source>Hanoi Towers</source>
|
||||
<translation>Hanoi Kuleleri</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
@ -1,19 +1,41 @@
|
||||
#include <QApplication>
|
||||
#include <iostream>
|
||||
//#include <QScreen>
|
||||
#include <QQmlApplicationEngine>
|
||||
#include <QQmlComponent>
|
||||
#include "backEnd.h"
|
||||
#include <QTranslator>
|
||||
|
||||
bool initLocale(const QString &locale, QApplication& app, QTranslator &translator){
|
||||
|
||||
QString defaultLocale = QLocale::system().name();
|
||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_'));
|
||||
|
||||
if(!locale.isEmpty() && translator.load(QString(":/languages/%0").arg(locale))){
|
||||
return app.installTranslator(&translator);
|
||||
}
|
||||
|
||||
if(!translator.load(QString(":/languages/%0").arg(defaultLocale))){
|
||||
return false;
|
||||
}
|
||||
|
||||
return app.installTranslator(&translator);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
QTranslator translator;
|
||||
|
||||
QString defaultLocale = QLocale::system().name();
|
||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_'));
|
||||
QString locale = "";
|
||||
|
||||
translator.load(QString(":/languages/%0").arg(defaultLocale));
|
||||
app.installTranslator(&translator);
|
||||
if(argc > 1) {
|
||||
locale = QString::fromLatin1(argv[1]);
|
||||
}
|
||||
|
||||
if(!initLocale(locale, app, translator)){
|
||||
std::cout << "error load language : " << locale.toStdString() <<std::endl;
|
||||
}
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
qmlRegisterType<BackEnd>("BackEnd",1,0,"BackEnd");
|
||||
|
@ -24,5 +24,7 @@
|
||||
<qresource prefix="/languages">
|
||||
<file alias="ru">languages/ru.qm</file>
|
||||
<file alias="en">languages/en.qm</file>
|
||||
<file alias="ja">languages/ja.qm</file>
|
||||
<file alias="tr">languages/tr.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
x
Reference in New Issue
Block a user