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

Add translate="no" for prevent auto-translating code #1366

Open
no-yan opened this issue Jul 3, 2022 · 1 comment
Open

Add translate="no" for prevent auto-translating code #1366

no-yan opened this issue Jul 3, 2022 · 1 comment

Comments

@no-yan
Copy link

no-yan commented Jul 3, 2022

Currently, when you try to machine-translate websites in the Tour of Go, the code editor is also translated.
This is not ideal for learning code.

In this Issue, I propose to use the translate attribute in html.
By adding translate="no" to the code editor, the code will not be translated, but the explanations will be translated without problems.
(Note that the way of using this attribute with a code block is also how it is described in the specification.)

This addition would be helpful for learners who want to learn in a language that has no translations yet, or who are having trouble with incomplete translations.

@no-yan
Copy link
Author

no-yan commented Jul 3, 2022

Here is a example of diff.
On the left, you can see that the` code is not translated.

image
(The left has 'translate="no"' and the right is the original)

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

No branches or pull requests

1 participant