forked from labring/sealos
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
2,701 additions
and
365 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
2 changes: 1 addition & 1 deletion
2
frontend/providers/devbox/app/[lang]/(platform)/(empty)/components/Empty.tsx
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
2 changes: 1 addition & 1 deletion
2
frontend/providers/devbox/app/[lang]/(platform)/devbox/create/components/Header.tsx
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
3 changes: 2 additions & 1 deletion
3
frontend/providers/devbox/app/[lang]/(platform)/devbox/create/components/Yaml.tsx
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
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
8 changes: 3 additions & 5 deletions
8
frontend/providers/devbox/i18n.ts → frontend/providers/devbox/i18n/request.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 |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import { routing } from './routing' | ||
import { notFound } from 'next/navigation' | ||
import { getRequestConfig } from 'next-intl/server' | ||
|
||
// Can be imported from a shared config | ||
const locales = ['en', 'zh'] | ||
|
||
export default getRequestConfig(async ({ locale }) => { | ||
// Validate that the incoming `locale` parameter is valid | ||
if (!locales.includes(locale as any)) notFound() | ||
if (!routing.locales.includes(locale as any)) notFound() | ||
|
||
return { | ||
messages: (await import(`./message/${locale}.json`)).default | ||
messages: (await import(`../message/${locale}.json`)).default | ||
} | ||
}) |
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,14 @@ | ||
import { defineRouting } from 'next-intl/routing' | ||
import { createSharedPathnamesNavigation } from 'next-intl/navigation' | ||
|
||
export const routing = defineRouting({ | ||
// A list of all locales that are supported | ||
locales: ['en', 'zh'], | ||
|
||
// Used when no locale matches | ||
defaultLocale: 'en' | ||
}) | ||
|
||
// Lightweight wrappers around Next.js' navigation APIs | ||
// that will consider the routing configuration | ||
export const { Link, redirect, usePathname, useRouter } = createSharedPathnamesNavigation(routing) |
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