Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions ui/+mediacenter/Banner.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@
* Copyright 2018 by Aditya Mehra <aix.m@outlook.com>
*/

import QtQuick.Layouts 1.4
import QtQuick 2.12
import QtQuick.Controls 2.12
import org.kde.kirigami 2.11 as Kirigami
import QtQuick.Layouts 1.15
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import QtGraphicalEffects 1.0

import Qt5Compat.GraphicalEffects
import "code/helper.js" as HelperJS

Item {
Expand Down
22 changes: 11 additions & 11 deletions ui/+mediacenter/FoodWizardHome.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick.Layouts 1.4
import QtQuick 2.8
import QtQuick.Controls 2.2
import org.kde.kirigami 2.10 as Kirigami
import QtQuick.Layouts 1.15
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.15 as Kirigami
import Mycroft 1.0 as Mycroft
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects
import "code/helper.js" as HelperJS

Mycroft.Delegate {
Expand Down Expand Up @@ -76,7 +76,7 @@ Mycroft.Delegate {
Label {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
text: "Find Something To Cook With Custom Ingredients"
text: qsTr("Find Something To Cook With Custom Ingredients")
anchors.left: headsImage.right
anchors.top: parent.top
anchors.bottom: parent.bottom
Expand Down Expand Up @@ -122,7 +122,7 @@ Mycroft.Delegate {
}
}

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sound/clicked.wav"))
triggerGuiEvent("foodwizard.close", {})
}
Expand All @@ -149,7 +149,7 @@ Mycroft.Delegate {
KeyNavigation.up: closeBtn
focus: true

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
txtFldInternal.forceActiveFocus()
}

Expand All @@ -159,13 +159,13 @@ Mycroft.Delegate {
anchors.margins: Kirigami.Units.largeSpacing
KeyNavigation.down: answerButton
font.pixelSize: txtFld.height * 0.25
placeholderText: "Add a list of ingredients e.g., orange, cheese, chicken, lime"
placeholderText: qsTr("Add a list of ingredients e.g., orange, cheese, chicken, lime")

onAccepted: {
Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sound/clicked.wav"))
triggerGuiEvent("foodwizard.searchrecipe", {"query": txtFldInternal.text})
}
Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sound/clicked.wav"))
triggerGuiEvent("foodwizard.searchrecipe", {"query": txtFldInternal.text})
}
Expand Down Expand Up @@ -207,7 +207,7 @@ Mycroft.Delegate {
answerButton.opacity = 1
}

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
clicked()
}
}
Expand Down
32 changes: 24 additions & 8 deletions ui/+mediacenter/RecipeDetail.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 2.12
import QtQuick.Layouts 1.4
import QtQuick.Controls 2.12
import org.kde.kirigami 2.11 as Kirigami
import QtGraphicalEffects 1.0
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import Qt5Compat.GraphicalEffects
import "code/helper.js" as HelperJS

Mycroft.Delegate {
Expand All @@ -30,16 +30,16 @@ Mycroft.Delegate {
property bool horizontalMode: width > height ? 1 : 0
fillWidth: true

Keys.onBackPressed: {
Keys.onBackPressed: (event)=> {
parent.parent.parent.currentIndex--
parent.parent.parent.currentItem.contentItem.forceActiveFocus()
}

Keys.onUpPressed: {
Keys.onUpPressed: (event)=> {
backButton.forceActiveFocus()
}

Keys.onDownPressed: {
Keys.onDownPressed: (event)=> {
readRecipeButton.forceActiveFocus()
}

Expand Down Expand Up @@ -76,6 +76,10 @@ Mycroft.Delegate {
}
}

Keys.onReturnPressed: (event)=> {
clicked()
}

onClicked: {
root.parent.parent.parent.currentIndex--
root.parent.parent.parent.currentItem.contentItem.forceActiveFocus()
Expand Down Expand Up @@ -409,6 +413,10 @@ Mycroft.Delegate {
}
}

Keys.onReturnPressed: (event)=> {
clicked()
}

onClicked: {
if (ingredientsLabel.visible) {
triggerGuiEvent("foodwizard.readrecipe.ingredients", {})
Expand Down Expand Up @@ -520,6 +528,10 @@ Mycroft.Delegate {
color: Kirigami.Theme.textColor
}
}

Keys.onReturnPressed: (event)=> {
clicked()
}
}

TabButton {
Expand All @@ -544,6 +556,10 @@ Mycroft.Delegate {
color: Kirigami.Theme.textColor
}
}

Keys.onReturnPressed: (event)=> {
clicked()
}
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions ui/+mediacenter/SearchRecipe.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick.Layouts 1.4
import QtQuick 2.8
import QtQuick.Controls 2.2
import org.kde.kirigami 2.11 as Kirigami
import QtQuick.Layouts 1.15
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects

import "code/helper.js" as HelperJS

Expand Down Expand Up @@ -50,7 +50,7 @@ Mycroft.Delegate {
uiGridView.forceActiveFocus()
}

Keys.onBackPressed: {
Keys.onBackPressed: (event)=> {
parent.parent.parent.currentIndex--
parent.parent.parent.currentItem.contentItem.forceActiveFocus()
}
Expand Down Expand Up @@ -140,7 +140,7 @@ Mycroft.Delegate {
triggerGuiEvent("foodwizard.showrecipe", {"recipe": RecipeUrl});
}

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
clicked()
}

Expand All @@ -151,14 +151,14 @@ Mycroft.Delegate {
}
}

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
card.clicked()
}
}
}

Kirigami.Heading {
text: "No recipes found"
text: qsTr("No recipes found")
parent: root
anchors.centerIn: parent
visible: uiGridView.count == 0
Expand Down
10 changes: 5 additions & 5 deletions ui/Banner.qml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* Copyright 2018 by Aditya Mehra <aix.m@outlook.com>
*/

import QtQuick.Layouts 1.4
import QtQuick 2.12
import QtQuick.Controls 2.12
import org.kde.kirigami 2.11 as Kirigami
import QtQuick.Layouts 1.15
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects

import "code/helper.js" as HelperJS

Expand Down
20 changes: 10 additions & 10 deletions ui/FoodWizardHome.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick.Layouts 1.4
import QtQuick 2.8
import QtQuick.Controls 2.2
import org.kde.kirigami 2.10 as Kirigami
import QtQuick.Layouts 1.15
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects
import "code/helper.js" as HelperJS

Mycroft.Delegate {
Expand Down Expand Up @@ -76,7 +76,7 @@ Mycroft.Delegate {
Label {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
text: "Find Something To Cook With Custom Ingredients"
text: qsTr("Find Something To Cook With Custom Ingredients")
anchors.left: headsImage.right
anchors.top: parent.top
anchors.bottom: parent.bottom
Expand Down Expand Up @@ -122,7 +122,7 @@ Mycroft.Delegate {
}
}

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sound/clicked.wav"))
triggerGuiEvent("foodwizard.close", {})
}
Expand All @@ -149,7 +149,7 @@ Mycroft.Delegate {
KeyNavigation.up: closeBtn
focus: true

Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
txtFldInternal.forceActiveFocus()
}

Expand All @@ -159,13 +159,13 @@ Mycroft.Delegate {
anchors.margins: Kirigami.Units.largeSpacing
KeyNavigation.down: answerButton
font.pixelSize: txtFld.height * 0.25
placeholderText: "Add a list of ingredients e.g., orange, cheese, chicken, lime"
placeholderText: qsTr("Add a list of ingredients e.g., orange, cheese, chicken, lime")

onAccepted: {
Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sound/clicked.wav"))
triggerGuiEvent("foodwizard.searchrecipe", {"query": txtFldInternal.text})
}
Keys.onReturnPressed: {
Keys.onReturnPressed: (event)=> {
Mycroft.SoundEffects.playClickedSound(Qt.resolvedUrl("sound/clicked.wav"))
triggerGuiEvent("foodwizard.searchrecipe", {"query": txtFldInternal.text})
}
Expand Down
12 changes: 6 additions & 6 deletions ui/RecipeDetail.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick 2.12
import QtQuick.Layouts 1.4
import QtQuick.Controls 2.12
import org.kde.kirigami 2.11 as Kirigami
import QtGraphicalEffects 1.0
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import Qt5Compat.GraphicalEffects
import "code/helper.js" as HelperJS

Mycroft.Delegate {
Expand All @@ -30,7 +30,7 @@ Mycroft.Delegate {
property bool horizontalMode: width > height ? 1 : 0
fillWidth: true

Keys.onBackPressed: {
Keys.onBackPressed: (event)=> {
parent.parent.parent.currentIndex--
parent.parent.parent.currentItem.contentItem.forceActiveFocus()
}
Expand Down
12 changes: 6 additions & 6 deletions ui/SearchRecipe.qml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import QtQuick.Layouts 1.4
import QtQuick 2.8
import QtQuick.Controls 2.2
import org.kde.kirigami 2.11 as Kirigami
import QtQuick.Layouts 1.15
import QtQuick 2.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.19 as Kirigami
import Mycroft 1.0 as Mycroft
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects

import "code/helper.js" as HelperJS

Expand Down Expand Up @@ -158,7 +158,7 @@ Mycroft.Delegate {
}

Kirigami.Heading {
text: "No recipes found"
text: qsTr("No recipes found")
parent: root
anchors.centerIn: parent
visible: uiGridView.count == 0
Expand Down
22 changes: 22 additions & 0 deletions ui/translations/FoodWizardHome_de.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>FoodWizardHome</name>
<message>
<location filename="../FoodWizardHome.qml" line="79"/>
<source>Find Something To Cook With Custom Ingredients</source>
<translation>Finden Sie etwas zum Kochen mit benutzerdefinierten Zutaten</translation>
</message>
<message>
<location filename="../FoodWizardHome.qml" line="162"/>
<source>Add a list of ingredients e.g., orange, cheese, chicken, lime</source>
<translation>Fügen Sie eine Zutatenliste hinz</translation>
</message>
<message>
<location filename="../FoodWizardHome.qml" line="192"/>
<source>Find Recipes</source>
<translation>Rezepte finden</translation>
</message>
</context>
</TS>
Loading