Skip to content

Commit af6ffd4

Browse files
committed
feat: new astro-i18n-toolbar integration
1 parent 0c882b6 commit af6ffd4

23 files changed

Lines changed: 1794 additions & 43 deletions

README.md

Lines changed: 19 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,54 @@
1-
# 📦 astro-integrations
1+
# astro-integrations
22

33
A collection of Astro integrations by [@shiftEscape](https://github.com/shiftEscape).
44

55
## Packages
66

7-
| Package | Description | npm |
8-
| ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
9-
| [`@shiftescape/astro-bundle-budget`](./packages/astro-bundle-budget) | Build-time JS/CSS bundle size budgets — fails the build when pages exceed your thresholds | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-bundle-budget)](https://www.npmjs.com/package/@shiftescape/astro-bundle-budget) |
10-
| [`@shiftescape/astro-env-inspector`](./packages/astro-env-inspector) | Dev toolbar panel that shows your environment variables grouped, masked, and searchable | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-env-inspector)](https://www.npmjs.com/package/@shiftescape/astro-env-inspector) |
11-
| [`@shiftescape/astro-toolbar-routes`](./packages/astro-toolbar-routes) | Dev toolbar route map — clickable list of every route in your project, grouped and searchable | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-toolbar-routes)](https://www.npmjs.com/package/@shiftescape/astro-toolbar-routes) |
7+
| Package | Description | npm |
8+
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
9+
| [`@shiftescape/astro-bundle-budget`](./packages/astro-bundle-budget) | Build-time JS/CSS bundle size budgets — fails the build when pages exceed your thresholds | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-bundle-budget)](https://www.npmjs.com/package/@shiftescape/astro-bundle-budget) |
10+
| [`@shiftescape/astro-env-inspector`](./packages/astro-env-inspector) | Dev toolbar panel that shows your environment variables grouped, masked, and searchable | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-env-inspector)](https://www.npmjs.com/package/@shiftescape/astro-env-inspector) |
11+
| [`@shiftescape/astro-toolbar-routes`](./packages/astro-toolbar-routes) | Dev toolbar route map — clickable list of every route in your project, grouped and searchable | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-toolbar-routes)](https://www.npmjs.com/package/@shiftescape/astro-toolbar-routes) |
12+
| [`@shiftescape/astro-i18n-toolkit`](./packages/astro-i18n-toolkit) | Dev toolbar i18n debugger — translation coverage map across all locales and a one-click locale switcher, library-agnostic | [![npm](https://img.shields.io/npm/v/@shiftescape/astro-i18n-toolkit)](https://www.npmjs.com/package/@shiftescape/astro-i18n-toolkit) |
1213

1314
## Structure
1415

1516
```
1617
astro-integrations/
1718
├── packages/
18-
│ ├── astro-bundle-budget/ # @shiftescape/astro-bundle-budget
19-
│ ├── astro-env-inspector/ # @shiftescape/astro-env-inspector
20-
│ └── astro-toolbar-routes/ # @shiftescape/astro-toolbar-routes
21-
└── demo/ # shared Astro site for local testing
19+
│ ├── astro-bundle-budget/ # @shiftescape/astro-bundle-budget
20+
│ ├── astro-env-inspector/ # @shiftescape/astro-env-inspector
21+
│ ├── astro-toolbar-routes/ # @shiftescape/astro-toolbar-routes
22+
│ └── astro-i18n-toolkit/ # @shiftescape/astro-i18n-toolkit
23+
└── demo/ # shared Astro site for local testing
2224
```
2325

2426
## Getting started
2527

26-
Install all workspace dependencies from the root:
27-
2828
```bash
2929
npm install
3030
```
3131

3232
## Development workflow
3333

34-
**1. Build a package** (required before testing in the demo):
34+
**Build a package:**
3535

3636
```bash
3737
npm run build:bundle-budget
3838
npm run build:env-inspector
3939
npm run build:toolbar-routes
40-
# or build all at once
40+
npm run build:i18n-toolkit
41+
# or all at once:
4142
npm run build:all
4243
```
4344

44-
Or keep a package watching in a separate terminal:
45-
46-
```bash
47-
cd packages/astro-bundle-budget && npm run dev
48-
cd packages/astro-env-inspector && npm run dev
49-
cd packages/astro-toolbar-routes && npm run dev
50-
```
51-
52-
**2. Start the demo** to test all integrations live:
45+
**Start the demo:**
5346

5447
```bash
5548
npm run dev:demo
5649
```
5750

58-
**3. Test bundle budgets** (requires a full build):
51+
**Test bundle budgets:**
5952

6053
```bash
6154
npm run build:demo
@@ -67,9 +60,10 @@ npm run build:demo
6760
npm test --workspace=packages/astro-bundle-budget
6861
npm test --workspace=packages/astro-env-inspector
6962
npm test --workspace=packages/astro-toolbar-routes
63+
npm test --workspace=packages/astro-i18n-toolkit
7064
```
7165

72-
CI runs all tests first, then publishes only the matching package.
66+
CI runs all test suites first, then publishes only the matching package.
7367

7468
## License
7569

demo/astro.config.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { defineConfig } from "astro/config";
22
import bundleBudget from "@shiftescape/astro-bundle-budget";
33
import envInspector from "@shiftescape/astro-env-inspector";
44
import toolbarRoutes from "@shiftescape/astro-toolbar-routes";
5+
import i18nToolkit from "@shiftescape/astro-i18n-toolkit";
56

67
export default defineConfig({
78
vite: {
@@ -11,10 +12,11 @@ export default defineConfig({
1112
},
1213
integrations: [
1314
bundleBudget({
14-
budgets: [{ path: "**/*.js", budget: "2 B" }],
15+
budgets: [{ path: "**/*.js", budget: "2B" }],
1516
verbose: true,
1617
}),
1718
envInspector(),
1819
toolbarRoutes(),
20+
i18nToolkit({ localesDir: "./src/locales", defaultLocale: "en" }),
1921
],
2022
});

demo/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"astro": "^6.0.8",
1616
"@shiftescape/astro-bundle-budget": "*",
1717
"@shiftescape/astro-env-inspector": "*",
18-
"@shiftescape/astro-toolbar-routes": "*"
18+
"@shiftescape/astro-toolbar-routes": "*",
19+
"@shiftescape/astro-i18n-toolkit": "*"
1920
}
2021
}

demo/src/locales/de.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"nav": {
3+
"home": "Startseite",
4+
"about": "Über uns",
5+
"blog": "Blog",
6+
"contact": "Kontakt"
7+
},
8+
"hero": {
9+
"title": "Astro-Integrationen, die wirklich helfen.",
10+
"cta_primary": "Auf GitHub ansehen",
11+
"cta_secondary": "Auf npm ansehen"
12+
},
13+
"packages": {
14+
"heading": "Fünf Werkzeuge. Kein Schnickschnack.",
15+
"description": "Jede Integration ist fokussiert, abhängigkeitsfrei und so konzipiert, dass sie unsichtbar bleibt."
16+
},
17+
"install": {
18+
"heading": "In Sekunden installiert."
19+
},
20+
"footer": {
21+
"built_by": "Erstellt von",
22+
"license": "MIT-Lizenz",
23+
"links_github": "GitHub",
24+
"links_npm": "npm"
25+
}
26+
}

demo/src/locales/en.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"nav": {
3+
"home": "Home",
4+
"about": "About",
5+
"blog": "Blog",
6+
"contact": "Contact",
7+
"pricing": "Pricing"
8+
},
9+
"hero": {
10+
"title": "Astro integrations that actually help.",
11+
"subtitle": "Focused, zero-dependency integrations for Astro. Each one solves a real developer pain point.",
12+
"cta_primary": "View on GitHub",
13+
"cta_secondary": "View on npm"
14+
},
15+
"packages": {
16+
"heading": "Five tools. Zero fluff.",
17+
"description": "Each integration is focused, dependency-free, and designed to disappear — showing up only when you need it."
18+
},
19+
"install": {
20+
"heading": "Install in seconds.",
21+
"description": "All five integrations work independently. Install only what you need."
22+
},
23+
"footer": {
24+
"built_by": "Built by",
25+
"license": "MIT License",
26+
"links_github": "GitHub",
27+
"links_npm": "npm",
28+
"links_astro": "Astro integrations",
29+
"newsletter": "Stay up to date"
30+
}
31+
}

demo/src/locales/fr.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"nav": {
3+
"home": "Accueil",
4+
"about": "À propos",
5+
"blog": "Blog",
6+
"contact": "Contact",
7+
"pricing": "Tarifs"
8+
},
9+
"hero": {
10+
"title": "Des intégrations Astro vraiment utiles.",
11+
"subtitle": "Des intégrations légères et sans dépendances pour Astro. Chacune résout un vrai problème de développeur.",
12+
"cta_primary": "Voir sur GitHub",
13+
"cta_secondary": "Voir sur npm"
14+
},
15+
"packages": {
16+
"heading": "Cinq outils. Zéro superflu.",
17+
"description": "Chaque intégration est ciblée, sans dépendances et conçue pour s'effacer — disponible uniquement quand vous en avez besoin."
18+
},
19+
"install": {
20+
"heading": "Installation en quelques secondes.",
21+
"description": "Les cinq intégrations fonctionnent indépendamment. Installez uniquement ce dont vous avez besoin."
22+
},
23+
"footer": {
24+
"built_by": "Créé par",
25+
"license": "Licence MIT",
26+
"links_github": "GitHub",
27+
"links_npm": "npm",
28+
"links_astro": "Intégrations Astro"
29+
}
30+
}

0 commit comments

Comments
 (0)