@openbooknetwork/hesap 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/package.json +2 -2
  2. package/src/client.css +254 -1
  3. package/src/families/counters/add-figures.js +85 -0
  4. package/src/families/counters/add-goals.js +82 -0
  5. package/src/families/counters/add-model.js +82 -0
  6. package/src/families/counters/add.js +442 -0
  7. package/src/families/counters/add.mjs +102 -0
  8. package/src/families/counters/bonds.js +5 -5
  9. package/src/families/counters/client.css +126 -1
  10. package/src/families/counters/client.js +10 -12
  11. package/src/families/counters/count-figures.js +23 -3
  12. package/src/families/counters/count-model.js +5 -0
  13. package/src/families/counters/count.js +31 -9
  14. package/src/families/counters/count.mjs +5 -3
  15. package/src/families/counters/counter.js +25 -0
  16. package/src/families/counters/goals.js +1 -9
  17. package/src/families/counters/i18n/en.yaml +142 -30
  18. package/src/families/counters/i18n/tr.yaml +116 -4
  19. package/src/families/counters/index.mjs +11 -6
  20. package/src/families/counters/match-figures.js +60 -0
  21. package/src/families/counters/match-goals.js +63 -0
  22. package/src/families/counters/match-model.js +93 -0
  23. package/src/families/counters/match.js +399 -0
  24. package/src/families/counters/match.mjs +102 -0
  25. package/src/families/counters/order-figures.js +46 -0
  26. package/src/families/counters/order-model.js +69 -0
  27. package/src/families/counters/order.js +199 -0
  28. package/src/families/counters/order.mjs +62 -0
  29. package/src/families/counters/reading.js +66 -0
  30. package/src/families/counters/scenes.js +18 -0
  31. package/src/families/line/client.css +118 -0
  32. package/src/families/line/client.js +12 -0
  33. package/src/families/line/figures.js +143 -0
  34. package/src/families/line/goals.js +168 -0
  35. package/src/families/line/i18n/en.yaml +61 -0
  36. package/src/families/line/i18n/tr.yaml +61 -0
  37. package/src/families/line/index.mjs +227 -0
  38. package/src/families/line/lens.js +49 -0
  39. package/src/families/line/line.js +624 -0
  40. package/src/families/line/model.js +219 -0
  41. package/src/families.mjs +2 -1
  42. package/src/i18n/en.yaml +211 -31
  43. package/src/i18n/tr.yaml +184 -4
  44. package/src/kit/i18n/en.yaml +8 -1
  45. package/src/kit/i18n/tr.yaml +7 -0
  46. package/src/kit/kit.css +9 -0
  47. package/src/kit/panel.js +9 -4
  48. package/src/kit/random.js +9 -0
  49. package/src/kit/written.js +70 -0
  50. package/src/node.mjs +13 -1
@@ -0,0 +1,219 @@
1
+ // What a page of the line scene holds and what it reads out. The build and the browser both use this file, so a
2
+ // page's text and its live values agree. A point stands at a mark, counted from 0 at the left end, and the number
3
+ // of mark k is from + k * step.
4
+ import { PLUS, MINUS } from '../../kit/written.js';
5
+
6
+ // The number line, the stepping stones of the frog, and the stones over the number line.
7
+ export const LOOKS = ['line', 'stones', 'stones-on-line', 'street', 'book'];
8
+ // An unmarked line has a mark at each end alone, and its point moves freely between them. The book is one.
9
+ export const isFree = spec => spec.marks === 'ends';
10
+ export const STONES = ['stones', 'stones-on-line'];
11
+ export const isStones = spec => STONES.includes(spec.look);
12
+ export const STONES_TO = 20; // The most stones a pond holds.
13
+ export const GAPS = 100; // The most gaps a marked line holds.
14
+
15
+ // The line keeps its gaps when the reader picks another step, so the gaps are counted at the page's own step.
16
+ export const gapsOf = spec => (spec.to - spec.from) / spec.step;
17
+ export const numberAt = (spec, k, step = spec.step) => spec.from + k * step;
18
+ export const markOf = (spec, n, step = spec.step) => (n - spec.from) / step;
19
+ export const isMark = (spec, n) => n >= spec.from && n <= spec.to && Number.isInteger(markOf(spec, n));
20
+ // A mark carries its label when the page labels every mark, only the two ends, the multiples of a number, or the
21
+ // numbers of a list. A labelled mark is long and the others are short.
22
+ export function labelled(spec, n) {
23
+ if (spec.labels === 'all') return true;
24
+ if (spec.labels === 'ends') return n === spec.from || n === spec.to;
25
+ return Array.isArray(spec.labels) ? spec.labels.includes(n) : n % spec.labels === 0;
26
+ }
27
+ // The middle of the line, which a page with middle draws as a long mark with its label.
28
+ export const middleOf = (spec, step = spec.step) => numberAt(spec, gapsOf(spec) / 2, step);
29
+ // The numbers a page asks the reader to place, one after another.
30
+ export const findsOf = spec => spec.find == null ? [] : [spec.find].flat();
31
+ // The cards a page lays out: the list it names, or one for each blank mark.
32
+ export const cardsOf = spec => !spec.cards ? [] : spec.cards === true ? [...spec.blank] : spec.cards;
33
+ // shuffled puts the cards of cards: true in an order the dice draw, and draws again while they stand in the order
34
+ // of their marks, which would give the answer away.
35
+ export function shuffled(cards, dice) {
36
+ if (cards.length < 2) return [...cards];
37
+ for (;;) { const c = dice.shuffle(cards); if (c.some((n, i) => i && n < c[i - 1])) return c; }
38
+ }
39
+
40
+ // opening gives the page's state as it opens. at is the mark of the point, or null on a page without one, second
41
+ // the mark of the second point or null, base the mark where the reader began to jump, step the step the line counts
42
+ // in, checked whether the reader has pressed Check since the point last moved, open the gap the reader opened,
43
+ // cards the order of the cards in their row, placed the cards that sit on their marks, middle whether the middle
44
+ // shows, find the place in the list of numbers to find, and shown whether Show has revealed where it is.
45
+ export function opening(spec) {
46
+ // A page with start counts its jumps from the start, and its point takes the start when the page leaves it out.
47
+ const at = spec.point === false ? null : markOf(spec, spec.point ?? spec.start ?? spec.from);
48
+ return { at, base: spec.start != null ? markOf(spec, spec.start) : at, second: spec.second == null ? null : markOf(spec, spec.second), step: spec.step, checked: false, open: null,
49
+ cards: cardsOf(spec), placed: [], middle: spec.middle === true, find: 0, shown: false, estimate: spec.estimate ?? null, offs: offsetsOf(spec) };
50
+ }
51
+
52
+ // A page with moved opens with some marks off their places. offs holds each such mark's offset, in gaps, and a mark
53
+ // stands at posOf, its own mark plus its offset.
54
+ export const offsetsOf = spec => Object.fromEntries((spec.moved ?? []).map(m => [markOf(spec, m.mark), m.by]));
55
+ export const posOf = (s, k) => k + (s.offs?.[k] ?? 0);
56
+ // The marks settle within a tenth of a gap, and a mark keeps a fifth of a gap from each neighbour.
57
+ export const SETTLE = 0.1, KEEP = 0.2;
58
+ // slide moves mark k towards the place to, in gaps, between its two neighbours where they stand. The ends stay. keep
59
+ // gives the least room between marks a and b, in gaps: a fifth of a gap, or more where their labels need it.
60
+ export function slide(spec, s, k, to, keep = () => KEEP) {
61
+ if (k <= 0 || k >= gapsOf(spec)) return s;
62
+ const at = Math.max(posOf(s, k - 1) + keep(k - 1, k), Math.min(posOf(s, k + 1) - keep(k, k + 1), to));
63
+ return { ...s, offs: { ...s.offs, [k]: at - k } };
64
+ }
65
+ // Two labels of a moved line stay this far apart, so two numbers next to each other never read as one. The build
66
+ // checks a page on a 390px phone, whose stage is PHONE wide, with a digit DIGIT of a label's size wide.
67
+ export const LABELS_APART = 10, PHONE = 357, DIGIT = 0.6;
68
+ // labelKeep gives keep for a line on a stage W pixels wide: the room in gaps that holds two labels LABELS_APART apart,
69
+ // or a fifth of a gap where that is more. width gives a label's width in pixels, measured in the browser and
70
+ // estimated from its digits in the build, at the size labelRows sets.
71
+ export function labelKeep(spec, W, width) {
72
+ const n = gapsOf(spec), gap = gapOn(W, n, false);
73
+ if (!width) {
74
+ const digits = k => String(numberAt(spec, k)).length, font = labelRows(DIGIT * Math.max(digits(0), digits(n)), gap, { base: gap >= 34 ? 16 : 14 }).font;
75
+ width = k => DIGIT * font * digits(k);
76
+ }
77
+ return (a, b) => Math.max(KEEP, (LABELS_APART + (width(a) + width(b)) / 2) / gap);
78
+ }
79
+ // even says every mark lies within a tenth of a gap of its place, and settle then puts every mark on its place.
80
+ export const even = s => Object.values(s.offs).every(o => Math.abs(o) <= SETTLE + 1e-9);
81
+ export const settle = s => even(s) && Object.keys(s.offs).length ? { ...s, offs: {} } : s;
82
+ // The words under a line with moved marks, and how a mark's two gaps compare, for a reader who does not see them.
83
+ export const gapsKey = s => even(s) ? 'gaps-equal' : 'gaps-unequal';
84
+ export function sides(s, k) {
85
+ const left = posOf(s, k) - posOf(s, k - 1), right = posOf(s, k + 1) - posOf(s, k);
86
+ return Math.abs(left - right) <= 2 * SETTLE + 1e-9 ? 'mark-even' : left > right ? 'mark-left' : 'mark-right';
87
+ }
88
+
89
+ // The jumps run from base to the point, one arc over each gap, all in one direction: a press against the last jump
90
+ // takes it back.
91
+ export const jumpsOf = s => s.at === null ? 0 : Math.abs(s.at - s.base);
92
+ export const arcsOf = s => Array.from({ length: jumpsOf(s) }, (_, i) => {
93
+ const dir = Math.sign(s.at - s.base), from = s.base + i * dir;
94
+ return { from, to: from + dir, dir };
95
+ });
96
+ // jump moves the point one gap, dir 1 to the right and -1 to the left, and gives null at an end of the line.
97
+ export function jump(spec, s, dir) {
98
+ const at = s.at + dir;
99
+ return at < 0 || at > gapsOf(spec) ? null : { ...s, at, checked: false, shown: false };
100
+ }
101
+ // place puts a point on mark k after a drag. A drag of the point starts the jumps again from its new mark.
102
+ export const place = (s, who, k) => who === 'second' ? { ...s, second: k } : { ...s, at: k, base: k, checked: false, shown: false };
103
+ // show reveals where the number to find is, and next moves to the next number of the list, back to the first after
104
+ // the last.
105
+ export const show = s => ({ ...s, shown: true });
106
+ export const next = (spec, s) => ({ ...s, find: (s.find + 1) % findsOf(spec).length, shown: false });
107
+ // middle draws the middle's mark, or takes it away.
108
+ export const toggleMiddle = s => ({ ...s, middle: !s.middle });
109
+ // numbered says whether Show, or a goal that holds, writes the number at the point on the point. A point of an
110
+ // unmarked line may stand between two numbers and carries none. The fixed point of an estimate page stands on a whole
111
+ // number and shows it.
112
+ export const numbered = spec => !isFree(spec) || spec.estimate != null;
113
+ // standing says where a point of an unmarked line stands, for a screen reader: on a whole number, or between two.
114
+ export function standing(spec, s) {
115
+ const n = numberAt(spec, s.at, s.step), near = Math.round(n);
116
+ return Math.abs(n - near) < 1e-6 ? { on: near } : { between: [Math.floor(n), Math.ceil(n)] };
117
+ }
118
+ // estimate sets the reader's estimate, which takes the reveal away.
119
+ export const estimate = (s, n) => ({ ...s, estimate: n, shown: false });
120
+ // moveStart moves the start to mark k and carries the point and its arcs along, so the jumps keep their number and
121
+ // their direction. The start stops where the point would leave the line.
122
+ // On a page that counts on to the second point, the start also stops one mark left of the second point.
123
+ export function moveStart(spec, s, k) {
124
+ const n = gapsOf(spec), d = s.at - s.base, lo = Math.max(0, -d), hi = Math.min(n, n - d, keepsRight(spec) ? s.second - 1 : n), base = Math.max(lo, Math.min(hi, k));
125
+ return { ...s, base, at: base + d, checked: false };
126
+ }
127
+ // keepsRight says the second point stays right of the start: a page with start and written: difference counts on
128
+ // from the less number, the start, to the greater, the second point.
129
+ export const keepsRight = spec => spec.start != null && spec.written === 'difference';
130
+ // secondTo gives the mark the second point stops on when the reader moves it to k: one right of the start at least on
131
+ // a page that keeps it right.
132
+ export const secondTo = (spec, s, k) => keepsRight(spec) ? Math.max(k, s.base + 1) : k;
133
+ // writtenOf gives the written line of a page with written, as the kit writes it: the start, the sign of the jumps'
134
+ // direction, the number they add or take away, and the number at the point. written: difference writes the second
135
+ // point minus the start, and its answer once the point stands on the second point. ids gives the link id of each
136
+ // number of the line.
137
+ export function writtenOf(spec, s) {
138
+ if (!spec.written) return null;
139
+ const at = numberAt(spec, s.at, s.step), start = numberAt(spec, s.base, s.step);
140
+ if (spec.written === 'difference') {
141
+ // The second point stands right of the start, so the line reads the second point minus the start.
142
+ return { a: numberAt(spec, s.second, s.step), sign: MINUS, b: start, open: s.at !== s.second, ids: { a: 'second', b: 'start', c: 'jumps' } };
143
+ }
144
+ return { a: start, sign: at >= start ? PLUS : MINUS, b: Math.abs(at - start), ids: { a: 'start', b: 'jumps', c: 'point' } };
145
+ }
146
+ // pick changes the step. Every label changes, and the point and its jumps keep their marks.
147
+ export const pick = (s, step) => ({ ...s, step });
148
+ // open opens gap k, the gap from mark k to mark k + 1, or closes it when it is open already.
149
+ export const open = (s, k) => ({ ...s, open: s.open === k ? null : k });
150
+ // lay puts card n on the blank mark m. It stays there when m is its own number, and goes back to the row otherwise.
151
+ export const lay = (spec, s, n, m) => n === m && spec.blank.includes(m) && !s.placed.includes(n) ? { ...s, placed: [...s.placed, n] } : s;
152
+
153
+ // tensOf gives the ten before and the ten after the point, or null while the point is on a ten.
154
+ export function tensOf(spec, s) {
155
+ const n = numberAt(spec, s.at, s.step);
156
+ return n % 10 === 0 ? null : { before: n - n % 10, after: n - n % 10 + 10 };
157
+ }
158
+
159
+ // The line of words names the number that comes later in the count, or the one number both points are on.
160
+ export function readingOf(spec, s) {
161
+ const a = numberAt(spec, s.at, s.step), b = numberAt(spec, s.second, s.step);
162
+ return a === b ? { key: 'reading-both', a, b } : { key: 'reading-later', a: Math.max(a, b), b: Math.min(a, b) };
163
+ }
164
+
165
+ // The ids a page offers its text, and the ones a readout may show: every id but the line of words. A challenge page
166
+ // offers none, as its numbers are drawn when it opens.
167
+ export function measuresOf(spec) {
168
+ if (spec.challenge) return [];
169
+ // A page that draws its line names no number of it, as each draw changes them.
170
+ if (spec.draw) return ['placed'];
171
+ // A page that asks the reader to place a number reads out no number at the point.
172
+ // An unmarked line, and an estimate page, read out no number at the point either.
173
+ const has = spec.point !== false && spec.find == null && !isFree(spec) && spec.estimate == null;
174
+ return [...(has ? ['point'] : []), ...(spec.start != null ? ['start'] : []), ...(spec.written ? ['written', 'reading'] : []), ...(spec.moved ? ['gaps'] : []), ...(spec.find != null ? ['find'] : []), ...(spec.estimate != null ? ['estimate'] : []), ...(spec.middle ? ['middle'] : []), ...(spec.second != null ? ['second'] : []), ...(spec.reading ? ['reading'] : []), ...(spec.jump ? ['jumps'] : []),
175
+ ...(spec.bracket ? ['ten-before', 'ten-after'] : []), ...(spec.cards ? ['placed'] : []), 'step', 'from', 'to'];
176
+ }
177
+ // The written line and its words take a readout, and the words of two points and of the gaps take none.
178
+ export const readoutsOf = spec => measuresOf(spec).filter(id => (id !== 'reading' || spec.written) && id !== 'gaps');
179
+
180
+ // counts gives every value a page can read out, as the page stands. The right end follows the step, and the ten
181
+ // before and the ten after read null while the point is on a ten.
182
+ export function counts(spec, s) {
183
+ const at = s.at === null ? null : numberAt(spec, s.at, s.step), tens = spec.bracket && at !== null ? tensOf(spec, s) : null;
184
+ return { point: at, second: s.second == null ? null : numberAt(spec, s.second, s.step), jumps: jumpsOf(s), step: s.step, from: spec.from, to: numberAt(spec, gapsOf(spec), s.step),
185
+ 'ten-before': tens?.before ?? null, 'ten-after': tens?.after ?? null, placed: s.placed.length,
186
+ start: s.base === null ? null : numberAt(spec, s.base, s.step), find: findsOf(spec)[s.find] ?? null, estimate: s.estimate, middle: spec.middle ? middleOf(spec, s.step) : null };
187
+ }
188
+
189
+ // The width of the line on a stage W pixels wide, as the gap between two marks. The stones keep about half a gap
190
+ // past each end, for the bank on the left and the last stone on the right.
191
+ export const EDGE = 28, EDGE_PHONE = 14, MAX_GAP = 80, MAX_W = 1000;
192
+ export const gapOn = (W, n, stones) => Math.min((W - 2 * (W < 500 ? EDGE_PHONE : EDGE)) / (n + (stones ? 1.2 : 0)), MAX_GAP, MAX_W / n);
193
+
194
+ // labelRows sets the labels of a line: their size, and one row or two. Every labelled mark keeps its label, no label
195
+ // is smaller than least, and two labels next to each other stand at least apart pixels apart. wide is the width of
196
+ // the widest label at size 1 and spacing the room from one labelled mark to the next. One row is chosen while it
197
+ // holds the labels at least's size, and two rows, with every other label on the second, where it does not.
198
+ export function labelRows(wide, spacing, { base, least = 10, apart = 4 }) {
199
+ const fit = rows => Math.min(base, (rows * spacing - apart) / wide);
200
+ const one = fit(1);
201
+ return one >= least ? { font: one, rows: 1 } : { font: Math.max(least, fit(2)), rows: 2 };
202
+ }
203
+
204
+ // drawLine draws a line of label cards for a page with draw: a step of 2, 5 or 10, a left end that is a multiple of
205
+ // the step from the step up to 100 less 6 steps, and 6 gaps, so the line starts past zero and ends at 100 or below.
206
+ // Two marks next to each other carry labels, the second to the fifth mark with the one after it, so a blank lies on
207
+ // each side. The cards are the five blanks and one number that fits no mark, the number after the right label or
208
+ // before the left label, in an order that is not from least to greatest. A draw differs from the line in last.
209
+ export const DRAW_STEPS = [2, 5, 10], DRAW_GAPS = 6, DRAW_TOP = 100;
210
+ export function drawLine(dice, last = null) {
211
+ for (;;) {
212
+ const step = dice.pick(DRAW_STEPS), hi = (DRAW_TOP - DRAW_GAPS * step) / step, from = dice.int(1, hi) * step, k = dice.int(1, 4);
213
+ const at = j => from + j * step, labels = [at(k), at(k + 1)];
214
+ const blank = Array.from({ length: DRAW_GAPS + 1 }, (_, j) => at(j)).filter(n => !labels.includes(n));
215
+ const odd = dice.pick([labels[1] + 1, labels[0] - 1]);
216
+ const line = { from, to: at(DRAW_GAPS), step, labels, blank, cards: shuffled([...blank, odd], dice), odd };
217
+ if (!last || last.from !== line.from || last.step !== line.step || last.labels[0] !== line.labels[0]) return line;
218
+ }
219
+ }
package/src/families.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  // Every family of scenes hesap ships. A family's Node half exports its id, the scenes it owns, the schema of their
2
2
  // fields, read and start.
3
3
  import counters from './families/counters/index.mjs';
4
+ import line from './families/line/index.mjs';
4
5
 
5
- export default [counters];
6
+ export default [counters, line];
package/src/i18n/en.yaml CHANGED
@@ -1,4 +1,4 @@
1
- hint: Move the figure and watch the numbers follow it.
1
+ hint: "Move things on the figure and watch the numbers change."
2
2
  tab_map: Figure
3
3
  map_data: Data
4
4
  map_view: View
@@ -9,16 +9,23 @@ hesap_start: Start
9
9
  hesap_time: Time
10
10
  hesap_reset: Start again
11
11
  hesap_undo: Undo
12
+ hesap_check: Check
12
13
  hesap_hint: Hint
13
14
  hesap_another: Another one
14
15
  hesap_solved: Solved
15
16
  hesap_not-yet: Not solved yet.
16
- counters_lead: "Tap and drag the counters, and watch the numbers follow them."
17
+ hesap_written: Number sentence
18
+ hesap_written-reading: In words
19
+ hesap_written-plus: "{a} plus {b} is equal to {c}"
20
+ hesap_written-minus: "{a} minus {b} is equal to {c}"
21
+ hesap_written-plus-open: "{a} plus {b}"
22
+ hesap_written-minus-open: "{a} minus {b}"
23
+ counters_lead: "Tap or drag the counters and watch the numbers change."
17
24
  counters_whole: Whole
18
25
  counters_first: First part
19
26
  counters_second: Second part
20
27
  counters_empty: Empty cells
21
- counters_added: Blue added
28
+ counters_added: Added
22
29
  counters_found: Splits found
23
30
  counters_ways: Splits in all
24
31
  counters_hands-first: Left hand
@@ -27,11 +34,11 @@ counters_hands-whole: Beads
27
34
  counters_one-first: Counters
28
35
  counters_one-found: Pairs found
29
36
  counters_one-ways: Pairs in all
30
- counters_two-first: Red
31
- counters_two-second: Blue
32
- counters_cup-first: Part in sight
33
- counters_cup-second: Hidden part
34
- counters_cup-added: Blue added
37
+ counters_two-first: First part
38
+ counters_two-second: Second part
39
+ counters_cup-first: Known part
40
+ counters_cup-second: Missing part
41
+ counters_cup-added: Added
35
42
  counters_pins-first: Standing
36
43
  counters_pins-empty: Knocked down
37
44
  counters_cars-first: Parked
@@ -42,8 +49,7 @@ counters_fill: Fill the second frame
42
49
  counters_unfill: Empty the second frame
43
50
  counters_lift: Lift the cup
44
51
  counters_lower: Put the cup back
45
- counters_check: Check
46
- counters_blue: Blue counters
52
+ counters_blue: Second part
47
53
  counters_tray: Tray
48
54
  counters_pile: Pile
49
55
  counters_cup: Cup
@@ -56,15 +62,15 @@ counters_free: Free
56
62
  counters_pair: "{a} and {b}"
57
63
  counters_list-splits: "Splits of {x}"
58
64
  counters_list-pairs: "Pairs that make {x}"
59
- counters_goal-make-whole: "The red tray holds {part}. Set the blue counters so that the frame holds {whole}, then press Check."
60
- counters_goal-make-whole-two: "The red tray holds {part}. Set the blue counters so that the two frames hold {whole}, then press Check."
61
- counters_goal-hidden-part: "The whole is {whole}, and the part in sight is {part}. Build the part under the cup in the tray, then lift the cup."
62
- counters_note-short: Some cells are still empty.
63
- counters_note-over: Some counters found no cell.
64
- counters_note-more: The tray holds more counters than the cup.
65
- counters_note-fewer: The tray holds fewer counters than the cup.
66
- counters_hint-make-whole: "Count on from {part} to {whole}. Each number you say after {part} is one blue counter."
67
- counters_hint-hidden-part: "Count on from {part} to {whole}. Each number you say after {part} is one counter under the cup."
65
+ counters_goal-make-whole: "Set the second part so that it makes {whole} with the first part, {part}, then press Check."
66
+ counters_goal-make-whole-two: "Set the second part so that it makes {whole} with the first part, {part}, then press Check."
67
+ counters_goal-hidden-part: "The whole is {whole} and the known part is {part}. Put the missing part in the tray, then lift the cup."
68
+ counters_note-short: "There are still empty cells, so add more counters to the second part."
69
+ counters_note-over: "There are more counters than cells, so take some counters out of the second part."
70
+ counters_note-more: "There are more counters in the tray than under the cup, so put some back on the pile."
71
+ counters_note-fewer: "There are fewer counters in the tray than under the cup, so put more in the tray."
72
+ counters_hint-make-whole: "Count on from {part} to {whole} and keep track of how many numbers you say. That is how many counters the second part needs."
73
+ counters_hint-hidden-part: "Count on from {part} to {whole} and keep track of how many numbers you say. That is how many counters are under the cup, so put that many in the tray."
68
74
  counters_total: How many
69
75
  counters_tag-count: Last number said
70
76
  counters_take-count: Left
@@ -85,17 +91,191 @@ counters_kind-person: Person
85
91
  counters_gap: Empty place
86
92
  counters_basket: Basket
87
93
  counters_stop-sign: Bus
88
- counters_goal-fill-basket: "Put {target} apples in the basket, then press Check."
89
- counters_goal-count-on: "The box holds {box}. Put counters beside it until there are {target} in all, then press Check."
90
- counters_goal-count-back: "Take counters away until {target} are left, then press Check."
91
- counters_note-fill-basket-more: The basket holds more apples than that.
92
- counters_note-fill-basket-fewer: The basket holds fewer apples than that.
93
- counters_note-count-on-more: The box and the counters make more than that.
94
- counters_note-count-on-fewer: The box and the counters make fewer than that.
95
- counters_note-count-back-more: More counters are left than that.
96
- counters_note-count-back-fewer: Fewer counters are left than that.
97
- counters_hint-fill-basket: "Say one number for each apple you put in, and stop at {target}."
98
- counters_hint-count-on: "Start from {box} and say the next number for each counter you put beside the box. Stop at {target}."
99
- counters_hint-count-back: "Start from {start} and say the number before for each counter you take away. Stop at {target}."
94
+ counters_goal-fill-basket: "Put apples in the basket until it holds {target}, then press Check."
95
+ counters_goal-count-on: "The box holds {box}. Put counters in the dashed space until there are {target} altogether, then press Check."
96
+ counters_goal-count-back: "Take counters away until the number left is {target}, then press Check."
97
+ counters_note-fill-basket-more: "There are more than {target} apples in the basket, so take some out."
98
+ counters_note-fill-basket-fewer: "There are fewer than {target} apples in the basket, so put more in."
99
+ counters_note-count-on-more: "The box and the counters you put out come to more than {target}, so take some counters away."
100
+ counters_note-count-on-fewer: "The box and the counters you put out come to fewer than {target}, so put out more counters."
101
+ counters_note-count-back-more: "The number left is greater than {target}, so take more counters away."
102
+ counters_note-count-back-fewer: "The number left is less than {target}, so put some counters back."
103
+ counters_hint-fill-basket: "Count each apple as you put it in, and stop when you get to {target}."
104
+ counters_hint-count-on: "Start at {box}. Say the next number each time you put out a counter, and stop when you get to {target}."
105
+ counters_hint-count-back: "Start at {start}. Count back one number each time you take a counter away, and stop when you get to {target}."
100
106
  counters_roll: Roll the ball
101
107
  counters_set-up: Set up the pins
108
+ counters_ctl-top: Top row
109
+ counters_ctl-bottom: Bottom row
110
+ counters_ctl-spread: Spacing
111
+ counters_match-unpaired: Without a partner
112
+ counters_match-pairs: Pairs
113
+ counters_word-same: The same
114
+ counters_tag-more: more
115
+ counters_tag-fewer: fewer
116
+ counters_tag-same: the same
117
+ counters_tag-more-n: "{n} more"
118
+ counters_tag-fewer-n: "{n} fewer"
119
+ counters_match-top: Top row
120
+ counters_match-bottom: Bottom row
121
+ counters_match-counted: Last number said
122
+ counters_match-added: Added
123
+ counters_match-taken: Taken away
124
+ counters_match-chairs-top: Players
125
+ counters_match-chairs-bottom: Chairs
126
+ counters_chairs-stop: Stop the music
127
+ counters_chairs-next: Next round
128
+ counters_chairs-again: Play again
129
+ counters_row-now: now
130
+ counters_row-before: before
131
+ counters_match-trail-top: Now
132
+ counters_match-trail-bottom: Before
133
+ counters_one-less: one less
134
+ counters_one-more: one more
135
+ counters_sides-count: Number
136
+ counters_sides-before: Number before
137
+ counters_sides-after: Number after
138
+ counters_reading-less: "{a} is less than {b}"
139
+ counters_reading-same: "{a} is the same as {b}"
140
+ counters_reading-greater: "{a} is greater than {b}"
141
+ counters_is-less: is less than
142
+ counters_is-greater: is greater than
143
+ counters_least: least
144
+ counters_greatest: greatest
145
+ counters_show-rows: Show the rows
146
+ counters_order-top: First number
147
+ counters_order-bottom: Second number
148
+ counters_order-top-rows: "Full rows of the first"
149
+ counters_order-top-last: "Last row of the first"
150
+ counters_order-bottom-rows: "Full rows of the second"
151
+ counters_order-bottom-last: "Last row of the second"
152
+ counters_reading-equal: "{a} is equal to {b}"
153
+ counters_verdict-true: "true"
154
+ counters_verdict-false: "false"
155
+ counters_sign: Sign
156
+ counters_match-reading: In words
157
+ counters_match-verdict: True or false
158
+ counters_match-scoreboard-top: Home
159
+ counters_match-scoreboard-bottom: Away
160
+ counters_score-top: Home goal
161
+ counters_score-bottom: Away goal
162
+ counters_new-match: New match
163
+ counters_goal-same-rows: "Give the top row as many counters as the bottom row, then press Check."
164
+ counters_note-same-rows-top: "Some counters in the top row have no partner, so take some away from the top row."
165
+ counters_note-same-rows-bottom: "Some counters in the bottom row have no partner, so add counters to the top row."
166
+ counters_hint-same-rows: "Pair up the counters in the two rows. Then add counters to the top row or take some away until every counter has a partner."
167
+ counters_goal-one-less: "Give the top row one fewer counter than the bottom row, then press Check."
168
+ counters_note-one-less-over: "The top row has too many counters, so take some away."
169
+ counters_note-one-less-short: "The top row has too few counters, so add some."
170
+ counters_hint-one-less: "Pair up the counters in the two rows. Then change the top row until just one counter in the bottom row has no partner."
171
+ counters_goal-right-sign: "Put the sign that makes the number sentence true between the two rows, then press Check."
172
+ counters_note-right-sign-more: The top row has more counters than this sign says.
173
+ counters_note-right-sign-fewer: The top row has fewer counters than this sign says.
174
+ counters_hint-right-sign: "Pair up the counters in the two rows. The row with counters left over has more, and the open side of the sign faces that row. If no counters are left over, the sign is =."
175
+ counters_new-numbers: New numbers
176
+ counters_add-first: First number
177
+ counters_add-second: Second number
178
+ counters_add-waiting: Still to join
179
+ counters_add-sum: Sum
180
+ counters_add-dice-sum: Counters in the frames
181
+ counters_add-roll: Roll
182
+ counters_add-die: "Die showing {x}"
183
+ counters_add-counter-waiting: "Counter waiting to join"
184
+ counters_add-counter-joined: "Counter that has joined"
185
+ counters_add-take-second: Taken away
186
+ counters_add-left: Left
187
+ counters_add-take-counter: Counter
188
+ counters_add-take-ring: "Empty ring where a counter was taken away"
189
+ counters_add-shelf-first: Morning
190
+ counters_add-shelf-second: Afternoon
191
+ counters_add-shelf-sum: Sold
192
+ counters_add-shelf-written: Jars sold
193
+ counters_add-shelf-written-left: Jars left
194
+ counters_add-shelf-reading: Jars sold in words
195
+ counters_add-shelf-reading-left: Jars left in words
196
+ counters_add-shelf-crate: Sold in the
197
+ counters_add-shelf-jar: Jar on the shelf
198
+ counters_add-sold-jar: "Jar {x} in the crate"
199
+ counters_add-to-ten: Makes ten
200
+ counters_add-rest: The rest
201
+ counters_add-seedling: Seedling
202
+ counters_add-sprout: Sprout
203
+ counters_add-seed-waiting: Seed in the packet
204
+ counters_add-seed-joined: Sprout in the tray
205
+ counters_goal-find-sum: "Set the sum of {a} and {b} on the Sum stepper, then press Check."
206
+ counters_goal-find-sum-done: "A group of {a} and a group of {b} make {sum} altogether."
207
+ counters_note-find-sum-less: "The sum is less than {n}."
208
+ counters_note-find-sum-greater: "The sum is greater than {n}."
209
+ counters_hint-find-sum: "Picture {a} counters in the frames and {b} more counters joining them. Start at {a} and count on one number for each counter that joins."
210
+ counters_goal-steps-to-ten: "Split the {second} in {calc} into the part that makes ten with {first} and the rest, then press Check."
211
+ counters_goal-steps-to-ten-done: "{line}. The two steps are {toTen} and {rest}."
212
+ counters_note-steps-to-ten-past: "{step} goes past 10."
213
+ counters_note-steps-to-ten-short: "{step} does not reach 10."
214
+ counters_note-steps-to-ten-more: "{x} and {y} make more than {second}, so make the rest smaller."
215
+ counters_note-steps-to-ten-less: "{x} and {y} make less than {second}, so make the rest greater."
216
+ counters_hint-steps-to-ten-plus: "First work out how many {first} needs to make 10, and set that. Then set what is left of the {second}."
217
+ counters_hint-steps-to-ten-minus: "First work out how many to take away to bring {first} down to 10, and set that. Then set what is left of the {second}."
218
+ counters_add-take-to-ten: Down to ten
219
+ counters_goal-steps-to-ten-minus: "Split the {second} in {calc} into the part that takes {first} down to ten and the rest, then press Check."
220
+ counters_add-shelf-left: Left
221
+ line_lead: "Move the point along the line and read the number at its mark."
222
+ line_jump-left: Jump left
223
+ line_jump-right: Jump right
224
+ line_point: Number at the point
225
+ line_point-short: Point
226
+ line_second: Number at the second point
227
+ line_second-short: Second point
228
+ line_jumps: Jumps
229
+ line_step: Step
230
+ line_from: Left end
231
+ line_to: Right end
232
+ line_point-name: Point
233
+ line_second-name: Second point
234
+ line_reading-later: "{a} is greater than {b}"
235
+ line_reading-both: "Both points are on {a}"
236
+ line_goal-place: "Put the point on {target}, then press Check."
237
+ line_goal-place-done: "The point is on {target}."
238
+ line_note-place-left: "The point is to the left of {target}. Move it to the right."
239
+ line_note-place-right: "The point is to the right of {target}. Move it to the left."
240
+ line_ten-before: Ten before
241
+ line_ten-after: Ten after
242
+ line_placed: Cards placed
243
+ line_placed-short: Placed
244
+ line_placed-of: "{n} of {all}"
245
+ line_open-gap: "Gap from {a} to {b}"
246
+ line_card: "Card {x}"
247
+ line_find: Number to find
248
+ line_show: Show
249
+ line_next: Next number
250
+ line_middle: Middle
251
+ line_van: Van
252
+ line_estimate: Estimate
253
+ line_open-book: Open the book
254
+ line_bookmark: Bookmark
255
+ line_hint-place-unmarked: "Press Middle to mark {mid}. {target} is between {lo} and {hi}, and closer to {near}. Put the point there."
256
+ line_goal-place-unmarked-done: "The point is close to {target}."
257
+ line_between: "between {a} and {b}"
258
+ line_gaps-unequal: Some gaps are longer than others.
259
+ line_gaps-equal: "All the gaps are the same length."
260
+ line_mark-name: "Mark {x}"
261
+ line_mark-left: The gap on its left is longer
262
+ line_mark-right: The gap on its right is longer
263
+ line_mark-even: "The gaps on both sides of it are equal"
264
+ line_start: Start
265
+ line_goal-jump: "Jump from {start} to find {calc}, then press Check."
266
+ line_note-jump-few: "The point has made {done} of the {n} jumps that {calc} needs. Keep jumping."
267
+ line_note-jump-many: "The point has made {done} jumps, but {calc} needs only {n}. Jump back."
268
+ line_new-line: New line
269
+ line_goal-place-unmarked: "Put the point close to {target}, then press Check."
270
+ line_find-short: Find
271
+ line_hint-place-on: "{target} is between the long marks for {before} and {after}. Start at {before} and count on one mark at a time until you get to {target}."
272
+ line_hint-place-back: "{target} is between the long marks for {before} and {after}. Start at {after} and count back one mark at a time until you get to {target}."
273
+ line_hint-place-two-labels-on: "The labels {a} and {b} are on marks next to each other, so the step from one mark to the next is {b} − {a}. Count on from {b} in steps of that size until you get to {target}."
274
+ line_hint-place-two-labels-back: "The labels {a} and {b} are on marks next to each other, so the step from one mark to the next is {b} − {a}. Count back from {a} in steps of that size until you get to {target}."
275
+ line_hint-jump-plus: "Start at {start} and press Jump right {n} times. At each jump, say the next number. The first two are {next} and {then}."
276
+ line_hint-jump-minus: "Start at {start} and press Jump left {n} times. At each jump, say the number before. The first two are {next} and {then}."
277
+ line_hint-jump-plus-one: "Start at {start}. Press Jump right once and say the next number, {next}."
278
+ line_hint-jump-minus-one: "Start at {start}. Press Jump left once and say the number before, {next}."
279
+ line_note-jump-way-plus: "{calc} is an addition, so the jumps go to the right from {start}."
280
+ line_note-jump-way-minus: "{calc} is a subtraction, so the jumps go to the left from {start}."
281
+ line_note-jump-few-none: "The point is still on {start}. Make the jumps for {calc} from there."