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

Fix "yarn test" for website by adding injection step to siteConfig.js #3475

Merged
merged 1 commit into from
May 5, 2017
Merged

Fix "yarn test" for website by adding injection step to siteConfig.js #3475

merged 1 commit into from
May 5, 2017

Conversation

ericnakagawa
Copy link
Contributor

@ericnakagawa ericnakagawa commented May 5, 2017

Summary

"yarn test" was failing for website build because we were statically requiring dynamically generated js files (en.js is created from en.json, en.json is needed by CrowdIn since it can't process a js file for translateable strings, but JSON format works). These files don't exist at CI test step, and only exist at website build step after a upload/download sync. This PR adds only the available languages to the siteConfig at runtime so that "yarn test" run from /website works and the website build step also works.

Also added fixes to navigation, and added localized titles to pages.

Test plan

Tested locally by running "yarn test" from /website when no localized JSON files and docs were present, then ran after CrowdIn download step.

Need tests on CI to pass, and will require SSH-ing in to see if files output properly.

@jest-bot
Copy link
Contributor

jest-bot commented May 5, 2017

Fails
🚫 New JS files do not have the Facebook copyright header: website/server/translation.js

Generated by 🚫 dangerJS

… available translation files

Refactored how generate works to now call translatePre.js, translate.js, and convert.js

Fixed folder delete race condition

Add website building scripts to prettier

Fix prettier warnings

Fixes page next/prev routing, updates website pages in prettier

Localize page's browser title

Debugging fs failure

Change how it writes file to disk to create folder if missing
@ericnakagawa ericnakagawa merged commit 6f4a001 into jestjs:master May 5, 2017
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
… available translation files (jestjs#3475)

Refactored how generate works to now call translatePre.js, translate.js, and convert.js

Fixed folder delete race condition

Add website building scripts to prettier

Fix prettier warnings

Fixes page next/prev routing, updates website pages in prettier

Localize page's browser title

Debugging fs failure

Change how it writes file to disk to create folder if missing
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants