astro 2.4.4 breaks i18n, reverted to 2.4.3

This commit is contained in:
Nico 2023-05-17 17:55:47 +02:00
parent c3ce3f9e38
commit 4ec6b01162
8 changed files with 38 additions and 37 deletions

View File

@ -1,8 +1,8 @@
type DefaultLangCode = "fr" type DefaultLangCode = "fr"
type SupportedLangCode = "en" type SupportedLangCode = "en"
type LangCode = DefaultLangCode | SupportedLangCode type LangCode = DefaultLangCode | SupportedLangCode
type RouteUri = | "/articles/[slug]" | "/articles" | "/agments/[slug]" | "/agments" | "/references" | "/veille" | "/" | "/plan-du-site" type RouteUri = | "/articles/[...slug]" | "/articles" | "/agments/[slug]" | "/agments" | "/references" | "/veille" | "/" | "/plan-du-site"
type RouteParams = {"/articles/[slug]": { "slug": string; }; "/articles": undefined; "/agments/[slug]": { "slug": string; }; "/agments": undefined; "/references": undefined; "/veille": undefined; "/": undefined; "/plan-du-site": undefined; } type RouteParams = {"/articles/[...slug]": { "...slug": string; }; "/articles": undefined; "/agments/[slug]": { "slug": string; }; "/agments": undefined; "/references": undefined; "/veille": undefined; "/": undefined; "/plan-du-site": undefined; }
type TranslationPath = "accueil" | "tagline" | "copyright" | "contact.title" | "contact.email" | "contact.tel" | "contenuVide" | "header.skipLink" | "header.mainNav" | "header.homeLink" | "sitemap" | "prevNext.contenus" | "prevNext.precedent" | "prevNext.suivant" | "article.titre" | "article.tagline" | "article.published" | "meta.publication" | "meta.modification" | "meta.credit" | "fragments.titre" | "fragments.tagline" | "references.titre" | "references.slug" | "references.cta" | "references.tagline" | "veille.titre" | "veille.tagline" | "erreur.introuvable" | "erreur.autre" | "erreur.lienRetour" | "seo.meta.description" | "seo.article.title" | "seo.article.description" | "seo.code.title" | "seo.code.description" | "seo.references.title" | "seo.references.description" | "index.articles.pageName" | "index.articles.subtitle" | "index.fragments.pageName" | "index.fragments.subtitle" | "index.references.pageName" | "index.references.subtitle" | "index.veille.pageName" | "index.veille.subtitle" | "index.title" | "index.subtitle" | "index.quoi" | "index.comment" | "index.opensource" | "index.writing" | "index.latestProjects" | "index.latestArticles" | "index.allProjects" | "index.allArticles" | "index.latestSnippets" | "index.allSnippets" | "index.toc" | "contact.contenuVide" type TranslationPath = "accueil" | "tagline" | "copyright" | "contact.title" | "contact.email" | "contact.tel" | "contenuVide" | "header.skipLink" | "header.mainNav" | "header.homeLink" | "sitemap" | "prevNext.contenus" | "prevNext.precedent" | "prevNext.suivant" | "article.titre" | "article.tagline" | "article.published" | "meta.publication" | "meta.modification" | "meta.credit" | "fragments.titre" | "fragments.tagline" | "references.titre" | "references.slug" | "references.cta" | "references.tagline" | "veille.titre" | "veille.tagline" | "erreur.introuvable" | "erreur.autre" | "erreur.lienRetour" | "seo.meta.description" | "seo.article.title" | "seo.article.description" | "seo.code.title" | "seo.code.description" | "seo.references.title" | "seo.references.description" | "index.articles.pageName" | "index.articles.subtitle" | "index.fragments.pageName" | "index.fragments.subtitle" | "index.references.pageName" | "index.references.subtitle" | "index.veille.pageName" | "index.veille.subtitle" | "index.title" | "index.subtitle" | "index.quoi" | "index.comment" | "index.opensource" | "index.writing" | "index.latestProjects" | "index.latestArticles" | "index.allProjects" | "index.allArticles" | "index.latestSnippets" | "index.allSnippets" | "index.toc" | "contact.contenuVide"
type TranslationOptions = { "accueil": {} | undefined; "tagline": {} | undefined; "copyright": {} | undefined; "contact.title": {} | undefined; "contact.email": {} | undefined; "contact.tel": {} | undefined; "contenuVide": {} | undefined; "header.skipLink": {} | undefined; "header.mainNav": {} | undefined; "header.homeLink": {} | undefined; "sitemap": {} | undefined; "prevNext.contenus": {} | undefined; "prevNext.precedent": {} | undefined; "prevNext.suivant": {} | undefined; "article.titre": {} | undefined; "article.tagline": {} | undefined; "article.published": { datetime: unknown; options: unknown; }; "meta.publication": {} | undefined; "meta.modification": {} | undefined; "meta.credit": {} | undefined; "fragments.titre": {} | undefined; "fragments.tagline": {} | undefined; "references.titre": {} | undefined; "references.slug": {} | undefined; "references.cta": {} | undefined; "references.tagline": {} | undefined; "veille.titre": {} | undefined; "veille.tagline": {} | undefined; "erreur.introuvable": {} | undefined; "erreur.autre": {} | undefined; "erreur.lienRetour": {} | undefined; "seo.meta.description": {} | undefined; "seo.article.title": {} | undefined; "seo.article.description": {} | undefined; "seo.code.title": {} | undefined; "seo.code.description": {} | undefined; "seo.references.title": {} | undefined; "seo.references.description": {} | undefined; "index.articles.pageName": {} | undefined; "index.articles.subtitle": {} | undefined; "index.fragments.pageName": {} | undefined; "index.fragments.subtitle": {} | undefined; "index.references.pageName": {} | undefined; "index.references.subtitle": {} | undefined; "index.veille.pageName": {} | undefined; "index.veille.subtitle": {} | undefined; "index.title": {} | undefined; "index.subtitle": {} | undefined; "index.quoi": {} | undefined; "index.comment": {} | undefined; "index.opensource": {} | undefined; "index.writing": {} | undefined; "index.latestProjects": {} | undefined; "index.latestArticles": {} | undefined; "index.allProjects": {} | undefined; "index.allArticles": {} | undefined; "index.latestSnippets": {} | undefined; "index.allSnippets": {} | undefined; "index.toc": {} | undefined; "contact.contenuVide": {} | undefined; } type TranslationOptions = { "accueil": {} | undefined; "tagline": {} | undefined; "copyright": {} | undefined; "contact.title": {} | undefined; "contact.email": {} | undefined; "contact.tel": {} | undefined; "contenuVide": {} | undefined; "header.skipLink": {} | undefined; "header.mainNav": {} | undefined; "header.homeLink": {} | undefined; "sitemap": {} | undefined; "prevNext.contenus": {} | undefined; "prevNext.precedent": {} | undefined; "prevNext.suivant": {} | undefined; "article.titre": {} | undefined; "article.tagline": {} | undefined; "article.published": { datetime: unknown; options: unknown; }; "meta.publication": {} | undefined; "meta.modification": {} | undefined; "meta.credit": {} | undefined; "fragments.titre": {} | undefined; "fragments.tagline": {} | undefined; "references.titre": {} | undefined; "references.slug": {} | undefined; "references.cta": {} | undefined; "references.tagline": {} | undefined; "veille.titre": {} | undefined; "veille.tagline": {} | undefined; "erreur.introuvable": {} | undefined; "erreur.autre": {} | undefined; "erreur.lienRetour": {} | undefined; "seo.meta.description": {} | undefined; "seo.article.title": {} | undefined; "seo.article.description": {} | undefined; "seo.code.title": {} | undefined; "seo.code.description": {} | undefined; "seo.references.title": {} | undefined; "seo.references.description": {} | undefined; "index.articles.pageName": {} | undefined; "index.articles.subtitle": {} | undefined; "index.fragments.pageName": {} | undefined; "index.fragments.subtitle": {} | undefined; "index.references.pageName": {} | undefined; "index.references.subtitle": {} | undefined; "index.veille.pageName": {} | undefined; "index.veille.subtitle": {} | undefined; "index.title": {} | undefined; "index.subtitle": {} | undefined; "index.quoi": {} | undefined; "index.comment": {} | undefined; "index.opensource": {} | undefined; "index.writing": {} | undefined; "index.latestProjects": {} | undefined; "index.latestArticles": {} | undefined; "index.allProjects": {} | undefined; "index.allArticles": {} | undefined; "index.latestSnippets": {} | undefined; "index.allSnippets": {} | undefined; "index.toc": {} | undefined; "contact.contenuVide": {} | undefined; }

View File

@ -4,6 +4,7 @@ export default defineAstroI18nConfig({
defaultLangCode: "fr", defaultLangCode: "fr",
supportedLangCodes: ["en"], supportedLangCodes: ["en"],
showDefaultLangCode: false, showDefaultLangCode: false,
trailingSlash: "never",
translations: { translations: {
fr: "src/i18n/fr.json", fr: "src/i18n/fr.json",
en: "src/i18n/en.json", en: "src/i18n/en.json",

View File

@ -13,12 +13,12 @@
"i18n:sync": "astro-i18n sync" "i18n:sync": "astro-i18n sync"
}, },
"dependencies": { "dependencies": {
"@astrojs/image": "^0.16.8", "@astrojs/image": "0.16.7",
"@astrojs/mdx": "^0.19.1", "@astrojs/mdx": "^0.19.1",
"@astrojs/rss": "^2.4.1", "@astrojs/rss": "^2.4.1",
"@astrojs/sitemap": "^1.3.1", "@astrojs/sitemap": "^1.3.1",
"astro": "2.4.5", "astro": "2.4.3",
"astro-i18n": "^1.7.0" "astro-i18n": "1.7.0"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^10.4.13", "autoprefixer": "^10.4.13",

View File

@ -2,11 +2,11 @@ lockfileVersion: '6.0'
dependencies: dependencies:
'@astrojs/image': '@astrojs/image':
specifier: ^0.16.8 specifier: 0.16.7
version: 0.16.8(astro@2.4.5) version: 0.16.7(astro@2.4.3)
'@astrojs/mdx': '@astrojs/mdx':
specifier: ^0.19.1 specifier: ^0.19.1
version: 0.19.1(astro@2.4.5)(rollup@3.22.0) version: 0.19.1(astro@2.4.3)(rollup@3.22.0)
'@astrojs/rss': '@astrojs/rss':
specifier: ^2.4.1 specifier: ^2.4.1
version: 2.4.1 version: 2.4.1
@ -14,10 +14,10 @@ dependencies:
specifier: ^1.3.1 specifier: ^1.3.1
version: 1.3.1 version: 1.3.1
astro: astro:
specifier: 2.4.5 specifier: 2.4.3
version: 2.4.5 version: 2.4.3
astro-i18n: astro-i18n:
specifier: ^1.7.0 specifier: 1.7.0
version: 1.7.0 version: 1.7.0
devDependencies: devDependencies:
@ -46,17 +46,17 @@ packages:
resolution: {integrity: sha512-xoRp7JpiMZPK/beUcZEM5kM44Z/h20wwwQcl54duPqQMyySG9vZ5xMM6dYiQmn7b3XzpZs0cT6TRDoJJ5gwHAQ==} resolution: {integrity: sha512-xoRp7JpiMZPK/beUcZEM5kM44Z/h20wwwQcl54duPqQMyySG9vZ5xMM6dYiQmn7b3XzpZs0cT6TRDoJJ5gwHAQ==}
dev: false dev: false
/@astrojs/image@0.16.8(astro@2.4.5): /@astrojs/image@0.16.7(astro@2.4.3):
resolution: {integrity: sha512-ka18Y8HXllitE4TN66tmxqc1j+pgfqfq5i/D3I0QmmH2hFd7olFNVDrd15S4ZM1U5jxZORUv+PuJU0g8dZEjqQ==} resolution: {integrity: sha512-8X1DnMh3lUTA7BNt7dF0rfWTXNwvLoPWWXtLi+TdO3CW1SvdY9LJRuCEWwHfnKzcQ0EC2TfLwjukpbtJuCRxjw==}
peerDependencies: peerDependencies:
astro: ^2.4.5 astro: ^2.3.4
sharp: '>=0.31.0' sharp: '>=0.31.0'
peerDependenciesMeta: peerDependenciesMeta:
sharp: sharp:
optional: true optional: true
dependencies: dependencies:
'@altano/tiny-async-pool': 1.0.2 '@altano/tiny-async-pool': 1.0.2
astro: 2.4.5 astro: 2.4.3
http-cache-semantics: 4.1.1 http-cache-semantics: 4.1.1
image-size: 1.0.2 image-size: 1.0.2
kleur: 4.1.5 kleur: 4.1.5
@ -83,13 +83,13 @@ packages:
vscode-uri: 3.0.7 vscode-uri: 3.0.7
dev: false dev: false
/@astrojs/markdown-remark@2.2.0(astro@2.4.5): /@astrojs/markdown-remark@2.2.0(astro@2.4.3):
resolution: {integrity: sha512-4M1+GzQwDqF0KfX9Ahug43b0avorcK+iTapEaVuNnaCUVS6sZKRkztT3g6hmXiFmGHSL8qYaS9IVEmKtP6hYmw==} resolution: {integrity: sha512-4M1+GzQwDqF0KfX9Ahug43b0avorcK+iTapEaVuNnaCUVS6sZKRkztT3g6hmXiFmGHSL8qYaS9IVEmKtP6hYmw==}
peerDependencies: peerDependencies:
astro: ^2.4.0 astro: ^2.4.0
dependencies: dependencies:
'@astrojs/prism': 2.1.1 '@astrojs/prism': 2.1.1
astro: 2.4.5 astro: 2.4.3
github-slugger: 1.5.0 github-slugger: 1.5.0
import-meta-resolve: 2.2.2 import-meta-resolve: 2.2.2
rehype-raw: 6.1.1 rehype-raw: 6.1.1
@ -106,11 +106,11 @@ packages:
- supports-color - supports-color
dev: false dev: false
/@astrojs/mdx@0.19.1(astro@2.4.5)(rollup@3.22.0): /@astrojs/mdx@0.19.1(astro@2.4.3)(rollup@3.22.0):
resolution: {integrity: sha512-9GNNZbGT+lGvbRkQK/NaEJcnjj1T94/ne0KwPjJgNCBQrJuskX5IW1hKiE5bRSOFvkAOrBGneYKg0GXYArBOQQ==} resolution: {integrity: sha512-9GNNZbGT+lGvbRkQK/NaEJcnjj1T94/ne0KwPjJgNCBQrJuskX5IW1hKiE5bRSOFvkAOrBGneYKg0GXYArBOQQ==}
engines: {node: '>=16.12.0'} engines: {node: '>=16.12.0'}
dependencies: dependencies:
'@astrojs/markdown-remark': 2.2.0(astro@2.4.5) '@astrojs/markdown-remark': 2.2.0(astro@2.4.3)
'@astrojs/prism': 2.1.1 '@astrojs/prism': 2.1.1
'@mdx-js/mdx': 2.3.0 '@mdx-js/mdx': 2.3.0
'@mdx-js/rollup': 2.3.0(rollup@3.22.0) '@mdx-js/rollup': 2.3.0(rollup@3.22.0)
@ -972,8 +972,8 @@ packages:
get-file-exports: 1.2.1 get-file-exports: 1.2.1
dev: false dev: false
/astro@2.4.5: /astro@2.4.3:
resolution: {integrity: sha512-osxLnuLXaOX0FjWOVQH8cmK4N/Gdj/ZdEkeyMJWsUss7xQU4Q64tAxB/dAv75f/XZiu+PprmndJkyQ4sYLOv1g==} resolution: {integrity: sha512-WU7sMkgFNQs4WZzEmpjOYZthcT8+LSmwIR0GvWzVYlb+dIMfFCQyg99LNHdhg/XZKi08ztaHmRf4ZBjJvZHsgA==}
engines: {node: '>=16.12.0', npm: '>=6.14.0'} engines: {node: '>=16.12.0', npm: '>=6.14.0'}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
@ -984,7 +984,7 @@ packages:
dependencies: dependencies:
'@astrojs/compiler': 1.4.2 '@astrojs/compiler': 1.4.2
'@astrojs/language-server': 1.0.5 '@astrojs/language-server': 1.0.5
'@astrojs/markdown-remark': 2.2.0(astro@2.4.5) '@astrojs/markdown-remark': 2.2.0(astro@2.4.3)
'@astrojs/telemetry': 2.1.1 '@astrojs/telemetry': 2.1.1
'@astrojs/webapi': 2.1.1 '@astrojs/webapi': 2.1.1
'@babel/core': 7.21.8 '@babel/core': 7.21.8
@ -1120,7 +1120,7 @@ packages:
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true hasBin: true
dependencies: dependencies:
caniuse-lite: 1.0.30001441 caniuse-lite: 1.0.30001488
electron-to-chromium: 1.4.397 electron-to-chromium: 1.4.397
node-releases: 2.0.10 node-releases: 2.0.10
update-browserslist-db: 1.0.11(browserslist@4.21.4) update-browserslist-db: 1.0.11(browserslist@4.21.4)
@ -1169,7 +1169,6 @@ packages:
/caniuse-lite@1.0.30001488: /caniuse-lite@1.0.30001488:
resolution: {integrity: sha512-NORIQuuL4xGpIy6iCCQGN4iFjlBXtfKWIenlUuyZJumLRIindLb7wXM+GO8erEhb7vXfcnf4BAg2PrSDN5TNLQ==} resolution: {integrity: sha512-NORIQuuL4xGpIy6iCCQGN4iFjlBXtfKWIenlUuyZJumLRIindLb7wXM+GO8erEhb7vXfcnf4BAg2PrSDN5TNLQ==}
dev: false
/ccount@2.0.1: /ccount@2.0.1:
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}

View File

@ -9,9 +9,9 @@ const toc = headings.map((heading) => {
return heading; return heading;
}); });
if (content.data.code) { // if (content.data.code) {
import "../styles/vendor/one-dark-pro.css"; // import "../styles/vendor/one-dark-pro.css";
} // }
--- ---
<div class="sidebar region"> <div class="sidebar region">

View File

@ -1,5 +1,5 @@
--- ---
import { l, t, astroI18n } from "astro-i18n"; import { astroI18n } from "astro-i18n";
astroI18n.init(Astro); astroI18n.init(Astro);
import { getCollection } from "astro:content"; import { getCollection } from "astro:content";
@ -21,5 +21,6 @@ const { article } = Astro.props;
--- ---
<BaseLayout pageTitle={article.data.title}> <BaseLayout pageTitle={article.data.title}>
{article.data.lang}
<EditorialContent content={article} /> <EditorialContent content={article} />
</BaseLayout> </BaseLayout>

View File

@ -0,0 +1,9 @@
---
import Page from "../../articles/[...slug].astro"
export { getStaticPaths } from "../../articles/[...slug].astro"
const { props } = Astro
---
<Page {...props} />

View File

@ -1,9 +0,0 @@
---
import Page from "../../articles/[slug].astro"
export { getStaticPaths } from "../../articles/[slug].astro"
const { props } = Astro
---
<Page {...props} />