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

Disable translation for <code> tags. #581

Closed
Christophe-Gauge opened this issue May 29, 2022 · 3 comments
Closed

Disable translation for <code> tags. #581

Christophe-Gauge opened this issue May 29, 2022 · 3 comments
Labels
type:duplicate This issue or pull request already exists

Comments

@Christophe-Gauge
Copy link

Christophe-Gauge commented May 29, 2022

I can't think of any reasons why sample code snippets between the <code>...</code> tags should ever be translated.

Is there a way to configure wagtail-localize to skip content between these tags when using automated translation?

@zerolab
Copy link
Collaborator

zerolab commented May 31, 2022

Hey @Christophe-Gauge, how are you adding the <code> snippets? Can you provide a minimal reproducible test case?

@Christophe-Gauge
Copy link
Author

I am using https://pypi.org/project/wagtailcodeblock/ to add a "Code" content type to ContentStreamBlock.

Using automated translation with wagtail-localize, all "Code" blocks are translated:

image

@zerolab
Copy link
Collaborator

zerolab commented Jun 5, 2022

Hey @Christophe-Gauge, thanks for the additional info.

This is very much what #307 aims to do. We'll get to it eventually (or if someone sponsors it, sooner)

Will close as duplicate of #307

@zerolab zerolab closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2022
@zerolab zerolab added the type:duplicate This issue or pull request already exists label Jun 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants