Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Don't mangle i18n #93

Merged
merged 3 commits into from
Apr 27, 2021
Merged

Don't mangle i18n #93

merged 3 commits into from
Apr 27, 2021

Conversation

kevinbarabash
Copy link
Contributor

@kevinbarabash kevinbarabash commented Apr 27, 2021

Summary:

In order for build_mobile_perseus.py to extract strings all of the translation functions need to start with 'i18n.'. If we rename this boject it won't be able to extract those strings. This PR fixes this by excluding 'i18n' from mangle. The terser config is almost identical to the one in webapp.

I've also replace the circle-ci build to run yarn test with a GitHub Actions check that does the same.

Issue: FEI-3478

Test plan:

  • yarn build
  • inspect build/math-input.js, see that 'i18n._()' calls abound
  • yarn link
  • cd ../webapp/services/static
  • yarn link "@khanacademy/math-input"
  • ./content_render/tools/build_mobile_perseus.py
  • see that it completes and that khan/mobile had an updated perseus bundle and template files
  • rebuild and run the iOS app in Xcode, see that exercises load and work correctly

@kevinbarabash kevinbarabash self-assigned this Apr 27, 2021
@kevinbarabash
Copy link
Contributor Author

Please ignore the failing CircleCI job.

@kevinbarabash
Copy link
Contributor Author

I somehow broke the storybook build that gets deployed to netlify so I'll have to fix that before this can proceed.

@kevinbarabash
Copy link
Contributor Author

I see, it's only some of the stories that are broken in storybook.

@kevinbarabash
Copy link
Contributor Author

The storybook is an existing issue on http://khan-math-input.netlify.app so I'm going to punt on it for now.

Copy link
Member

@jeresig jeresig left a comment

Choose a reason for hiding this comment

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

Great, thank you for fixing this!

.github/workflows/nodejs.yml Outdated Show resolved Hide resolved
@kevinbarabash kevinbarabash merged commit 551f629 into master Apr 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants