-
-
Notifications
You must be signed in to change notification settings - Fork 627
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
Prevent title from being translated #2762
Conversation
🦋 Changeset detectedLatest commit: a838afc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting! I hadn’t encountered this attribute yet.
At first I wondered if this might be undesirable in some cases if you had a title that was not a brand name — if it was a descriptive phrase like “Pancake Recipes” or something, maybe someone would like to have that auto-translated to “Recettes de crêpes”. That said, I looked through our site showcase and thought a bit about Starlight users, and I think this would only very rarely cause issues most likely, so I think it could be a reasonable change.
Yeah, had the same question since this was reported to me and concluded like you that in the Starlight context, this would very likely almost never have an undesirable effect. 👍 |
Description
This PR adds the
translate
attribute to the header site title to indicates that the element must not be translated.For example, commenting the
logo
configuration option in the Astro config of the Starlight Docs and asking Google Translate to translate the English version of the website to French will result in the following:After this PR, the header site title will no longer be translated: