Skip to content
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

chore: remove experimental from i18n configuration #9264

Merged
merged 4 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update tests
  • Loading branch information
ematipico committed Dec 1, 2023
commit b87e530b8a9c64a13a0cafa3d838e0e66784013c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { defineConfig} from "astro/config";

export default defineConfig({
base: "new-site",
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
Expand All @@ -14,6 +13,5 @@ export default defineConfig({
routing: {
prefixDefaultLocale: true
}
}
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { defineConfig} from "astro/config";

export default defineConfig({
base: "new-site",
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
Expand All @@ -13,5 +12,4 @@ export default defineConfig({
pt: "en"
}
}
}
})
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineConfig} from "astro/config";

export default defineConfig({
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
Expand All @@ -13,7 +12,6 @@ export default defineConfig({
routing: {
prefixDefaultLocale: true
}
}
},
},
base: "/new-site"
})
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { defineConfig} from "astro/config";

export default defineConfig({
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
'en', 'pt', 'it'
],
},

i18n: {
defaultLocale: 'en',
locales: [
'en', 'pt', 'it'
],
},
base: "/new-site"
})
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { defineConfig} from "astro/config";

export default defineConfig({
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
'en', 'pt', 'it'
]
}
},
i18n: {
defaultLocale: 'en',
locales: [
'en', 'pt', 'it'
]
}
})
2 changes: 0 additions & 2 deletions packages/astro/test/fixtures/i18n-routing/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { defineConfig} from "astro/config";

export default defineConfig({
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
Expand All @@ -14,5 +13,4 @@ export default defineConfig({
}
]
}
},
})
218 changes: 98 additions & 120 deletions packages/astro/test/i18n-routing.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,20 @@ describe('[DEV] i18n routing', () => {
before(async () => {
fixture = await loadFixture({
root: './fixtures/i18n-routing-prefix-other-locales/',
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
path: 'spanish',
codes: ['es', 'es-AR'],
},
],
fallback: {
it: 'en',
spanish: 'en',
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
path: 'spanish',
codes: ['es', 'es-AR'],
},
],
fallback: {
it: 'en',
spanish: 'en',
},
},
});
Expand Down Expand Up @@ -336,25 +334,23 @@ describe('[DEV] i18n routing', () => {
before(async () => {
fixture = await loadFixture({
root: './fixtures/i18n-routing-fallback/',
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
path: 'spanish',
codes: ['es', 'es-AR'],
},
],
fallback: {
it: 'en',
spanish: 'en',
},
routing: {
prefixDefaultLocale: false,
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
path: 'spanish',
codes: ['es', 'es-AR'],
},
],
fallback: {
it: 'en',
spanish: 'en',
},
routing: {
prefixDefaultLocale: false,
},
},
});
Expand Down Expand Up @@ -703,22 +699,20 @@ describe('[SSG] i18n routing', () => {
before(async () => {
fixture = await loadFixture({
root: './fixtures/i18n-routing-fallback/',
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
path: 'spanish',
codes: ['es', 'es-AR'],
},
],
fallback: {
it: 'en',
spanish: 'en',
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
path: 'spanish',
codes: ['es', 'es-AR'],
},
],
fallback: {
it: 'en',
spanish: 'en',
},
},
});
Expand Down Expand Up @@ -783,16 +777,14 @@ describe('[SSG] i18n routing', () => {
before(async () => {
fixture = await loadFixture({
root: './fixtures/i18n-routing-prefix-always/',
experimental: {
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
routing: {
prefixDefaultLocale: true,
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
routing: {
prefixDefaultLocale: true,
},
},
});
Expand All @@ -816,13 +808,11 @@ describe('[SSG] i18n routing', () => {
redirects: {
'/': '/en',
},
experimental: {
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
},
});
Expand All @@ -847,16 +837,14 @@ describe('[SSG] i18n routing', () => {
build: {
format: 'directory',
},
experimental: {
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
routing: {
prefixDefaultLocale: false,
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
routing: {
prefixDefaultLocale: false,
},
},
});
Expand Down Expand Up @@ -1106,22 +1094,20 @@ describe('[SSR] i18n routing', () => {
root: './fixtures/i18n-routing-fallback/',
output: 'server',
adapter: testAdapter(),
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
codes: ['es', 'es-AR'],
path: 'spanish',
},
],
fallback: {
it: 'en',
spanish: 'en',
i18n: {
defaultLocale: 'en',
locales: [
'en',
'pt',
'it',
{
codes: ['es', 'es-AR'],
path: 'spanish',
},
],
fallback: {
it: 'en',
spanish: 'en',
},
},
});
Expand Down Expand Up @@ -1169,16 +1155,14 @@ describe('[SSR] i18n routing', () => {
root: './fixtures/i18n-routing-fallback/',
output: 'server',
adapter: testAdapter(),
experimental: {
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
routing: {
prefixDefaultLocale: false,
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'pt', 'it'],
fallback: {
it: 'en',
},
routing: {
prefixDefaultLocale: false,
},
},
});
Expand Down Expand Up @@ -1263,11 +1247,9 @@ describe('[SSR] i18n routing', () => {
root: './fixtures/i18n-routing/',
output: 'server',
adapter: testAdapter(),
experimental: {
i18n: {
defaultLocale: 'en',
locales: ['en_AU', 'pt_BR', 'es_US'],
},
i18n: {
defaultLocale: 'en',
locales: ['en_AU', 'pt_BR', 'es_US'],
},
});
await fixture.build();
Expand All @@ -1294,16 +1276,14 @@ describe('[SSR] i18n routing', () => {
root: './fixtures/i18n-routing/',
output: 'server',
adapter: testAdapter(),
experimental: {
i18n: {
defaultLocale: 'en',
locales: [
{
path: 'english',
codes: ['en', 'en-AU', 'pt-BR', 'es-US'],
},
],
},
i18n: {
defaultLocale: 'en',
locales: [
{
path: 'english',
codes: ['en', 'en-AU', 'pt-BR', 'es-US'],
},
],
},
});
await fixture.build();
Expand Down Expand Up @@ -1401,11 +1381,9 @@ describe('i18n routing does not break assets and endpoints', () => {
before(async () => {
fixture = await loadFixture({
root: './fixtures/core-image-base/',
experimental: {
i18n: {
defaultLocale: 'en',
locales: ['en', 'es'],
},
i18n: {
defaultLocale: 'en',
locales: ['en', 'es'],
},
base: '/blog',
});
Expand Down
Loading