Skip to content

feat: internationalize code block copy button title #3854

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

Merged
merged 3 commits into from
May 2, 2024

Conversation

nozomuikuta
Copy link
Contributor

Resolves #3695

I tested it by linking the package to another project in my local with file: protocol in package.json.
Option name follows lightModeSwitchTitle, etc.

Comment on lines 188 to 191
/**
* @default 'Copy Code'
*/
codeCopyButtonTitle?: string
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure, but should I put this in themeConfig for it to be aligned with other similar options in terms of developer experience?

Copy link
Member

Choose a reason for hiding this comment

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

Ah no. themeConfig is theme dependent. People using other themes won't be able to use this option then. Moreover themeConfig is can be overloaded per locale. Markdown config currently doesn't support that 👀

@brc-dd brc-dd merged commit ed6ada7 into vuejs:main May 2, 2024
7 checks passed
@nozomuikuta nozomuikuta deleted the feat/code-copy-button-label-i18n branch May 2, 2024 20:26
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add i18n for CopyCode block
2 participants