Changeset View
Changeset View
Standalone View
Standalone View
src/activities/scalesboard_weight_avoirdupois/ScalesboardWeight.qml
Show All 16 Lines | |||||
17 | * | 17 | * | ||
18 | * You should have received a copy of the GNU General Public License | 18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, see <https://www.gnu.org/licenses/>. | 19 | * along with this program; if not, see <https://www.gnu.org/licenses/>. | ||
20 | */ | 20 | */ | ||
21 | import "../scalesboard" | 21 | import "../scalesboard" | ||
22 | 22 | | |||
23 | Scalesboard { | 23 | Scalesboard { | ||
24 | 24 | | |||
25 | function oz(value) { | | |||
26 | /* oz == ounce */ | | |||
27 | return qsTr("%1 oz").arg(value) | | |||
28 | } | | |||
29 | | ||||
30 | function lb(value) { | | |||
31 | /* lb == pound */ | | |||
32 | return qsTr("%1 lb").arg(value) | | |||
33 | } | | |||
34 | | ||||
35 | dataset: [ | | |||
36 | { | | |||
37 | "masses": [[1, lb(1)], [2, lb(2)], [2, lb(2)], [5, lb(5)], | | |||
38 | [5, lb(5)], [10, lb(10)], [10, lb(10)]], | | |||
39 | "targets": [[3, lb(3)], [4, lb(4)], [6, lb(6)], [7, lb(7)], [8, lb(8)], [9, lb(9)]], | | |||
40 | "rightDrop": false, | | |||
41 | "message": qsTr('The "lb" symbol at the end of a number means pound.') + " " + | | |||
42 | qsTr('The pound is a unit of mass, a property which corresponds to the ' + | | |||
43 | 'common perception of how "heavy" an object is. This unit is used in the USA.') | | |||
44 | }, | | |||
45 | { | | |||
46 | "masses": [[1, oz(1)], [2, oz(2)], [2, oz(2)], [4, oz(4)], | | |||
47 | [8, oz(8)], [16, oz(16)]], | | |||
48 | "targets": [[3, oz(3)], [4, oz(4)], [6, oz(6)], [7, oz(7)], | | |||
49 | [16, oz(16)], [24, oz(24)], [28, oz(28)]], | | |||
50 | "rightDrop": false, | | |||
51 | "message": qsTr('The "oz" symbol at the end of a number means ounce. One pound equals sixteen ounces') | | |||
52 | }, | | |||
53 | { | | |||
54 | "masses": [[4, oz(4)], [4, oz(4)], [8, oz(8)], [8, oz(8)], | | |||
55 | [8, oz(8)], [16, lb(1)]], | | |||
56 | "targets": [[16, lb(1)], [20, oz(20)], [32, lb(2)], | | |||
57 | [28, oz(28)]], | | |||
58 | "rightDrop": false, | | |||
59 | "message": qsTr('Remember, one pound ("lb") equals sixteen ounces ("oz").') | | |||
60 | }, | | |||
61 | { | | |||
62 | "masses": [[1, oz(1)], [4, oz(4)], [6, oz(6)], [8, oz(8)], | | |||
63 | [10, oz(10)], [16, lb(1)]], | | |||
64 | "targets": [[3, oz(3)], [9, oz(9)], [11, oz(11)], [32, lb(2)]], | | |||
65 | "rightDrop": true, | | |||
66 | "message": qsTr("Take care, you can drop weights on both sides of the scale.") | | |||
67 | }, | | |||
68 | { | | |||
69 | "masses": [[4, oz(4)], [4, oz(4)], [8, oz(8)], [8, oz(8)], | | |||
70 | [8, oz(8)], [16, lb(1)]], | | |||
71 | "targets": [[16, lb(1)], [20, oz(20)], [32, lb(2)], | | |||
72 | [28, oz(28)]], | | |||
73 | "rightDrop": false, | | |||
74 | "message": qsTr("Now you have to guess the weight of the gift."), | | |||
75 | "question": qsTr("Enter the weight of the gift in ounce: %1") | | |||
76 | }, | | |||
77 | { | | |||
78 | "masses": [[1, oz(1)], [4, oz(4)], [6, oz(6)], [8, oz(8)], | | |||
79 | [10, oz(10)], [16, lb(1)]], | | |||
80 | "targets": [[3, oz(3)], [9, oz(9)], [11, oz(11)], [32, lb(2)]], | | |||
81 | "rightDrop": true, | | |||
82 | "message": qsTr("Take care, you can drop weights on both sides of the scale."), | | |||
83 | "question": qsTr("Enter the weight of the gift in ounce: %1") | | |||
84 | } | | |||
85 | ] | | |||
86 | | ||||
87 | } | 25 | } |