Skip to content

Conversation

@igrlk
Copy link
Contributor

@igrlk igrlk commented Oct 30, 2022

Closes #3561

Description

When using google translate on the docs website, it translates everything including the code examples.
This PR wraps all the code blocks with <code> tag that prevents google translate from translating the contents of code examples.

Screenshots

Translation to french using google translate extension.

Before, npm install code block is translated:

Screenshot 2022-10-30 at 14 12 13

After, npm install code block is not translated:

Screenshot 2022-10-30 at 14 12 22

Copy link
Member

@hwillson hwillson left a comment

Choose a reason for hiding this comment

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

This is awesome @igrlk - validated locally - thanks for the contribution!

CleanShot 2022-11-03 at 20 15 54

@hwillson hwillson merged commit 0d227f8 into graphql:source Nov 4, 2022
@igrlk igrlk deleted the prevent-translation-of-code-blocks branch November 4, 2022 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

关于文档的优化建议

2 participants