Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🔥AUDIT🔥] Align variable names in SR strings for interactive graph #2131

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

jeremywiebe
Copy link
Collaborator

Summary:

Our localization infrastructure requires that the names of the placeholders in the strings variable (the object with the English strings) matches the variable names in the same-named string generator function that appears in the PerseusStrings type.

This PR fixes two new strings so that their placeholder variable names match: srRayEndpoint and srRayTerminalPoint.

Issue: "none"

Test plan:

Do another release and integrate it again and rerun the localization script.

@jeremywiebe jeremywiebe self-assigned this Jan 21, 2025
@jeremywiebe jeremywiebe changed the title Align variable names in SR strings for interactive graph [AUDIT] Align variable names in SR strings for interactive graph Jan 21, 2025
@jeremywiebe jeremywiebe changed the title [AUDIT] Align variable names in SR strings for interactive graph [🔥AUDIT🔥] Align variable names in SR strings for interactive graph Jan 21, 2025
@jeremywiebe jeremywiebe marked this pull request as ready for review January 21, 2025 00:46
@@ -535,8 +535,8 @@ export const strings = {
"The endpoint is at %(point1X)s comma %(point1Y)s and the ray goes through point %(point2X)s comma %(point2Y)s.",
srRayGrabHandle:
"Ray with endpoint %(point1X)s comma %(point1Y)s going through point %(point2X)s comma %(point2Y)s.",
srRayEndpoint: "Endpoint at %(point1X)s comma %(point1Y)s.",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These use x and y in the PerseusStrings type and must match.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch! Sorry about that!

@jeremywiebe jeremywiebe requested review from nishasy and a team January 21, 2025 00:47
Copy link
Contributor

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (ecc544b) and published it to npm. You
can install it using the tag PR2131.

Example:

yarn add @khanacademy/perseus@PR2131

If you are working in Khan Academy's webapp, you can run:

./dev/tools/bump_perseus_version.sh -t PR2131

Copy link
Contributor

Size Change: -6 B (0%)

Total Size: 1.47 MB

Filename Size Change
packages/perseus/dist/es/index.js 395 kB -3 B (0%)
packages/perseus/dist/es/strings.js 5.1 kB -3 B (-0.06%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 39 kB
packages/keypad-context/dist/es/index.js 760 B
packages/kmath/dist/es/index.js 86.8 kB
packages/math-input/dist/es/index.js 77.6 kB
packages/math-input/dist/es/strings.js 1.79 kB
packages/perseus-core/dist/es/index.js 27.1 kB
packages/perseus-editor/dist/es/index.js 689 kB
packages/perseus-linter/dist/es/index.js 22.2 kB
packages/perseus-score/dist/es/index.js 113 kB
packages/pure-markdown/dist/es/index.js 3.66 kB
packages/simple-markdown/dist/es/index.js 12.5 kB

compressed-size-action

Copy link
Collaborator Author

@jeremywiebe jeremywiebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Landing this audit... 🙉🙈

@nishasy please give this a double-check when you have time.

@jeremywiebe jeremywiebe merged commit cb15921 into main Jan 21, 2025
8 checks passed
@jeremywiebe jeremywiebe deleted the jer/fix-sr-strings branch January 21, 2025 00:55
jeremywiebe pushed a commit that referenced this pull request Jan 21, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.


# Releases
## @khanacademy/perseus@51.0.1

### Patch Changes

-   [#2131](#2131) [`cb15921b8`](cb15921) Thanks [@jeremywiebe](https://github.com/jeremywiebe)! - Fix localized string templates for two the ray interactive graph type

## @khanacademy/perseus-editor@17.3.2

### Patch Changes

-   Updated dependencies \[[`cb15921b8`](cb15921)]:
    -   @khanacademy/perseus@51.0.1

Author: khan-actions-bot

Reviewers: jeremywiebe

Required Reviewers:

Approved By: jeremywiebe

Checks: ⏭️  Publish npm snapshot, ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x)

Pull Request URL: #2132
Copy link
Contributor

@nishasy nishasy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremywiebe This looks right to me. Sorry about this 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants