···11-# Astro Starter Kit: Minimal
22-33-```sh
44-pnpm create astro@latest -- --template minimal
55-```
66-77-[](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal)
88-[](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal)
99-[](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json)
1010-1111-> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
1212-1313-## 🚀 Project Structure
1414-1515-Inside of your Astro project, you'll see the following folders and files:
1616-1717-```text
1818-/
1919-├── public/
2020-├── src/
2121-│ └── pages/
2222-│ └── index.astro
2323-└── package.json
2424-```
2525-2626-Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
2727-2828-There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
2929-3030-Any static assets, like images, can be placed in the `public/` directory.
3131-3232-## 🧞 Commands
3333-3434-All commands are run from the root of the project, from a terminal:
3535-3636-| Command | Action |
3737-| :------------------------ | :----------------------------------------------- |
3838-| `pnpm install` | Installs dependencies |
3939-| `pnpm dev` | Starts local dev server at `localhost:4321` |
4040-| `pnpm build` | Build your production site to `./dist/` |
4141-| `pnpm preview` | Preview your build locally, before deploying |
4242-| `pnpm astro ...` | Run CLI commands like `astro add`, `astro check` |
4343-| `pnpm astro -- --help` | Get help using the Astro CLI |
4444-4545-## 👀 Want to learn more?
4646-4747-Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
11+# Starlight Plugins Translation Tracker
···11---
22+import LunariaLayout from "../layouts/LunariaLayout.astro";
33+import { processPlugins } from "../utils";
2455+const pluginsData = await processPlugins();
36---
4755-<html lang="en">
66- <head>
77- <meta charset="utf-8" />
88- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
99- <meta name="viewport" content="width=device-width" />
1010- <meta name="generator" content={Astro.generator} />
1111- <title>Astro</title>
1212- </head>
1313- <body>
1414- <h1>Astro</h1>
1515- </body>
1616-</html>
88+<LunariaLayout title="Starlight Plugins Translation Tracker" {pluginsData}>
99+ <p slot="description">
1010+ If you're interested in helping us translate various <a href="https://starlight.astro.build/resources/plugins/">Starlight plugins</a> that need translations 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.
1111+ </p>
1212+ <p slot="description">
1313+ In order to translate a missing key into your language, you need to create a new section in the translation file (if you click on the link you get linked to this file) with your language and all the keys strings translated from the <code>"en"</code> section.
1414+ </p>
1515+ <p slot="description">
1616+ If you are a plugin author that wants to add their plugin to this website, be sure to follow the convention described in <a href="https://github.com/HiDeoo/">@HiDeoo</a>'s <a href="https://hideoo.dev/notes/starlight-plugin-use-custom-translation-strings">blog about translations in Starlight plugins</a> and then you can add your plugin to <a href="#">this list</a>.
1717+ </p>
1818+</LunariaLayout>
···11+---
22+import LunariaLayout from "../../layouts/LunariaLayout.astro";
33+import { processPlugins } from "../../utils";
44+55+export async function getStaticPaths() {
66+ const pluginsData = await processPlugins();
77+ return pluginsData.map(plugin => ({
88+ params: { plugin: plugin.packageName },
99+ props: { pluginsData: plugin }
1010+ }));
1111+}
1212+1313+const { pluginsData } = Astro.props;
1414+const title = pluginsData.name + " Translation Tracker";
1515+---
1616+1717+<LunariaLayout {title} pluginsData={[pluginsData]}>
1818+ <p slot="description">
1919+ You are viewing the translation tracker for the <a href={pluginsData.translationFileLink}>{pluginsData.name}</a> plugin.
2020+ </p>
2121+</LunariaLayout>
+65
src/schemas.ts
···11+import { z } from "astro/zod";
22+33+const StatusSchema = z.enum(["done", "missing"]);
44+55+const PluginSchema = z.object({
66+ name: z.string().describe("The name of the plugin that will be displayed on the website"),
77+ packageName: z
88+ .string()
99+ .describe("The package name of the plugin as it is published on npm and named on GitHub which will be used for URL slugs"),
1010+ translationFileLink: z.string().describe("A link to the translations.ts file of the plugin (preferably GitHub)"),
1111+ translationFileLinkRaw: z.string().describe("A link to the raw content of the translations.ts file of the plugin (preferably GitHub)"),
1212+});
1313+1414+const LocaleSchema = z.object({
1515+ label: z.string().describe('The label of the locale to show in the status dashboard, e.g. `"English"`, `"Português"`, or `"Español"`'),
1616+ lang: z
1717+ .string()
1818+ .describe(
1919+ 'The BCP-47 tag of the locale, both to use in smaller widths and to differentiate regional variants, e.g. `"en-US"` (American English) or `"en-GB"` (British English)'
2020+ ),
2121+});
2222+2323+const DashboardSchema = z.object({
2424+ plugins: z.array(PluginSchema),
2525+ locales: z.array(LocaleSchema),
2626+});
2727+2828+const ProgressSchema = z.object({
2929+ total: z.number(),
3030+ missing: z.number(),
3131+ size: z.number().default(20).optional(),
3232+});
3333+3434+const KeySchema = z.object({
3535+ name: z.string(),
3636+ link: z.string(),
3737+});
3838+3939+const LocaleKeysSchema = z.object({
4040+ locale: LocaleSchema,
4141+ keys: z.array(
4242+ KeySchema.extend({
4343+ status: StatusSchema,
4444+ })
4545+ ),
4646+});
4747+4848+const KeyStatusesSchema = z.object({
4949+ key: KeySchema,
5050+ statuses: z.array(
5151+ z.object({
5252+ locale: LocaleSchema,
5353+ status: StatusSchema,
5454+ })
5555+ ),
5656+});
5757+5858+export type Status = z.infer<typeof StatusSchema>;
5959+export type Plugin = z.infer<typeof PluginSchema>;
6060+export type Locale = z.infer<typeof LocaleSchema>;
6161+export type Dashboard = z.infer<typeof DashboardSchema>;
6262+export type Progress = z.infer<typeof ProgressSchema>;
6363+export type Key = z.infer<typeof KeySchema>;
6464+export type LocaleKeys = z.infer<typeof LocaleKeysSchema>;
6565+export type KeyStatus = z.infer<typeof KeyStatusesSchema>;