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

i18n lib change - use htmr to parse html inside json files #8585

Closed
wants to merge 57 commits into from

Conversation

pettinarip
Copy link
Member

This PR removes the usage of dangerouslySetInnerHTML (for security reasons) to insert html content from the translation files. Instead, it uses the htmr lib where we can also use our own custom components (similar to we do with markdown files).

Description

  • Revert the usage of dangerouslySetInnerHTML
  • Use htmr to parse the inner html that json files may have
  • Use our own custom components in the parsing process

Related Issue

#8345

minimalsm and others added 30 commits September 6, 2022 16:53
Send "1" for correct answer, "0" for incorrect
Moved smart contract auditing services and bug bounty platforms from the [testing page](https://ethereum.org/en/developers/docs/smart-contracts/testing/) to the smart contract security page. I gave some context on the proposal [here](#8362 (comment)).
Fix formatting on rewards and penalties page
docs: add florath as a contributor for doc
…s-color-mode-usage

refactor(upgrade-status): implement `useColorModeValue`
Fix unstyled links living in the JSON files [Fixes #8547]
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](socketio/socket.io-parser@4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Add auditing services and bug bounty platforms to SC security page
@@ -1,12 +1,26 @@
import React from "react"
Copy link
Member Author

Choose a reason for hiding this comment

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

Main change is in this file.

@gatsby-cloud
Copy link

gatsby-cloud bot commented Nov 14, 2022

❌ ethereum-org-website-react-i18n deploy preview failed

Your build failed. View the build logs.

Errors

[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/community.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/layer-2.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/wallets/find-wallet.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/index.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/upgrades/index.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/stablecoins.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/bug-bounty.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/learn/index.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/run-a-node.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages-conditional/what-is-ethereum.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages-conditional/dapps.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/community.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/wallets/find-wallet.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/layer-2.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/upgrades/index.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/index.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/bug-bounty.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/stablecoins.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/learn/index.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages/run-a-node.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages-conditional/what-is-ethereum.tsx as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /usr/src/app/www/src/pages-conditional/dapps.tsx as it exceeds the max of 500KB.
Building static HTML failed

@pettinarip
Copy link
Member Author

Note: build is failing bc of this issue #8589

@github-actions github-actions bot added documentation 📖 tooling 🔧 Changes related to tooling of the project translation 🌍 This is related to our Translation Program labels Nov 14, 2022
@pettinarip
Copy link
Member Author

pettinarip commented Nov 14, 2022

Closing this PR since it got super messed up xD

New PR: #8592

@pettinarip pettinarip closed this Nov 14, 2022
@pettinarip pettinarip deleted the i18n-parse-html-json branch November 14, 2022 23:05
@github-actions github-actions bot added the abandoned This has been abandoned or will not be implemented label Nov 14, 2022
corwintines added a commit that referenced this pull request Nov 24, 2022
i18n lib change - use htmr to parse html inside json files #8585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned This has been abandoned or will not be implemented content 🖋️ This involves copy additions or edits dependencies 📦 Changes related to project dependencies tooling 🔧 Changes related to tooling of the project translation 🌍 This is related to our Translation Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants