diff --git a/src/activities/gletters/gletters.js b/src/activities/gletters/gletters.js --- a/src/activities/gletters/gletters.js +++ b/src/activities/gletters/gletters.js @@ -153,9 +153,9 @@ // The word is a letter, even if it has several chars (digraph) var letter = level.words[i]; var isUpper = (letter == letter.toLocaleUpperCase()); - if (isUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1) + if (letter.toLocaleLowerCase() !== letter.toLocaleUpperCase() && sisUpper && letters.indexOf(letter.toLocaleLowerCase()) !== -1) items.keyboard.shiftKey = true; - else if (!isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1) + else if (letter.toLocaleLowerCase() !== letter.toLocaleUpperCase() && !isUpper && letters.indexOf(letter.toLocaleUpperCase()) !== -1) items.keyboard.shiftKey = true; else if (letters.indexOf(letter) === -1) letters.push(level.words[i]); @@ -178,7 +178,7 @@ var layout = new Array(); var row = 0; var offset = 0; - while (offset < letters.length-1) { + while (offset < letters.length) { var cols = letters.length <= 10 ? letters.length : (Math.ceil((letters.length-offset) / (3 - row))); layout[row] = new Array(); for (var j = 0; j < cols; j++) diff --git a/src/activities/smallnumbers/ActivityInfo.qml b/src/activities/smallnumbers/ActivityInfo.qml --- a/src/activities/smallnumbers/ActivityInfo.qml +++ b/src/activities/smallnumbers/ActivityInfo.qml @@ -37,5 +37,5 @@ credit: "" section: "computer keyboard math numeration" createdInVersion: 0 - levels: "1,2,3" + levels: "1,2,3,4,5,6,7" } diff --git a/src/activities/smallnumbers/resource/1/Data.qml b/src/activities/smallnumbers/resource/1/Data.qml --- a/src/activities/smallnumbers/resource/1/Data.qml +++ b/src/activities/smallnumbers/resource/1/Data.qml @@ -23,35 +23,36 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 4") + objective: qsTr("Select a number on dice up to 3") difficulty: 1 data: [ - { + + { "level" : "1", - "objective" : qsTr("Select the number on dice up to 2"), + "objective" : qsTr("Select the number 3"), "words" : [ - "1", - "2" + "3", + "3", + "3" ] }, { "level" : "2", - "objective" : qsTr("Select the number on dice up to 3"), + "objective" : qsTr("Select the number on dice up to 2"), "words" : [ "1", - "2", - "3", + "2" ] }, { "level" : "3", - "objective" : qsTr("Select the number on dice up to 4"), + "objective" : qsTr("Select the number on dice up to 3"), "words" : [ "1", "2", "3", - "4" ] } + ] } diff --git a/src/activities/smallnumbers/resource/2/Data.qml b/src/activities/smallnumbers/resource/2/Data.qml --- a/src/activities/smallnumbers/resource/2/Data.qml +++ b/src/activities/smallnumbers/resource/2/Data.qml @@ -23,53 +23,43 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 7") + objective: qsTr("Select a number on dice up to 4") difficulty: 2 data: [ { "level" : "1", - "objective" : qsTr("Select the number on dice up to 4"), + "objective" : qsTr("Select the number 4"), "words" : [ - "1", - "2", - "3", + "4", + "4", "4" - ] + ] }, { "level" : "2", - "objective" : qsTr("Select the number on dice up to 5"), + "objective" : qsTr("Select the number on dice up to 2"), "words" : [ "1", - "2", - "3", - "4", - "5" + "2" ] }, { "level" : "3", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number on dice up to 3"), "words" : [ "1", "2", - "3", - "4", - "5", - "6" + "3" ] }, { "level" : "4", - "objective" : qsTr("Select the number on dice up to 7"), + "objective" : qsTr("Select the number on dice up to 4"), "words" : [ "1", "2", "3", - "4", - "5", - "6", - "7" + "4" ] } ] diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/3/Data.qml --- a/src/activities/smallnumbers/resource/3/Data.qml +++ b/src/activities/smallnumbers/resource/3/Data.qml @@ -23,61 +23,54 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dice up to 5") + difficulty: 3 + data: [ { "level" : "1", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number 5"), "words" : [ - "1", - "2", - "3", - "4", "5", - "6" - ] + "5", + "5" + ] }, { "level" : "2", - "objective" : qsTr("Select the number on dice up to 7"), + "objective" : qsTr("Select the number on dice up to 2"), "words" : [ "1", - "2", - "3", - "4", - "5", - "6", - "7" + "2" ] }, { "level" : "3", - "objective" : qsTr("Select the number on dice up to 8"), + "objective" : qsTr("Select the number on dice up to 3"), "words" : [ "1", "2", - "3", - "4", - "5", - "6", - "7", - "8" + "3" ] }, { "level" : "4", - "objective" : qsTr("Select the number on dice up to 9"), + "objective" : qsTr("Select the number on dice up to 4"), + "words" : [ + "1", + "2", + "3", + "4" + ] + }, + { + "level" : "5", + "objective" : qsTr("Select the number on dice up to 5"), "words" : [ "1", "2", "3", "4", - "5", - "6", - "7", - "8", - "9" + "5" ] } ] diff --git a/src/activities/smallnumbers/resource/2/Data.qml b/src/activities/smallnumbers/resource/4/Data.qml copy from src/activities/smallnumbers/resource/2/Data.qml copy to src/activities/smallnumbers/resource/4/Data.qml --- a/src/activities/smallnumbers/resource/2/Data.qml +++ b/src/activities/smallnumbers/resource/4/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2019 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -23,54 +23,52 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 7") - difficulty: 2 + objective: qsTr("Select a number on dice up to 6") + difficulty: 4 data: [ { "level" : "1", - "objective" : qsTr("Select the number on dice up to 4"), + "objective" : qsTr("Select the number 6"), "words" : [ - "1", - "2", - "3", - "4" - ] + "6", + "6", + "6" + ] }, { "level" : "2", - "objective" : qsTr("Select the number on dice up to 5"), + "objective" : qsTr("Select the number on dice up to 4"), "words" : [ "1", "2", "3", - "4", - "5" + "4" ] }, { "level" : "3", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number on dice up to 5"), "words" : [ "1", "2", "3", "4", - "5", - "6" + "5" ] }, { "level" : "4", - "objective" : qsTr("Select the number on dice up to 7"), + "objective" : qsTr("Select the number on dice up to 6"), "words" : [ "1", "2", "3", "4", "5", - "6", - "7" + "6" ] } + + ] } diff --git a/src/activities/smallnumbers/resource/2/Data.qml b/src/activities/smallnumbers/resource/5/Data.qml copy from src/activities/smallnumbers/resource/2/Data.qml copy to src/activities/smallnumbers/resource/5/Data.qml --- a/src/activities/smallnumbers/resource/2/Data.qml +++ b/src/activities/smallnumbers/resource/5/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2019 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -24,10 +24,19 @@ Dataset { objective: qsTr("Select a number on dice up to 7") - difficulty: 2 + difficulty: 5 data: [ { "level" : "1", + "objective" : qsTr("Select the number 7"), + "words" : [ + "7", + "7", + "7" + ] + }, + { + "level" : "2", "objective" : qsTr("Select the number on dice up to 4"), "words" : [ "1", @@ -37,7 +46,7 @@ ] }, { - "level" : "2", + "level" : "3", "objective" : qsTr("Select the number on dice up to 5"), "words" : [ "1", @@ -48,7 +57,7 @@ ] }, { - "level" : "3", + "level" : "4", "objective" : qsTr("Select the number on dice up to 6"), "words" : [ "1", @@ -60,7 +69,7 @@ ] }, { - "level" : "4", + "level" : "5", "objective" : qsTr("Select the number on dice up to 7"), "words" : [ "1", @@ -72,5 +81,7 @@ "7" ] } + + ] } diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/6/Data.qml copy from src/activities/smallnumbers/resource/3/Data.qml copy to src/activities/smallnumbers/resource/6/Data.qml --- a/src/activities/smallnumbers/resource/3/Data.qml +++ b/src/activities/smallnumbers/resource/6/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2019 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -23,62 +23,69 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dice up to 8") + difficulty: 6 + data: [ { "level" : "1", - "objective" : qsTr("Select the number on dice up to 6"), + "objective" : qsTr("Select the number 8"), + "words" : [ + "8", + "8", + "8" + ] + }, + { + "level" : "2", + "objective" : qsTr("Select the number on dice up to 5"), "words" : [ "1", "2", "3", "4", - "5", - "6" + "5" ] }, { - "level" : "2", - "objective" : qsTr("Select the number on dice up to 7"), + "level" : "3", + "objective" : qsTr("Select the number on dice up to 6"), "words" : [ "1", "2", "3", "4", "5", - "6", - "7" + "6" ] }, { - "level" : "3", - "objective" : qsTr("Select the number on dice up to 8"), + "level" : "4", + "objective" : qsTr("Select the number on dice up to 7"), "words" : [ "1", "2", "3", "4", "5", "6", - "7", - "8" + "7" ] }, { - "level" : "4", - "objective" : qsTr("Select the number on dice up to 9"), + "level" : "5", + "objective" : qsTr("Select the number on dice up to 8"), "words" : [ "1", "2", "3", "4", "5", "6", "7", - "8", - "9" + "8" ] } + + ] } diff --git a/src/activities/smallnumbers/resource/3/Data.qml b/src/activities/smallnumbers/resource/7/Data.qml copy from src/activities/smallnumbers/resource/3/Data.qml copy to src/activities/smallnumbers/resource/7/Data.qml --- a/src/activities/smallnumbers/resource/3/Data.qml +++ b/src/activities/smallnumbers/resource/7/Data.qml @@ -1,9 +1,9 @@ /* GCompris - Data.qml * - * Copyright (C) 2019 Akshay Kumar + * Copyright (C) 2019 Shubham Mishra * * Authors: - * Akshay Kumar + * Shubham Mishra * * 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 @@ -23,11 +23,32 @@ import "../../../../core" Dataset { - objective: qsTr("Select a number on dice up to 9") - difficulty: 3 - data: [ + objective: qsTr("Select a number on dice up to 9") + difficulty: 2 + data: [ { "level" : "1", + "objective" : qsTr("Select the number 9"), + "words" : [ + "9", + "9", + "9", + "9" + ] + }, + { + "level" : "2", + "objective" : qsTr("Select the number on dice up to 5"), + "words" : [ + "1", + "2", + "3", + "4", + "5" + ] + }, + { + "level" : "3", "objective" : qsTr("Select the number on dice up to 6"), "words" : [ "1", @@ -39,7 +60,7 @@ ] }, { - "level" : "2", + "level" : "4", "objective" : qsTr("Select the number on dice up to 7"), "words" : [ "1", @@ -52,7 +73,7 @@ ] }, { - "level" : "3", + "level" : "5", "objective" : qsTr("Select the number on dice up to 8"), "words" : [ "1", @@ -66,7 +87,7 @@ ] }, { - "level" : "4", + "level" : "6", "objective" : qsTr("Select the number on dice up to 9"), "words" : [ "1", @@ -80,5 +101,8 @@ "9" ] } + + + ] }