@khanacademy/perseus 58.0.0 → 59.0.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.
@@ -0,0 +1,733 @@
1
+ /**
2
+ * The translated strings that are used to render Perseus.
3
+ */
4
+
5
+ /**
6
+ * Untranslated strings used in Perseus. To be used by an external
7
+ * translator to produce translated strings, passed in as `PerseusStrings`.
8
+ * !! Note: Ensure that all escape sequences are double-escaped. (e.g. `\\text` -> `\\\\text`)
9
+ */
10
+ const strings = {
11
+ closeKeypad: "close math keypad",
12
+ openKeypad: "open math keypad",
13
+ mathInputBox: "Math input box",
14
+ removeHighlight: "Remove highlight",
15
+ addHighlight: "Add highlight",
16
+ hintPos: "Hint #%(pos)s",
17
+ errorRendering: "Error rendering: %(error)s",
18
+ APPROXIMATED_PI_ERROR: "Your answer is close, but you may " + "have approximated pi. Enter your " + "answer as a multiple of pi, like " + "12 pi or " + "2/3 pi",
19
+ EXTRA_SYMBOLS_ERROR: "We could not understand your " + "answer. Please check your answer for extra " + "text or symbols.",
20
+ NEEDS_TO_BE_SIMPLFIED_ERROR: "Your answer is almost correct, " + "but it needs to be simplified.",
21
+ MISSING_PERCENT_ERROR: "Your answer is almost correct, " + "but it is missing a " + "<code>\\\\%</code> at the end.",
22
+ MULTIPLICATION_SIGN_ERROR: "I'm a computer. I only understand " + "multiplication if you use an asterisk " + "(*) as the multiplication sign.",
23
+ WRONG_CASE_ERROR: "Your answer includes use of a variable with the wrong case.",
24
+ WRONG_LETTER_ERROR: "Your answer includes a wrong variable letter.",
25
+ invalidSelection: "Make sure you select something for every row.",
26
+ ERROR_TITLE: "Oops!",
27
+ ERROR_MESSAGE: "Sorry, I don't understand that!",
28
+ hints: "Hints",
29
+ getAnotherHint: "Get another hint",
30
+ deprecatedStandin: "Sorry, this part of the question is no longer available. 😅 Don't worry, you won't be graded on this part. Keep going!",
31
+ keepTrying: "Keep trying",
32
+ tryAgain: "Try again",
33
+ check: "Check",
34
+ correctExcited: "Correct!",
35
+ nextQuestion: "Next question",
36
+ skipToTitle: "Skip to %(title)s",
37
+ current: "Current",
38
+ correct: "Correct",
39
+ correctSelected: "Correct (selected)",
40
+ correctCrossedOut: "Correct (but you crossed it out)",
41
+ incorrect: "Incorrect",
42
+ incorrectSelected: "Incorrect (selected)",
43
+ hideExplanation: "Hide explanation",
44
+ explain: "Explain",
45
+ INVALID_MESSAGE_PREFIX: "We couldn't grade your answer.",
46
+ DEFAULT_INVALID_MESSAGE_1: "It looks like you left something blank or ",
47
+ DEFAULT_INVALID_MESSAGE_2: "entered in an invalid answer.",
48
+ integerExample: "an integer, like $6$",
49
+ properExample: "a *proper* fraction, like $1/2$ or $6/10$",
50
+ simplifiedProperExample: "a *simplified proper* fraction, like $3/5$",
51
+ improperExample: "an *improper* fraction, like $10/7$ or $14/8$",
52
+ simplifiedImproperExample: "a *simplified improper* fraction, like $7/4$",
53
+ mixedExample: "a mixed number, like $1\\\\ 3/4$",
54
+ decimalExample: "an *exact* decimal, like $0.75$",
55
+ percentExample: "a percent, like $12.34\\\\%$",
56
+ piExample: "a multiple of pi, like $12$ pi or $2/3$ pi",
57
+ yourAnswer: "**Your answer should be** ",
58
+ yourAnswerLabel: "Your answer:",
59
+ addPoints: "Click to add points",
60
+ addVertices: "Click to add vertices",
61
+ tapMultiple: "Tap each dot on the image to select all answers that apply.",
62
+ tapSingle: "Tap each dot on the image to select an answer.",
63
+ clickMultiple: "Click each dot on the image to select all answers that apply.",
64
+ clickSingle: "Click each dot on the image to select an answer.",
65
+ choices: "Choices:",
66
+ answers: {
67
+ one: "%(num)s answer",
68
+ other: "%(num)s answers"
69
+ },
70
+ hideAnswersToggleLabel: "Hide answer choices",
71
+ moves: {
72
+ one: "Moves: %(num)s",
73
+ other: "Moves: %(num)s"
74
+ },
75
+ clickTiles: "Click on the tiles to change the lights.",
76
+ turnOffLights: "You must turn on all of the lights to continue.",
77
+ fillAllCells: "Make sure you fill in all cells in the matrix.",
78
+ molecularDrawing: "A molecular structure drawing. SMILES notation: %(content)s",
79
+ switchDirection: "Switch direction",
80
+ circleOpen: "Make circle open",
81
+ circleFilled: "Make circle filled",
82
+ numDivisions: "Number of divisions:",
83
+ divisions: "Please make sure the number of divisions is in the range %(divRangeString)s.",
84
+ lineRange: "lines %(lineRange)s",
85
+ lineNumber: "line %(lineNumber)s",
86
+ symbolPassage: "The symbol %(questionSymbol)s indicates that question %(questionNumber)s references this portion of the passage.",
87
+ symbolQuestion: " The symbol %(sentenceSymbol)s indicates that the following sentence is referenced in a question.",
88
+ lineLabel: {
89
+ context: "a label next to a reading passage to denote the line number",
90
+ message: "Line"
91
+ },
92
+ beginningPassage: "Beginning of reading passage.",
93
+ beginningFootnotes: "Beginning of reading passage footnotes.",
94
+ endPassage: "End of reading passage.",
95
+ questionMarker: "[Marker for question %(number)s]",
96
+ circleMarker: "[Circle marker %(number)s]",
97
+ sentenceMarker: "[Sentence %(number)s]",
98
+ dragHandles: "Drag handles to make graph",
99
+ tapAddPoints: "Tap to add points",
100
+ false: "False",
101
+ true: "True",
102
+ no: "No",
103
+ yes: "Yes",
104
+ chooseCorrectNum: "Please choose the correct number of answers.",
105
+ notNoneOfTheAbove: "'None of the above' may not be selected when other answers are selected.",
106
+ noneOfTheAbove: "None of the above",
107
+ chooseNumAnswers: "Choose %(numCorrect)s answers:",
108
+ chooseAllAnswers: "Choose all answers that apply:",
109
+ chooseOneAnswer: "Choose 1 answer:",
110
+ choiceCheckedCorrect: "(Choice %(letter)s, Checked, Correct)",
111
+ choiceCrossedOutCorrect: "(Choice %(letter)s, Crossed out, Correct)",
112
+ choiceCorrect: "(Choice %(letter)s, Correct)",
113
+ choiceCheckedIncorrect: "(Choice %(letter)s, Checked, Incorrect)",
114
+ choiceCrossedOutIncorrect: "(Choice %(letter)s, Crossed out, Incorrect)",
115
+ choiceIncorrect: "(Choice %(letter)s, Incorrect)",
116
+ choiceChecked: "(Choice %(letter)s, Checked)",
117
+ choiceCrossedOut: "(Choice %(letter)s, Crossed out)",
118
+ choice: "(Choice %(letter)s)",
119
+ crossOut: "Cross out",
120
+ crossOutOption: "Cross out option",
121
+ crossOutChoice: "Cross out Choice %(letter)s",
122
+ bringBack: "Bring back",
123
+ openMenuForChoice: "Open menu for Choice %(letter)s",
124
+ letters: {
125
+ context: "This is a list of single-character labels that will appear in front of multiple-choice options. For instance, a multiple-choice question with three options would display (A) first option (B) second option (C) third option. There must be spaces between each of the different characters. The characters will show up next to options in the order that they are listed here. Most multiple choice questions have 5 or fewer options.",
126
+ message: "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
127
+ },
128
+ rightArrow: "Reaction arrow pointing to the right.",
129
+ dontUnderstandUnits: "I couldn't understand those units.",
130
+ checkSigFigs: "Check your significant figures.",
131
+ answerNumericallyIncorrect: "That answer is numerically incorrect.",
132
+ checkUnits: "Check your units.",
133
+ dontUnderstand: "I don't understand that",
134
+ loading: "Loading...",
135
+ videoTranscript: "See video transcript",
136
+ somethingWrong: "Something went wrong.",
137
+ videoWrapper: "Khan Academy video wrapper",
138
+ mathInputTitle: "mathematics keyboard",
139
+ mathInputDescription: "Use keyboard/mouse to interact with math-based input fields",
140
+ sin: "sin",
141
+ cos: "cos",
142
+ tan: "tan",
143
+ simulationLoadFail: "Sorry, this simulation cannot load.",
144
+ simulationLocaleWarning: "Sorry, this simulation isn't available in your language.",
145
+ selectAnAnswer: "Select an answer",
146
+ // The following strings are used for interactive graph SR descriptions.
147
+ addPoint: "Add Point",
148
+ removePoint: "Remove Point",
149
+ graphKeyboardPrompt: "Press Shift + Enter to interact with the graph",
150
+ closePolygon: "Close shape",
151
+ openPolygon: "Re-open shape",
152
+ srInteractiveElements: "Interactive elements: %(elements)s",
153
+ srNoInteractiveElements: "No interactive elements",
154
+ // TODO(LEMS-2660): The following strings are ones that will need
155
+ // translation tickets after all interactive graph SR strings have
156
+ // been finalized. Remove this comment after the tickets have been
157
+ // created.
158
+ srGraphInstructions: "Use the Tab key to move through the interactive elements in the graph. When an interactive element has focus, use Control + Shift + Arrows to move it.",
159
+ srUnlimitedGraphInstructions: "Press Shift + Enter to interact with the graph. Use the Tab key to move through the interactive elements in the graph and access the graph Action Bar. When an interactive element has focus, use Control + Shift + Arrows to move it or use the Delete key to remove it from the graph. Use the buttons in the Action Bar to add or adjust elements within the graph.",
160
+ srPointAtCoordinates: "Point %(num)s at %(x)s comma %(y)s.",
161
+ srCircleGraph: "A circle on a coordinate plane.",
162
+ srCircleShape: "Circle. The center point is at %(centerX)s comma %(centerY)s.",
163
+ srCircleRadiusPointRight: "Right radius endpoint at %(radiusPointX)s comma %(radiusPointY)s.",
164
+ srCircleRadiusPointLeft: "Left radius endpoint at %(radiusPointX)s comma %(radiusPointY)s.",
165
+ srCircleRadius: "Circle radius is %(radius)s.",
166
+ srCircleOuterPoints: "Points on the circle at %(point1X)s comma %(point1Y)s, %(point2X)s comma %(point2Y)s, %(point3X)s comma %(point3Y)s, %(point4X)s comma %(point4Y)s.",
167
+ srLinearGraph: "A line on a coordinate plane.",
168
+ srLinearGraphPoints: "The line has two points, point 1 at %(point1X)s comma %(point1Y)s and point 2 at %(point2X)s comma %(point2Y)s.",
169
+ srLinearGraphSlopeIncreasing: "Its slope increases from left to right.",
170
+ srLinearGraphSlopeDecreasing: "Its slope decreases from left to right.",
171
+ srLinearGraphSlopeHorizontal: "Its slope is zero.",
172
+ srLinearGraphSlopeVertical: "Its slope is undefined.",
173
+ srLinearGraphXOnlyIntercept: "The line crosses the X-axis at %(xIntercept)s comma 0.",
174
+ srLinearGraphYOnlyIntercept: "The line crosses the Y-axis at 0 comma %(yIntercept)s.",
175
+ srLinearGraphBothIntercepts: "The line crosses the X-axis at %(xIntercept)s comma 0 and the Y-axis at 0 comma %(yIntercept)s.",
176
+ srLinearGraphOriginIntercept: "The line crosses the X and Y axes at the graph's origin.",
177
+ srLinearGrabHandle: "Line going through point %(point1X)s comma %(point1Y)s and point %(point2X)s comma %(point2Y)s.",
178
+ srAngleStartingSide: "Point 3, starting side at %(x)s comma %(y)s.",
179
+ srAngleEndingSide: "Point 2, ending side at %(x)s comma %(y)s.",
180
+ srAngleVertexWithAngleMeasure: "Point 1, vertex at %(x)s comma %(y)s. Angle %(angleMeasure)s degrees.",
181
+ srAngleGraphAriaLabel: "An angle on a coordinate plane.",
182
+ srAngleGraphAriaDescription: "The angle measure is %(angleMeasure)s degrees with a vertex at %(vertexX)s comma %(vertexY)s, a point on the starting side at %(startingSideX)s comma %(startingSideY)s and a point on the ending side at %(endingSideX)s comma %(endingSideY)s",
183
+ srAngleInteractiveElements: "An angle formed by 3 points. The vertex is at %(vertexX)s comma %(vertexY)s. The starting side point is at %(startingSideX)s comma %(startingSideY)s. The ending side point is at %(endingSideX)s comma %(endingSideY)s.",
184
+ srSingleSegmentGraphAriaLabel: "A line segment on a coordinate plane.",
185
+ srMultipleSegmentGraphAriaLabel: "%(countOfSegments)s line segments on a coordinate plane.",
186
+ srMultipleSegmentIndividualLabel: "Segment %(indexOfSegment)s: Endpoint 1 at %(point1X)s comma %(point1Y)s. Endpoint 2 at %(point2X)s comma %(point2Y)s.",
187
+ srSingleSegmentLabel: "Endpoint 1 at %(point1X)s comma %(point1Y)s. Endpoint 2 at %(point2X)s comma %(point2Y)s.",
188
+ srSegmentLength: "Segment length %(length)s units.",
189
+ srSingleSegmentGraphEndpointAriaLabel: "Endpoint %(endpointNumber)s at %(x)s comma %(y)s.",
190
+ srMultipleSegmentGraphEndpointAriaLabel: "Endpoint %(endpointNumber)s on segment %(indexOfSegment)s at %(x)s comma %(y)s.",
191
+ srSegmentGrabHandle: "Segment from %(point1X)s comma %(point1Y)s to %(point2X)s comma %(point2Y)s.",
192
+ srLinearSystemGraph: "Two lines on a coordinate plane.",
193
+ srLinearSystemPoints: "Line %(lineNumber)s has two points, point 1 at %(point1X)s comma %(point1Y)s and point 2 at %(point2X)s comma %(point2Y)s.",
194
+ srLinearSystemPoint: "Point %(pointSequence)s on line %(lineNumber)s at %(x)s comma %(y)s.",
195
+ srLinearSystemGrabHandle: "Line %(lineNumber)s going through point %(point1X)s comma %(point1Y)s and point %(point2X)s comma %(point2Y)s.",
196
+ srLinearSystemIntersection: "Line 1 and line 2 intersect at point %(x)s comma %(y)s.",
197
+ srLinearSystemParallel: "Line 1 and line 2 are parallel.",
198
+ srRayGraph: "A ray on a coordinate plane.",
199
+ srRayPoints: "The endpoint is at %(point1X)s comma %(point1Y)s and the ray goes through point %(point2X)s comma %(point2Y)s.",
200
+ srRayGrabHandle: "Ray with endpoint %(point1X)s comma %(point1Y)s going through point %(point2X)s comma %(point2Y)s.",
201
+ srRayEndpoint: "Endpoint at %(x)s comma %(y)s.",
202
+ srRayTerminalPoint: "Through point at %(x)s comma %(y)s.",
203
+ srQuadraticGraph: "A parabola on a 4-quadrant coordinate plane.",
204
+ srQuadraticFaceUp: "The parabola opens upward.",
205
+ srQuadraticFaceDown: "The parabola opens downward.",
206
+ srQuadraticGraphVertexOrigin: "Vertex is at the origin.",
207
+ srQuadraticGraphVertexXAxis: "Vertex is on the X-axis.",
208
+ srQuadraticGraphVertexYAxis: "Vertex is on the Y-axis.",
209
+ srQuadraticGraphVertexQuadrant: "Vertex is in quadrant %(quadrant)s.",
210
+ srQuadraticTwoXIntercepts: "The X-intercepts are at %(intercept1)s comma 0 and %(intercept2)s comma 0.",
211
+ srQuadraticOneXIntercept: "The X-intercept is at %(intercept)s comma 0.",
212
+ srQuadraticYIntercept: "The Y-intercept is at 0 comma %(intercept)s.",
213
+ srQuadraticPointOrigin: "Point %(pointNumber)s on parabola at the origin.",
214
+ srQuadraticPointAxis: "Point %(pointNumber)s on parabola at %(x)s comma %(y)s.",
215
+ srQuadraticPointQuadrant: "Point %(pointNumber)s on parabola in quadrant %(quadrant)s at %(x)s comma %(y)s.",
216
+ srQuadraticInteractiveElements: "Parabola with points at %(point1X)s comma %(point1Y)s, %(point2X)s comma %(point2Y)s, and %(point3X)s comma %(point3Y)s.",
217
+ srPolygonGraph: "A polygon.",
218
+ srPolygonGraphCoordinatePlane: "A polygon on a coordinate plane.",
219
+ srPolygonGraphPointsNum: "The polygon has %(num)s points.",
220
+ srPolygonGraphPointsOne: "The polygon has 1 point.",
221
+ srPolygonElementsNum: "A polygon with %(num)s points.",
222
+ srPolygonElementsOne: "A polygon with 1 point.",
223
+ srPolygonPointAngleApprox: "Angle approximately equal to %(angle)s degrees.",
224
+ srPolygonPointAngle: "Angle equal to %(angle)s degrees.",
225
+ srPolygonSideLength: "A line segment, length equal to %(length)s units, connects to point %(pointNum)s.",
226
+ srPolygonSideLengthApprox: "A line segment, length approximately equal to %(length)s units, connects to point %(pointNum)s.",
227
+ srUnlimitedPolygonEmpty: "An empty coordinate plane.",
228
+ srSinusoidGraph: "A sinusoid function on a coordinate plane.",
229
+ srSinusoidRootPoint: "Midline intersection at %(x)s comma %(y)s.",
230
+ srSinusoidMaxPoint: "Maximum point at %(x)s comma %(y)s.",
231
+ srSinusoidMinPoint: "Minimum point at %(x)s comma %(y)s.",
232
+ srSinusoidFlatPoint: "Line through point at %(x)s comma %(y)s.",
233
+ srSinusoidDescription: "The graph shows a wave with a minimum value of %(minValue)s and a maximum value of %(maxValue)s. The wave completes a full cycle from %(cycleStart)s to %(cycleEnd)s.",
234
+ srSinusoidInteractiveElements: "Sinusoid graph with midline intersection point at %(point1X)s comma %(point1Y)s and extremum point at %(point2X)s comma %(point2Y)s."
235
+ // The above strings are used for interactive graph SR descriptions.
236
+ };
237
+
238
+ /**
239
+ * Mock strings for the Perseus package, to be used for tests and Storybook.
240
+ */
241
+ const mockStrings = {
242
+ closeKeypad: "close math keypad",
243
+ openKeypad: "open math keypad",
244
+ mathInputBox: "Math input box",
245
+ removeHighlight: "Remove highlight",
246
+ addHighlight: "Add highlight",
247
+ hintPos: ({
248
+ pos
249
+ }) => `Hint #${pos}`,
250
+ errorRendering: ({
251
+ error
252
+ }) => `Error rendering: ${error}`,
253
+ APPROXIMATED_PI_ERROR: "Your answer is close, but you may " + "have approximated pi. Enter your " + "answer as a multiple of pi, like " + "<code>12\\ \\text{pi}</code> or " + "<code>2/3\\ \\text{pi}</code>",
254
+ EXTRA_SYMBOLS_ERROR: "We could not understand your " + "answer. Please check your answer for extra " + "text or symbols.",
255
+ NEEDS_TO_BE_SIMPLFIED_ERROR: "Your answer is almost correct, " + "but it needs to be simplified.",
256
+ MISSING_PERCENT_ERROR: "Your answer is almost correct, " + "but it is missing a " + "<code>\\%</code> at the end.",
257
+ MULTIPLICATION_SIGN_ERROR: "I'm a computer. I only understand " + "multiplication if you use an asterisk " + "(*) as the multiplication sign.",
258
+ WRONG_CASE_ERROR: "Your answer includes use of a variable with the wrong case.",
259
+ WRONG_LETTER_ERROR: "Your answer includes a wrong variable letter.",
260
+ invalidSelection: "Make sure you select something for every row.",
261
+ ERROR_TITLE: "Oops!",
262
+ ERROR_MESSAGE: "Sorry, I don't understand that!",
263
+ hints: "Hints",
264
+ getAnotherHint: "Get another hint",
265
+ deprecatedStandin: "Sorry, this part of the question is no longer available. 😅 Don't worry, you won't be graded on this part. Keep going!",
266
+ keepTrying: "Keep trying",
267
+ tryAgain: "Try again",
268
+ check: "Check",
269
+ correctExcited: "Correct!",
270
+ nextQuestion: "Next question",
271
+ skipToTitle: ({
272
+ title
273
+ }) => `Skip to ${title}`,
274
+ current: "Current",
275
+ correct: "Correct",
276
+ correctSelected: "Correct (selected)",
277
+ correctCrossedOut: "Correct (but you crossed it out)",
278
+ incorrect: "Incorrect",
279
+ incorrectSelected: "Incorrect (selected)",
280
+ hideExplanation: "Hide explanation",
281
+ explain: "Explain",
282
+ INVALID_MESSAGE_PREFIX: "We couldn't grade your answer.",
283
+ DEFAULT_INVALID_MESSAGE_1: "It looks like you left something blank or ",
284
+ DEFAULT_INVALID_MESSAGE_2: "entered in an invalid answer.",
285
+ integerExample: "an integer, like $6$",
286
+ properExample: "a *proper* fraction, like $1/2$ or $6/10$",
287
+ simplifiedProperExample: "a *simplified proper* fraction, like $3/5$",
288
+ improperExample: "an *improper* fraction, like $10/7$ or $14/8$",
289
+ simplifiedImproperExample: "a *simplified improper* fraction, like $7/4$",
290
+ mixedExample: "a mixed number, like $1\\ 3/4$",
291
+ decimalExample: "an *exact* decimal, like $0.75$",
292
+ percentExample: "a percent, like $12.34\\%$",
293
+ piExample: "a multiple of pi, like $12\\ \\text{pi}$ or $2/3\\ \\text{pi}$",
294
+ yourAnswer: "**Your answer should be** ",
295
+ yourAnswerLabel: "Your answer:",
296
+ addPoints: "Click to add points",
297
+ addVertices: "Click to add vertices",
298
+ tapMultiple: "Tap each dot on the image to select all answers that apply.",
299
+ tapSingle: "Tap each dot on the image to select an answer.",
300
+ clickMultiple: "Click each dot on the image to select all answers that apply.",
301
+ clickSingle: "Click each dot on the image to select an answer.",
302
+ choices: "Choices:",
303
+ answers: ({
304
+ num
305
+ }) => num === 1 ? `${num} answer` : `${num} answers`,
306
+ hideAnswersToggleLabel: "Hide answer choices",
307
+ moves: ({
308
+ num
309
+ }) => num === 1 ? `Moves: ${num}` : `Moves: ${num}`,
310
+ clickTiles: "Click on the tiles to change the lights.",
311
+ turnOffLights: "You must turn on all of the lights to continue.",
312
+ fillAllCells: "Make sure you fill in all cells in the matrix.",
313
+ molecularDrawing: ({
314
+ content
315
+ }) => `A molecular structure drawing. SMILES notation: ${content}`,
316
+ switchDirection: "Switch direction",
317
+ circleOpen: "Make circle open",
318
+ circleFilled: "Make circle filled",
319
+ numDivisions: "Number of divisions:",
320
+ divisions: ({
321
+ divRangeString
322
+ }) => `Please make sure the number of divisions is in the range ${divRangeString}.`,
323
+ lineRange: ({
324
+ lineRange
325
+ }) => `lines ${lineRange}`,
326
+ lineNumber: ({
327
+ lineNumber
328
+ }) => `line ${lineNumber}`,
329
+ symbolPassage: ({
330
+ questionSymbol,
331
+ questionNumber
332
+ }) => `The symbol ${questionSymbol} indicates that question ${questionNumber} references this portion of the passage.`,
333
+ symbolQuestion: ({
334
+ sentenceSymbol
335
+ }) => ` The symbol ${sentenceSymbol} indicates that the following sentence is referenced in a question.`,
336
+ lineLabel: "Line",
337
+ beginningPassage: "Beginning of reading passage.",
338
+ beginningFootnotes: "Beginning of reading passage footnotes.",
339
+ endPassage: "End of reading passage.",
340
+ questionMarker: ({
341
+ number
342
+ }) => `[Marker for question ${number}]`,
343
+ circleMarker: ({
344
+ number
345
+ }) => `[Circle marker ${number}]`,
346
+ sentenceMarker: ({
347
+ number
348
+ }) => `[Sentence ${number}]`,
349
+ dragHandles: "Drag handles to make graph",
350
+ tapAddPoints: "Tap to add points",
351
+ false: "False",
352
+ true: "True",
353
+ no: "No",
354
+ yes: "Yes",
355
+ chooseCorrectNum: "Please choose the correct number of answers.",
356
+ notNoneOfTheAbove: "'None of the above' may not be selected when other answers are selected.",
357
+ noneOfTheAbove: "None of the above",
358
+ chooseNumAnswers: ({
359
+ numCorrect
360
+ }) => `Choose ${numCorrect} answers:`,
361
+ chooseAllAnswers: "Choose all answers that apply:",
362
+ chooseOneAnswer: "Choose 1 answer:",
363
+ choiceCheckedCorrect: ({
364
+ letter
365
+ }) => `(Choice ${letter}, Checked, Correct)`,
366
+ choiceCrossedOutCorrect: ({
367
+ letter
368
+ }) => `(Choice ${letter}, Crossed out, Correct)`,
369
+ choiceCorrect: ({
370
+ letter
371
+ }) => `(Choice ${letter}, Correct)`,
372
+ choiceCheckedIncorrect: ({
373
+ letter
374
+ }) => `(Choice ${letter}, Checked, Incorrect)`,
375
+ choiceCrossedOutIncorrect: ({
376
+ letter
377
+ }) => `(Choice ${letter}, Crossed out, Incorrect)`,
378
+ choiceIncorrect: ({
379
+ letter
380
+ }) => `(Choice ${letter}, Incorrect)`,
381
+ choiceChecked: ({
382
+ letter
383
+ }) => `(Choice ${letter}, Checked)`,
384
+ choiceCrossedOut: ({
385
+ letter
386
+ }) => `(Choice ${letter}, Crossed out)`,
387
+ choice: ({
388
+ letter
389
+ }) => `(Choice ${letter})`,
390
+ crossOut: "Cross out",
391
+ crossOutOption: "Cross out option",
392
+ crossOutChoice: ({
393
+ letter
394
+ }) => `Cross out Choice ${letter}`,
395
+ bringBack: "Bring back",
396
+ openMenuForChoice: ({
397
+ letter
398
+ }) => `Open menu for Choice ${letter}`,
399
+ letters: "A B C D E F G H I J K L M N O P Q R S T U V W X Y Z",
400
+ rightArrow: "Reaction arrow pointing to the right.",
401
+ dontUnderstandUnits: "I couldn't understand those units.",
402
+ checkSigFigs: "Check your significant figures.",
403
+ answerNumericallyIncorrect: "That answer is numerically incorrect.",
404
+ checkUnits: "Check your units.",
405
+ dontUnderstand: "I don't understand that",
406
+ loading: "Loading...",
407
+ videoTranscript: "See video transcript",
408
+ somethingWrong: "Something went wrong.",
409
+ videoWrapper: "Khan Academy video wrapper",
410
+ mathInputTitle: "mathematics keyboard",
411
+ mathInputDescription: "Use keyboard/mouse to interact with math-based input fields",
412
+ sin: "sin",
413
+ cos: "cos",
414
+ tan: "tan",
415
+ simulationLoadFail: "Sorry, this simulation cannot load.",
416
+ simulationLocaleWarning: "Sorry, this simulation isn't available in your language.",
417
+ selectAnAnswer: "Select an answer",
418
+ // The following strings are used for interactive graph SR descriptions.
419
+ srGraphInstructions: "Use the Tab key to move through the interactive elements in the graph. When an interactive element has focus, use Control + Shift + Arrows to move it.",
420
+ srUnlimitedGraphInstructions: "Press Shift + Enter to interact with the graph. Use the Tab key to move through the interactive elements in the graph and access the graph Action Bar. When an interactive element has focus, use Control + Shift + Arrows to move it or use the Delete key to remove it from the graph. Use the buttons in the Action Bar to add or adjust elements within the graph.",
421
+ graphKeyboardPrompt: "Press Shift + Enter to interact with the graph",
422
+ addPoint: "Add Point",
423
+ removePoint: "Remove Point",
424
+ closePolygon: "Close shape",
425
+ openPolygon: "Re-open shape",
426
+ srPointAtCoordinates: ({
427
+ num,
428
+ x,
429
+ y
430
+ }) => `Point ${num} at ${x} comma ${y}.`,
431
+ srInteractiveElements: ({
432
+ elements
433
+ }) => `Interactive elements: ${elements}`,
434
+ srNoInteractiveElements: "No interactive elements",
435
+ srCircleGraph: "A circle on a coordinate plane.",
436
+ srCircleShape: ({
437
+ centerX,
438
+ centerY
439
+ }) => `Circle. The center point is at ${centerX} comma ${centerY}.`,
440
+ srCircleRadiusPointRight: ({
441
+ radiusPointX,
442
+ radiusPointY
443
+ }) => `Right radius endpoint at ${radiusPointX} comma ${radiusPointY}.`,
444
+ srCircleRadiusPointLeft: ({
445
+ radiusPointX,
446
+ radiusPointY
447
+ }) => `Left radius endpoint at ${radiusPointX} comma ${radiusPointY}.`,
448
+ srCircleRadius: ({
449
+ radius
450
+ }) => `Circle radius is ${radius}.`,
451
+ srCircleOuterPoints: ({
452
+ point1X,
453
+ point1Y,
454
+ point2X,
455
+ point2Y,
456
+ point3X,
457
+ point3Y,
458
+ point4X,
459
+ point4Y
460
+ }) => `Points on the circle at ${point1X} comma ${point1Y}, ${point2X} comma ${point2Y}, ${point3X} comma ${point3Y}, ${point4X} comma ${point4Y}.`,
461
+ srLinearGraph: "A line on a coordinate plane.",
462
+ srLinearGraphPoints: ({
463
+ point1X,
464
+ point1Y,
465
+ point2X,
466
+ point2Y
467
+ }) => `The line has two points, point 1 at ${point1X} comma ${point1Y} and point 2 at ${point2X} comma ${point2Y}.`,
468
+ srLinearGraphSlopeIncreasing: "Its slope increases from left to right.",
469
+ srLinearGraphSlopeDecreasing: "Its slope decreases from left to right.",
470
+ srLinearGraphSlopeHorizontal: "Its slope is zero.",
471
+ srLinearGraphSlopeVertical: "Its slope is undefined.",
472
+ srLinearGraphXOnlyIntercept: ({
473
+ xIntercept
474
+ }) => `The line crosses the X-axis at ${xIntercept} comma 0.`,
475
+ srLinearGraphYOnlyIntercept: ({
476
+ yIntercept
477
+ }) => `The line crosses the Y-axis at 0 comma ${yIntercept}.`,
478
+ srLinearGraphBothIntercepts: ({
479
+ xIntercept,
480
+ yIntercept
481
+ }) => `The line crosses the X-axis at ${xIntercept} comma 0 and the Y-axis at 0 comma ${yIntercept}.`,
482
+ srLinearGraphOriginIntercept: "The line crosses the X and Y axes at the graph's origin.",
483
+ srLinearGrabHandle: ({
484
+ point1X,
485
+ point1Y,
486
+ point2X,
487
+ point2Y
488
+ }) => `Line going through point ${point1X} comma ${point1Y} and point ${point2X} comma ${point2Y}.`,
489
+ srAngleStartingSide: ({
490
+ x,
491
+ y
492
+ }) => `Point 3, starting side at ${x} comma ${y}.`,
493
+ srAngleEndingSide: ({
494
+ x,
495
+ y
496
+ }) => `Point 2, ending side at ${x} comma ${y}.`,
497
+ srAngleVertexWithAngleMeasure: ({
498
+ x,
499
+ y,
500
+ angleMeasure
501
+ }) => `Point 1, vertex at ${x} comma ${y}. Angle ${angleMeasure} degrees.`,
502
+ srAngleGraphAriaLabel: "An angle on a coordinate plane.",
503
+ srAngleGraphAriaDescription: ({
504
+ angleMeasure,
505
+ vertexX,
506
+ vertexY,
507
+ startingSideX,
508
+ startingSideY,
509
+ endingSideX,
510
+ endingSideY
511
+ }) => `The angle measure is ${angleMeasure} degrees with a vertex at ${vertexX} comma ${vertexY}, a point on the starting side at ${startingSideX} comma ${startingSideY} and a point on the ending side at ${endingSideX} comma ${endingSideY}.`,
512
+ srAngleInteractiveElements: ({
513
+ vertexX,
514
+ vertexY,
515
+ startingSideX,
516
+ startingSideY,
517
+ endingSideX,
518
+ endingSideY
519
+ }) => `An angle formed by 3 points. The vertex is at ${vertexX} comma ${vertexY}. The starting side point is at ${startingSideX} comma ${startingSideY}. The ending side point is at ${endingSideX} comma ${endingSideY}.`,
520
+ srSingleSegmentGraphAriaLabel: "A line segment on a coordinate plane.",
521
+ srMultipleSegmentGraphAriaLabel: ({
522
+ countOfSegments
523
+ }) => `${countOfSegments} segments on a coordinate plane.`,
524
+ srMultipleSegmentIndividualLabel: ({
525
+ point1X,
526
+ point1Y,
527
+ point2X,
528
+ point2Y,
529
+ indexOfSegment
530
+ }) => `Segment ${indexOfSegment}: Endpoint 1 at ${point1X} comma ${point1Y}. Endpoint 2 at ${point2X} comma ${point2Y}.`,
531
+ srSingleSegmentLabel: ({
532
+ point1X,
533
+ point1Y,
534
+ point2X,
535
+ point2Y
536
+ }) => `Endpoint 1 at ${point1X} comma ${point1Y}. Endpoint 2 at ${point2X} comma ${point2Y}.`,
537
+ srSegmentLength: ({
538
+ length
539
+ }) => `Segment length ${length} units.`,
540
+ srSingleSegmentGraphEndpointAriaLabel: ({
541
+ endpointNumber,
542
+ x,
543
+ y
544
+ }) => `Endpoint ${endpointNumber} at ${x} comma ${y}.`,
545
+ srMultipleSegmentGraphEndpointAriaLabel: ({
546
+ endpointNumber,
547
+ x,
548
+ y,
549
+ indexOfSegment
550
+ }) => `Endpoint ${endpointNumber} on segment ${indexOfSegment} at ${x} comma ${y}.`,
551
+ srSegmentGrabHandle: ({
552
+ point1X,
553
+ point1Y,
554
+ point2X,
555
+ point2Y
556
+ }) => `Segment from ${point1X} comma ${point1Y} to ${point2X} comma ${point2Y}.`,
557
+ srLinearSystemGraph: "Two lines on a coordinate plane.",
558
+ srLinearSystemPoints: ({
559
+ lineNumber,
560
+ point1X,
561
+ point1Y,
562
+ point2X,
563
+ point2Y
564
+ }) => `Line ${lineNumber} has two points, point 1 at ${point1X} comma ${point1Y} and point 2 at ${point2X} comma ${point2Y}.`,
565
+ srLinearSystemPoint: ({
566
+ lineNumber,
567
+ pointSequence,
568
+ x,
569
+ y
570
+ }) => `Point ${pointSequence} on line ${lineNumber} at ${x} comma ${y}.`,
571
+ srLinearSystemGrabHandle: ({
572
+ lineNumber,
573
+ point1X,
574
+ point1Y,
575
+ point2X,
576
+ point2Y
577
+ }) => `Line ${lineNumber} going through point ${point1X} comma ${point1Y} and point ${point2X} comma ${point2Y}.`,
578
+ srLinearSystemIntersection: ({
579
+ x,
580
+ y
581
+ }) => `Line 1 and line 2 intersect at point ${x} comma ${y}.`,
582
+ srLinearSystemParallel: "Line 1 and line 2 are parallel.",
583
+ srRayGraph: "A ray on a coordinate plane.",
584
+ srRayPoints: ({
585
+ point1X,
586
+ point1Y,
587
+ point2X,
588
+ point2Y
589
+ }) => `The endpoint is at ${point1X} comma ${point1Y} and the ray goes through point ${point2X} comma ${point2Y}.`,
590
+ srRayGrabHandle: ({
591
+ point1X,
592
+ point1Y,
593
+ point2X,
594
+ point2Y
595
+ }) => `Ray with endpoint ${point1X} comma ${point1Y} going through point ${point2X} comma ${point2Y}.`,
596
+ srRayEndpoint: ({
597
+ x,
598
+ y
599
+ }) => `Endpoint at ${x} comma ${y}.`,
600
+ srRayTerminalPoint: ({
601
+ x,
602
+ y
603
+ }) => `Through point at ${x} comma ${y}.`,
604
+ srQuadraticGraph: "A parabola on a 4-quadrant coordinate plane.",
605
+ srQuadraticFaceUp: "The parabola opens upward.",
606
+ srQuadraticFaceDown: "The parabola opens downward.",
607
+ srQuadraticGraphVertexOrigin: "Vertex is at the origin.",
608
+ srQuadraticGraphVertexXAxis: "Vertex is on the X-axis.",
609
+ srQuadraticGraphVertexYAxis: "Vertex is on the Y-axis.",
610
+ srQuadraticGraphVertexQuadrant: ({
611
+ quadrant
612
+ }) => `Vertex is in quadrant ${quadrant}.`,
613
+ srQuadraticTwoXIntercepts: ({
614
+ intercept1,
615
+ intercept2
616
+ }) => `The X-intercepts are at ${intercept1} comma 0 and ${intercept2} comma 0.`,
617
+ srQuadraticOneXIntercept: ({
618
+ intercept
619
+ }) => `The X-intercept is at ${intercept} comma 0.`,
620
+ srQuadraticYIntercept: ({
621
+ intercept
622
+ }) => `The Y-intercept is at 0 comma ${intercept}.`,
623
+ srQuadraticPointOrigin: ({
624
+ pointNumber
625
+ }) => `Point ${pointNumber} on parabola at the origin.`,
626
+ srQuadraticPointAxis: ({
627
+ pointNumber,
628
+ x,
629
+ y
630
+ }) => `Point ${pointNumber} on parabola at ${x} comma ${y}.`,
631
+ srQuadraticPointQuadrant: ({
632
+ pointNumber,
633
+ x,
634
+ y,
635
+ quadrant
636
+ }) => `Point ${pointNumber} on parabola in quadrant ${quadrant} at ${x} comma ${y}.`,
637
+ srQuadraticInteractiveElements: ({
638
+ point1X,
639
+ point1Y,
640
+ point2X,
641
+ point2Y,
642
+ point3X,
643
+ point3Y
644
+ }) => `Parabola with points at ${point1X} comma ${point1Y}, ${point2X} comma ${point2Y}, and ${point3X} comma ${point3Y}.`,
645
+ srPolygonGraph: "A polygon.",
646
+ srPolygonGraphCoordinatePlane: "A polygon on a coordinate plane.",
647
+ srPolygonGraphPointsNum: ({
648
+ num
649
+ }) => `The polygon has ${num} points.`,
650
+ srPolygonGraphPointsOne: "The polygon has 1 point.",
651
+ srPolygonElementsNum: ({
652
+ num
653
+ }) => `A polygon with ${num} points.`,
654
+ srPolygonElementsOne: "A polygon with 1 point.",
655
+ srPolygonPointAngleApprox: ({
656
+ angle
657
+ }) => `Angle approximately equal to ${angle} degrees.`,
658
+ srPolygonPointAngle: ({
659
+ angle
660
+ }) => `Angle equal to ${angle} degrees.`,
661
+ srPolygonSideLength: ({
662
+ pointNum,
663
+ length
664
+ }) => `A line segment, length equal to ${length} units, connects to point ${pointNum}.`,
665
+ srPolygonSideLengthApprox: ({
666
+ pointNum,
667
+ length
668
+ }) => `A line segment, length approximately equal to ${length} units, connects to point ${pointNum}.`,
669
+ srUnlimitedPolygonEmpty: "An empty coordinate plane.",
670
+ srSinusoidGraph: "A sinusoid function on a coordinate plane.",
671
+ srSinusoidRootPoint: ({
672
+ x,
673
+ y
674
+ }) => `Midline intersection at ${x} comma ${y}.`,
675
+ srSinusoidMaxPoint: ({
676
+ x,
677
+ y
678
+ }) => `Maximum point at ${x} comma ${y}.`,
679
+ srSinusoidMinPoint: ({
680
+ x,
681
+ y
682
+ }) => `Minimum point at ${x} comma ${y}.`,
683
+ srSinusoidFlatPoint: ({
684
+ x,
685
+ y
686
+ }) => `Line through point at ${x} comma ${y}.`,
687
+ srSinusoidDescription: ({
688
+ minValue,
689
+ maxValue,
690
+ cycleStart,
691
+ cycleEnd
692
+ }) => `The graph shows a wave with a minimum value of ${minValue} and a maximum value of ${maxValue}. The wave completes a full cycle from ${cycleStart} to ${cycleEnd}.`,
693
+ srSinusoidInteractiveElements: ({
694
+ point1X,
695
+ point1Y,
696
+ point2X,
697
+ point2Y
698
+ }) => `Sinusoid graph with midline intersection point at ${point1X} comma ${point1Y} and extremum point at ${point2X} comma ${point2Y}.`
699
+ // The above strings are used for interactive graph SR descriptions.
700
+ };
701
+
702
+ // This type helps us make sure all error codes are mapped to strings
703
+
704
+ /**
705
+ * Map an error string to a PerseusStrings key
706
+ * that we can use to get the translated error message
707
+ */
708
+ const errorToString = {
709
+ MISSING_PERCENT_ERROR: "MISSING_PERCENT_ERROR",
710
+ NEEDS_TO_BE_SIMPLIFIED_ERROR: "NEEDS_TO_BE_SIMPLFIED_ERROR",
711
+ APPROXIMATED_PI_ERROR: "APPROXIMATED_PI_ERROR",
712
+ EXTRA_SYMBOLS_ERROR: "EXTRA_SYMBOLS_ERROR",
713
+ WRONG_CASE_ERROR: "WRONG_CASE_ERROR",
714
+ WRONG_LETTER_ERROR: "WRONG_LETTER_ERROR",
715
+ MULTIPLICATION_SIGN_ERROR: "MULTIPLICATION_SIGN_ERROR",
716
+ INVALID_SELECTION_ERROR: "invalidSelection",
717
+ CHOOSE_CORRECT_NUM_ERROR: "chooseCorrectNum",
718
+ NOT_NONE_ABOVE_ERROR: "notNoneOfTheAbove",
719
+ FILL_ALL_CELLS_ERROR: "fillAllCells"
720
+ };
721
+ function mapErrorToString(
722
+ // the string representing an error code
723
+ err,
724
+ // the translated Perseus strings
725
+ translatedStrings) {
726
+ if (!err) {
727
+ return err;
728
+ }
729
+ return translatedStrings[errorToString[err]] || err;
730
+ }
731
+
732
+ export { mapErrorToString, mockStrings, strings };
733
+ //# sourceMappingURL=strings.js.map