-
-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate localization tooling to Lunaria (#1310)
Co-authored-by: Chris Swithinbank <[email protected]>
- Loading branch information
1 parent
197b0e1
commit f257f5f
Showing
7 changed files
with
391 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"$schema": "./node_modules/@lunariajs/core/config.schema.json", | ||
"repository": { | ||
"name": "withastro/starlight", | ||
"rootDir": "docs" | ||
}, | ||
"defaultLocale": { | ||
"label": "English", | ||
"lang": "en" | ||
}, | ||
"locales": [ | ||
{ | ||
"label": "Dansk", | ||
"lang": "da" | ||
}, | ||
{ | ||
"label": "Deutsch", | ||
"lang": "de" | ||
}, | ||
{ | ||
"label": "Español", | ||
"lang": "es" | ||
}, | ||
{ | ||
"label": "Français", | ||
"lang": "fr" | ||
}, | ||
{ | ||
"label": "हिंदी", | ||
"lang": "hi" | ||
}, | ||
{ | ||
"label": "Bahasa Indonesia", | ||
"lang": "id" | ||
}, | ||
{ | ||
"label": "Italiano", | ||
"lang": "it" | ||
}, | ||
{ | ||
"label": "日本語", | ||
"lang": "ja" | ||
}, | ||
{ | ||
"label": "한국어", | ||
"lang": "ko" | ||
}, | ||
{ | ||
"label": "Português do Brasil", | ||
"lang": "pt-br" | ||
}, | ||
{ | ||
"label": "Русский", | ||
"lang": "ru" | ||
}, | ||
{ | ||
"label": "Türkçe", | ||
"lang": "tr" | ||
}, | ||
{ | ||
"label": "Українська", | ||
"lang": "uk" | ||
}, | ||
{ | ||
"label": "简体中文", | ||
"lang": "zh-cn" | ||
} | ||
], | ||
"files": [ | ||
{ | ||
"location": "src/content/docs/**/*.{md,mdx}", | ||
"pattern": "src/content/docs/@lang/@path" | ||
} | ||
], | ||
"dashboard": { | ||
"title": "Starlight Docs Translation Status", | ||
"description": "Translation progress tracker for the Starlight Docs site. See how much has been translated in your language and get involved!", | ||
"favicon": { | ||
"external": [ | ||
{ | ||
"link": "https://starlight.astro.build/favicon.svg", | ||
"type": "image/svg+xml" | ||
} | ||
] | ||
}, | ||
"customCss": ["./lunaria/styles.css"], | ||
"basesToHide": ["src/content/docs/"], | ||
"ui": { | ||
"statusByLocale.heading": "Translation progress by locale", | ||
"statusByLocale.incompleteLocalizationLink": "incomplete translation", | ||
"statusByLocale.outdatedLocalizationLink": "outdated translation", | ||
"statusByLocale.completeLocalization": "This translation is complete, amazing job! 🎉", | ||
"statusByFile.heading": "Translation status by file" | ||
} | ||
}, | ||
"ignoreKeywords": ["lunaria-ignore", "typo", "en-only", "broken link", "i18nReady", "i18nIgnore"], | ||
"renderer": "./lunaria/renderer.config.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { html } from '@lunariajs/core'; | ||
|
||
export const TitleParagraph = () => html` | ||
<p> | ||
If you're interested in helping us translate | ||
<a href="https://starlight.astro.build/">starlight.astro.build</a> into one of the languages | ||
listed below, you've come to the right place! This auto-updating page always lists all the | ||
content that could use your help right now. | ||
</p> | ||
<p> | ||
Before starting a new translation, please read our | ||
<a href="https://github.com/withastro/starlight/blob/main/CONTRIBUTING.md#translating-starlights-docs">translation guide</a> | ||
to learn about our translation process and how you can get involved. | ||
</p> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { defineRendererConfig } from '@lunariajs/core'; | ||
import { TitleParagraph } from './components'; | ||
|
||
export default defineRendererConfig({ | ||
slots: { | ||
afterTitle: TitleParagraph, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
:root { | ||
--theme-accent: hsl(234, 100%, 87%); | ||
--theme-bg: hsl(223, 13%, 10%); | ||
--theme-table-header: hsl(222, 13%, 16%); | ||
--theme-table-hover: hsl(222, 13%, 16%); | ||
--theme-text: hsl(228, 8%, 77%); | ||
--theme-text-bright: hsl(0, 0%, 100%); | ||
--overlay-blurple: hsla(255, 60%, 60%, 0.2); | ||
|
||
--ln-color-background: linear-gradient(215deg, var(--overlay-blurple), transparent 40%), | ||
radial-gradient(var(--overlay-blurple), transparent 40%) no-repeat -60vw -40vh / 105vw 200vh, | ||
radial-gradient(var(--overlay-blurple), transparent 65%) no-repeat 50% calc(100% + 20rem) / | ||
60rem 30rem, | ||
var(--theme-bg); | ||
--ln-color-link: var(--theme-accent); | ||
--ln-color-black: var(--theme-text); | ||
--ln-color-done: var(--ln-color-blue); | ||
--ln-color-outdated: #ea580c; | ||
--ln-color-missing: var(--theme-text-bright); | ||
--ln-color-table-background: var(--theme-table-header); | ||
--ln-color-table-border: var(--theme-table-header); | ||
|
||
color-scheme: dark; | ||
} | ||
|
||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
color: var(--theme-text-bright); | ||
} | ||
|
||
p a { | ||
text-decoration: underline; | ||
} | ||
|
||
.create-button { | ||
background-color: hsl(213deg 89% 64% / 20%); | ||
border-radius: 0.5em; | ||
} | ||
|
||
sup { | ||
display: flex; | ||
justify-content: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.