diff --git a/src/activities/drawletters/ActivityInfo.qml b/src/activities/drawletters/ActivityInfo.qml index fa3330015..da6c398a5 100644 --- a/src/activities/drawletters/ActivityInfo.qml +++ b/src/activities/drawletters/ActivityInfo.qml @@ -1,40 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Nitish Chauhan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "drawletters/Drawletters.qml" difficulty: 1 icon: "drawletters/drawletters.svg" author: "Nitish Chauhan <nitish.nc18@gmail.com>" demo: true //: Activity title title: qsTr("Draw Letters") //: Help title description: qsTr("Connect the dots to draw letters") // intro: "Click on the selected points and draw the letter" //: Help goal - goal: qsTr("Children will learn how to draw different letters in a fun way.") + goal: qsTr("Learning how to draw the letters in a funny way.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Draw the letter by connecting the dots in the correct order") credit: "" section: "reading" createdInVersion: 7000 } diff --git a/src/activities/drawnumbers/ActivityInfo.qml b/src/activities/drawnumbers/ActivityInfo.qml index 033af5590..21dd2efa9 100644 --- a/src/activities/drawnumbers/ActivityInfo.qml +++ b/src/activities/drawnumbers/ActivityInfo.qml @@ -1,40 +1,40 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2016 Nitish Chauhan * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "drawnumbers/Drawnumbers.qml" difficulty: 1 icon: "drawnumbers/drawnumbers.svg" author: "Nitish Chauhan <nitish.nc18@gmail.com>" demo: true //: Activity title title: qsTr("Draw Numbers") //: Help title description: qsTr("Connect the dots to draw numbers from 0 to 9") // intro: "Draw the numbers by connecting the dots in the correct order." //: Help goal - goal: qsTr("Children will learn how to draw different numbers in a fun way.") + goal: qsTr("Learning how to draw the numbers in a funny way.") //: Help prerequisite prerequisite: "" //: Help manual manual: qsTr("Draw the numbers by connecting the dots in the correct order") credit: "" section: "math numeration" createdInVersion: 7000 } diff --git a/src/activities/magic-hat-minus/MagicHat.qml b/src/activities/magic-hat-minus/MagicHat.qml index dee49a662..079c3b7cf 100644 --- a/src/activities/magic-hat-minus/MagicHat.qml +++ b/src/activities/magic-hat-minus/MagicHat.qml @@ -1,237 +1,237 @@ /* GCompris - MagicHat.qml * * Copyright (C) 2014 Thibaut ROMAIN * * Authors: * (GTK+ version) * Thibaut ROMAIN (Qt Quick port) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import QtQuick 2.6 import GCompris 1.0 import "../../core" import "magic-hat.js" as Activity import "." ActivityBase { id: activity onStart: focus = true onStop: {} property string mode: "minus" pageComponent: Image { id: background anchors.fill: parent source: Activity.url + "background.svg" sourceSize.width: Math.max(parent.width, parent.height) fillMode: Image.PreserveAspectCrop property int starSize: Math.min(rightLayout.width / 12, background.height / 16) signal start signal stop property var starColors : ["1", "2", "3"] Component.onCompleted: { activity.start.connect(start) activity.stop.connect(stop) } onStart: Activity.start(items, mode) onStop: Activity.stop() // Add here the QML items you need to access in javascript QtObject { id: items property Item main: activity.main property alias background: background property GCAudio audioEffects: activity.audioEffects property alias bar: bar property alias bonus: bonus property alias hat: theHat property alias introductionText: introText property var repeatersList: [repeaterFirstRow, repeaterSecondRow, repeaterAnswerRow] } Item { id: mainlayout anchors.left: background.left width: background.width * 0.4 height: background.height z: 11 Hat { id: theHat starsSize: background.starSize audioEffects: activity.audioEffects } GCText { id: introText anchors { horizontalCenter: parent.horizontalCenter top: parent.top topMargin: 20 * ApplicationInfo.ratio } width: parent.width - 5 * ApplicationInfo.ratio fontSize: regularSize font.bold: true style: Text.Outline styleColor: "black" color: "white" wrapMode: TextEdit.WordWrap horizontalAlignment: TextEdit.AlignHCenter text: qsTr("Click on the hat to begin the game") } GCText { //: The math operation - text: mode == "minus" ? qsTr("-") : qsTr("+") + text: mode == "minus" ? qsTr("−") : qsTr("+") anchors.right: mainlayout.right anchors.rightMargin: 10 y: secondRow.y fontSize: 66 color: "white" style: Text.Outline styleColor: "black" } } Grid { id: rightLayout anchors { left: mainlayout.right right: background.right rightMargin: 10 verticalCenter: background.verticalCenter verticalCenterOffset: background.height/8 } height: background.height columns: 1 Column { id: firstRow height: background.starSize * 4 spacing: 5 z: 10 Repeater { id: repeaterFirstRow model: 3 StarsBar { barGroupIndex: 0 barIndex: index width: rightLayout.width backgroundColor: "grey" starsColor: starColors[index] theHat: items.hat starsSize: background.starSize opacity: 0 } } } Column { id: secondRow height: background.starSize * 4 spacing: 5 z: 9 Repeater { id: repeaterSecondRow model: 3 StarsBar { barGroupIndex: 1 barIndex: index width: rightLayout.width backgroundColor: "grey" starsColor: starColors[index] theHat: items.hat starsSize: background.starSize opacity: 0 } } } Rectangle { width: (background.starSize + 5) * 10 - 5 height: 5 * ApplicationInfo.ratio color: "white" } Rectangle { width: (background.starSize + 5) * 10 - 5 height: 10 * ApplicationInfo.ratio opacity: 0 } Column { id: answerRow height: background.starSize * 4 spacing: 5 Repeater { id: repeaterAnswerRow model: 3 StarsBar { barGroupIndex: 2 barIndex: index width: rightLayout.width backgroundColor: "#53b9c9" starsColor: starColors[index] authorizeClick: false theHat: items.hat starsSize: background.starSize opacity: 0 } } } } DialogHelp { id: dialogHelp onClose: home() } Bar { id: bar content: BarEnumContent { value: help | home | level } onHelpClicked: { displayDialog(dialogHelp) } onPreviousLevelClicked: Activity.previousLevel() onNextLevelClicked: Activity.nextLevel() onHomeClicked: activity.home() } BarButton { id: okButton anchors { bottom: bar.top right: parent.right rightMargin: 10 * ApplicationInfo.ratio bottomMargin: 10 * ApplicationInfo.ratio } source: "qrc:/gcompris/src/core/resource/bar_ok.svg" sourceSize.width: 60 * ApplicationInfo.ratio onClicked: Activity.verifyAnswer() } Bonus { id: bonus Component.onCompleted: win.connect(Activity.nextLevel) } } } diff --git a/src/activities/memory-math-add-tux/ActivityInfo.qml b/src/activities/memory-math-add-tux/ActivityInfo.qml index 650a5602c..377ab7817 100644 --- a/src/activities/memory-math-add-tux/ActivityInfo.qml +++ b/src/activities/memory-math-add-tux/ActivityInfo.qml @@ -1,43 +1,43 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "memory-math-add-tux/MemoryMathAddTux.qml" difficulty: 3 icon: "memory-math-add-tux/memory-math-add-tux.svg" author: "JB BUTET <ashashiwa@gmail.com>" demo: true //: Activity title title: qsTr("Addition memory game against Tux") //: Help title - description: qsTr("Turn the cards over to find two numbers which add up the same, until all the cards are gone. Tux do the same. You have to beat it !") + description: qsTr("Turn the cards over to find two numbers which add up the same, until all the cards are gone. Tux will do the same. You have to beat it !") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal goal: qsTr("Practice adding up, until all the cards are gone.") //: Help prerequisite prerequisite: qsTr("Addition") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an adding-up sum, or the answer to the sum. An adding-up sum looks like this: 2 + 2 = 4 The numbers on one side of the equals sign (=) have to be the same as the number on the other side. So 2 (1, 2) and 2 more (3, 4) makes 4. Count aloud when you work this out, and count on your fingers, because the more ways you do something, the better you remember it. You can also use blocks, or buttons, or anything you can count. If you have lots of brothers and sisters, you can count them! Or the kids in your class at school. Sing counting songs. Count lots of things, for practice, and you'll be very good at adding-up! In this game, these cards are hiding the two parts of an adding-up sum (also called an addition sum). You need to find the two parts of the sum, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole sum. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper sum. When you do that, both those cards disappear! When you've made them all disappear, found more sums than Tux and you've won the game!") credit: "" section: "math memory" } diff --git a/src/activities/memory-math-minus-tux/ActivityInfo.qml b/src/activities/memory-math-minus-tux/ActivityInfo.qml index 8a63e8282..7fb39c9bb 100644 --- a/src/activities/memory-math-minus-tux/ActivityInfo.qml +++ b/src/activities/memory-math-minus-tux/ActivityInfo.qml @@ -1,41 +1,41 @@ /* GCompris - ActivityInfo.qml * * Copyright (C) 2015 JB BUTET * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ import GCompris 1.0 ActivityInfo { name: "memory-math-minus-tux/MemoryMathMinusTux.qml" difficulty: 4 icon: "memory-math-minus-tux/memory-math-minus-tux.svg" author: "JB BUTET <ashashiwa@mgail.com>" demo: true //: Activity title title: qsTr("Subtraction memory game against Tux") //: Help title description: qsTr("Turn the cards over to find two numbers which subtract the same, until all the cards are gone.") // intro: "Turn over two cards to match the calculation with its answer." //: Help goal - goal: qsTr("Practice subtraction, until all the cards are gone. Tux do the same") + goal: qsTr("Practice subtraction, until all the cards are gone. Tux will do the same") //: Help prerequisite prerequisite: qsTr("subtraction") //: Help manual manual: qsTr("You can see some cards, but you can't see what's on the other side of them. Each card is hiding an operation, or the answer to it. In this game, these cards are hiding the two parts of an operation. You need to find the two parts of the operation, and bring them together again. Click on a card to see what number it's hiding, then try to find the other card that goes with it, to make a whole operation. You can only turn over two cards in one go, so you need to remember where the numbers are hiding, then you can match them when you find their other half. You're doing the job of the equals sign, and the numbers need you to put them together and make a proper equality. When you do that, both those cards disappear! When you've made them all disappear, found more operations than Tux and you've won the game!") credit: "" section: "math memory" } diff --git a/src/activities/memory/math_util.js b/src/activities/memory/math_util.js index 4eef892fb..653c32cb3 100644 --- a/src/activities/memory/math_util.js +++ b/src/activities/memory/math_util.js @@ -1,111 +1,111 @@ /* GCompris * * Copyright (C) 2014 Bruno Coudoin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ .import "qrc:/gcompris/src/core/core.js" as Core function getAddTable(table) { var result = [] for(var i = 1; i <= 10; ++i) { if(Math.floor(Math.random()*2)) // The mathematical addition sign result.push(["" + table + " " + qsTr("+") + " " + i, table + i]) else result.push(["" + i + " " + qsTr("+") + " " + table, table + i]) } return result } function getMinusTable(table) { var result = [] for(var i = 1; i <= 10; ++i) { // The mathematical subtraction sign - result.push(["" + (i + table) + " " + qsTr("-") + " " + table, + result.push(["" + (i + table) + " " + qsTr("−") + " " + table, i]) } return result } function getMultTable(table) { var result = [] for(var i = 1; i <= 10; ++i) { if(Math.floor(Math.random()*2)) // The mathematical multiplication sign result.push(["" + table + " " + qsTr("×") + " " + i, table * i]) else result.push(["" + i + " " + qsTr("×") + " " + table, table * i]) } return result } function getDivTable(table) { var result = [] for(var i = 1; i <= 10; ++i) { // The mathematical division sign result.push(["" + i * table + " " + qsTr("÷") + " " + table, i]) } return result } function removeDuplicates(tAll) { Core.shuffle(tAll) var result = [] // Remove duplicate values with the same result for(var i = 0; i < tAll.length; ++i) { var gotIt = false for(var j = 0; j < result.length; ++j) { if(tAll[i][1] === result[j][1]) gotIt = 1 } if(!gotIt) result.push(tAll[i]) } return result } function getAddMinusTable(table) { var t1 = getAddTable(table) var t2 = getMinusTable(table) return removeDuplicates(t1.concat(t2)) } function getAddMinusMultTable(table) { var t1 = getAddTable(table) var t2 = getMinusTable(table) var t3 = getMultTable(table) return removeDuplicates(t1.concat(t2, t3)) } function getAddMinusMultDivTable(table) { var t1 = getAddTable(table) var t2 = getMinusTable(table) var t3 = getMultTable(table) var t4 = getDivTable(table) return removeDuplicates(t1.concat(t2, t3, t4)) } function getMultDivTable(table) { var t1 = getMultTable(table) var t2 = getDivTable(table) return removeDuplicates(t1.concat(t2)) }