-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Malay: New language, homepage #4747
Conversation
Gatsby Cloud Build Reportethereum-org-website-dev2 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 7m PerformanceLighthouse report
|
Gatsby Cloud Build Reportethereum-org-website-dev 🎉 Your build was successful! See the Deploy preview here. Build Details🕐 Build time: 8m PerformanceLighthouse report
|
@wackerow where are we at with this 😀? |
gatsby-node.js
Outdated
@@ -334,6 +334,9 @@ exports.createPages = async ({ graphql, actions, reporter }) => { | |||
const markdownPath = `${__dirname}/src/content/translations/${lang}/${page}/index.md` | |||
const langHasOutdatedMarkdown = fs.existsSync(markdownPath) | |||
if (!langHasOutdatedMarkdown) { | |||
// Check if json strings exists for language, if not mark `isContentEnglish` as true | |||
const jsonPath = `${__dirname}/src/intl/${lang}/page-${page}.json` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just use the existing helper function checkIsPageOutdated
for this? cc @corwintines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure if this check is needed at all, given that we perform checkIsPageOutdated
within onCreatePage
, although I'm not certain that is triggered when we call createPage
below this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe it does trigger it from that method itself. exports.onCreatePage
calls createPage()
itself and would appear to cause a recursive loop if that method also triggered the lifecycle hook. Placing this here fixes the "pages-conditional" that were having the issues.
I updated to use checkIsPageOutdated
, and merged in dev / cleared conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for catching the page-conditional thing @wackerow!
Description
Adds Malay (ms) to list of languages
Import homepage strings from Crowdin
Utilizes updated legacy homepage logic from Arabic: Homepage updated #4723
Check banner logic