This commit is contained in:
朱子楚\zhuzi
2024-03-11 18:55:33 +08:00
parent 38a277801d
commit 463aa38bc2
31 changed files with 506 additions and 313 deletions

View File

@ -47,39 +47,39 @@
<name>FluentInitalizrWindow</name>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="31"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="32"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="31"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="32"/>
<source>FluentUI Initalizr</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="52"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="52"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="53"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="53"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="60"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="60"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="61"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="61"/>
<source>Create In</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="67"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="67"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="65"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="65"/>
<source>Browse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="98"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="98"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="95"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="95"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="106"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="106"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="103"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="103"/>
<source>Create</source>
<translation type="unfinished"></translation>
</message>
@ -102,22 +102,22 @@
<context>
<name>InitalizrHelper</name>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="48"/>
<location filename="src/helper/InitalizrHelper.cpp" line="73"/>
<source>The name cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="52"/>
<location filename="src/helper/InitalizrHelper.cpp" line="77"/>
<source>The creation path cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="57"/>
<location filename="src/helper/InitalizrHelper.cpp" line="82"/>
<source>The path does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="63"/>
<location filename="src/helper/InitalizrHelper.cpp" line="88"/>
<source>%1 folder already exists</source>
<translation type="unfinished"></translation>
</message>

View File

@ -47,39 +47,39 @@
<name>FluentInitalizrWindow</name>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="31"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="32"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="11"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="31"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="32"/>
<source>FluentUI Initalizr</source>
<translation type="unfinished">FluentUI脚手架</translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="52"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="52"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="53"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="53"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="60"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="60"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="61"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="61"/>
<source>Create In</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="67"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="67"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="65"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="65"/>
<source>Browse</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="98"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="98"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="95"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="95"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/FluentInitalizrWindow.qml" line="106"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="106"/>
<location filename="qml/window/FluentInitalizrWindow.qml" line="103"/>
<location filename="qml-Qt6/window/FluentInitalizrWindow.qml" line="103"/>
<source>Create</source>
<translation type="unfinished"></translation>
</message>
@ -102,22 +102,22 @@
<context>
<name>InitalizrHelper</name>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="48"/>
<location filename="src/helper/InitalizrHelper.cpp" line="73"/>
<source>The name cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="52"/>
<location filename="src/helper/InitalizrHelper.cpp" line="77"/>
<source>The creation path cannot be empty</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="57"/>
<location filename="src/helper/InitalizrHelper.cpp" line="82"/>
<source>The path does not exist</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="src/helper/InitalizrHelper.cpp" line="63"/>
<location filename="src/helper/InitalizrHelper.cpp" line="88"/>
<source>%1 folder already exists</source>
<translation type="unfinished"></translation>
</message>

View File

@ -60,9 +60,6 @@ FluWindow {
width: 300
placeholderText: qsTr("Create In")
anchors.verticalCenter: parent.verticalCenter
Component.onCompleted: {
text = FluTools.toLocalPath(StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0])
}
}
FluButton{
text:qsTr("Browse")
@ -76,7 +73,6 @@ FluWindow {
FolderDialog{
id:folder_dialog
folder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
onAccepted: {
text_box_path.text = FluTools.toLocalPath(currentFolder)
}

View File

@ -245,7 +245,7 @@ FluWindow {
id:com_reveal
CircularReveal{
id:reveal
target:window.layoutContainer()
target:window.contentItem
anchors.fill: parent
onAnimationFinished:{
//动画结束后释放资源
@ -274,7 +274,7 @@ FluWindow {
return
}
loader_reveal.sourceComponent = com_reveal
var target = window.layoutContainer()
var target = window.contentItem
var pos = button.mapToItem(target,0,0)
var mouseX = pos.x
var mouseY = pos.y

View File

@ -60,9 +60,6 @@ FluWindow {
width: 300
placeholderText: qsTr("Create In")
anchors.verticalCenter: parent.verticalCenter
Component.onCompleted: {
text = FluTools.toLocalPath(StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0])
}
}
FluButton{
text:qsTr("Browse")
@ -76,7 +73,6 @@ FluWindow {
FolderDialog{
id:folder_dialog
folder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
onAccepted: {
text_box_path.text = FluTools.toLocalPath(currentFolder)
}

View File

@ -242,10 +242,10 @@ FluWindow {
}
Component{
id:com_reveal
id: com_reveal
CircularReveal{
id:reveal
target:window.layoutContainer()
id: reveal
target: window.contentItem
anchors.fill: parent
onAnimationFinished:{
//动画结束后释放资源
@ -274,7 +274,7 @@ FluWindow {
return
}
loader_reveal.sourceComponent = com_reveal
var target = window.layoutContainer()
var target = window.contentItem
var pos = button.mapToItem(target,0,0)
var mouseX = pos.x
var mouseY = pos.y

View File

@ -19,6 +19,7 @@ void TranslateHelper::init(QQmlEngine* engine){
_translator = new QTranslator(this);
qApp->installTranslator(_translator);
QString translatorPath = QGuiApplication::applicationDirPath()+"/i18n";
_translator->load(QString::fromStdString("%1/example_%2.qm").arg(translatorPath,_current));
_engine->retranslate();
if(_translator->load(QString::fromStdString("%1/example_%2.qm").arg(translatorPath,_current))){
_engine->retranslate();
}
}