-
-
Notifications
You must be signed in to change notification settings - Fork 530
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
Expose FS translation system to plugins #2578
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 5eb0121 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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. |
@@ -152,7 +151,7 @@ export function getStarlightEcConfigPreprocessor({ | |||
}, | |||
...otherStyleOverrides, | |||
}, | |||
getBlockLocale: ({ file }) => pathToLocale(file.path, { starlightConfig, astroConfig }), | |||
getBlockLocale: ({ file }) => pathToLang(file.path, { astroConfig, starlightConfig }), |
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.
Expressive Code technically expects a Starlight language here so I changed it but this is not a bug fix (no changeset) as Expressive Code lower-cases the language identifier anyway.
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Description
This plugin exposes the file system translation system to Starlight plugins throught the
setup
hook using a newuseTranslations()
callback function.This change requires the addition of a new plugin hook (currently named
init
, I picked the first thing coming to mind to get started) which now exposes theinjectTranslations()
callback function (which was previously available in thesetup
hook).The documentation so far is only a rough draft to get an idea of everything changed.
Remaining tasks
docs/astro.config.mjs
filedocs/package.json
filedocs/src/content/i18n/zh-CN.json
filepackages/demo-plugin/
directorypnpm i
to remove mention of thestarlight-demo-plugin
package in the lockfile// TODO(HiDeoo)
comments (if any)