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

Translate admonition keyword #35

Closed
slorber opened this issue May 5, 2021 · 5 comments
Closed

Translate admonition keyword #35

slorber opened this issue May 5, 2021 · 5 comments

Comments

@slorber
Copy link

slorber commented May 5, 2021

Hi, Docusaurus maintainer here.

As we now support i18n, we need to be able to localize the keywords.

:::caution 

Must lead to "Attention" for the fr locale.

We don't necessarily want Docusaurus users to add an explicit title, nor to localize the admonition keyword (ie not :::attention), just being able to localize the default title.

See also facebook/docusaurus#4542 (comment)

Was also wondering if you'd be interested to move this package to a new docusaurus org, as I think it's only used with Docusaurus (according to npm stats) and that would help for maintenance.

@elviswolcott
Copy link
Owner

I'd definitely be willing to transfer this repo to the docusaurus org. I unfortunately don't have much time to do OSS stuff right now due to classes, so that would be a much better arrangement!

@slorber
Copy link
Author

slorber commented May 13, 2021

Thanks, FYI we are likely to create a docusaurus org or at least a separate community repo, will let you know when that happens

@ahreenah
Copy link

Hi!
Has anybody came up with solution on how to properly translate admonition title now?

@xiaogaozi
Copy link

So far, you could use an explicit title:

:::caution Some title
Test test test
:::

The rendering result is:

image

@slorber
Copy link
Author

slorber commented Jun 3, 2022

For Docusaurus users, we have moved to a different admonition setup, always using our own theme component instead of hardcoded JSX markup, which gives us more flexibility: facebook/docusaurus#7152

This allows translating admonitions in our theme component directly: facebook/docusaurus#7556

Going to close, assuming most users reporting here are using Docusaurus

@slorber slorber closed this as completed Jun 3, 2022
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

4 participants