-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Mathquill Mathfield with Portuguese trig functions (#1538)
## Summary: So basically: - These two PRs ([1](#921) and [2](Khan/webapp#19111)) helped add support for Portuguese trig functions when typed in the input. - This [PR](#1497) added support for the text of trig buttons to be translated, however the input would still update with "sin" if the "sen" button was pressed. - The PR being reviewed updates the input correctly; so if the "sen" button is pressed, the input is updated with "sen" How this works: - When a button is pressed, the keypad yells into the void that "SIN" was pressed - The keypad translator has a callback for updating the input when "SIN" is pressed - BEFORE: it would just updated the input with `sin()` - NOW: it looks for the translated version of "sin", checks it against known safe translations, and either updates it with a known safe translation or the default "sin" Issue: LEMS-1621 ## Test plan: Once the strings are translated: - Go to a Portuguese page with an expression widget - Go to a question that requires the "sin" button - Open the keypad - Note the button is "sen" instead of "sin" - Click the "sen" button - Note the input is updated with "sen()" - Fill out the correct answer and submit - Note the validator accepts "sen" instead of "sin" Author: handeyeco Reviewers: handeyeco, benchristel, anakaren-rojas Required Reviewers: Approved By: benchristel Checks: ✅ codecov/project, ✅ codecov/patch, ✅ Upload Coverage (ubuntu-latest, 20.x), ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Jest Coverage (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald Pull Request URL: #1538
- Loading branch information
Showing
9 changed files
with
170 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@khanacademy/math-input": patch | ||
"@khanacademy/perseus": patch | ||
--- | ||
|
||
Use Portuguese sen and tg when updating Mathquill from the keypad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters