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

setup learn quizzes for translation #9145

Merged
merged 1 commit into from
Jan 26, 2023
Merged

Conversation

corwintines
Copy link
Member

Description

  • Setup learn quiz question pool and components for translation

@gatsby-cloud
Copy link

gatsby-cloud bot commented Jan 11, 2023

✅ ethereum-org-website-dev deploy preview ready

Copy link
Member

@wackerow wackerow left a comment

Choose a reason for hiding this comment

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

Only suggestion/question here.. QuizWidget L222:

  const handleShare = (): void => {
    if (!quizData || !window) return
    trackCustomEvent({
      eventCategory: "Quiz widget",
      eventAction: "Other",
      eventName: "Share results",
    })
    const url = `https://ethereum.org${window.location.pathname}%23quiz` // %23 is # character, needs to added to already encoded tweet string
    const tweet =
      encodeURI(
        `I just took the "${quizData.title}" quiz on ethereum.org and scored ${correctCount} out of ${quizData.questions.length}! Try it yourself at `
      ) + url
    window.open(
      `https://twitter.com/intent/tweet?text=${tweet}&hashtags=${"ethereumquiz"}`
    )
  }

Is there a way we could set this up for translation as well? I think it could be tricky given it has variables in it and is then URI encoded before it's added to the link. @pettinarip Any thoughts here?

In the meantime I don't think that needs to block the rest of the PR. Nice job @corwintines!

@corwintines
Copy link
Member Author

Going to merge and we can resolve this separately like @wackerow mentioned

@corwintines corwintines merged commit 59c6bbb into dev Jan 26, 2023
@corwintines corwintines deleted the setupLearnQuizTranslation branch January 26, 2023 19:54
@corwintines corwintines mentioned this pull request Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants