2025-06-02 21:52:41 -04:00
|
|
|
import type { MetadataRoute } from 'next';
|
feat(i18n): Integrate next-intl, localize core UI, add regional locales and zh-TW Discover sources
**Overview**
- Integrates next-intl (App Router, no i18n routing) with cookie-based locale and Accept-Language fallback.
- Adds message bundles and regional variants; sets en-US as the default.
**Key changes**
- i18n foundation
- Adds request-scoped config to load messages per locale and injects NextIntlClientProvider in [layout.tsx]
- Adds/updates messages for: en-US, en-GB, zh-TW, zh-HK, zh-CN, ja, ko, fr-FR, fr-CA, de.
Centralizes LOCALES, LOCALE_LABELS, and DEFAULT_LOCALE in [locales.ts]
- Adds LocaleSwitcher (cookie-based) and [LocaleBootstrap]
- Pages and components
- Localizes Sidebar, Home (including metadata/manifest), Settings, Discover, Library.
- Localizes common components: MessageInput, Attach, Focus, Optimization, MessageBox, MessageSources, SearchImages, SearchVideos, EmptyChat, NewsArticleWidget, WeatherWidget.
- APIs
- Weather API returns localized condition strings server-side.
- UX and quality
- Converts all remaining <img> to Next Image.
- Updates browserslist/caniuse DB to silence warnings.
- Security: Settings API Key inputs are now password fields and placeholders were removed.
2025-08-16 12:27:18 +08:00
|
|
|
import { getTranslations } from 'next-intl/server';
|
2025-06-02 21:52:41 -04:00
|
|
|
|
feat(i18n): Integrate next-intl, localize core UI, add regional locales and zh-TW Discover sources
**Overview**
- Integrates next-intl (App Router, no i18n routing) with cookie-based locale and Accept-Language fallback.
- Adds message bundles and regional variants; sets en-US as the default.
**Key changes**
- i18n foundation
- Adds request-scoped config to load messages per locale and injects NextIntlClientProvider in [layout.tsx]
- Adds/updates messages for: en-US, en-GB, zh-TW, zh-HK, zh-CN, ja, ko, fr-FR, fr-CA, de.
Centralizes LOCALES, LOCALE_LABELS, and DEFAULT_LOCALE in [locales.ts]
- Adds LocaleSwitcher (cookie-based) and [LocaleBootstrap]
- Pages and components
- Localizes Sidebar, Home (including metadata/manifest), Settings, Discover, Library.
- Localizes common components: MessageInput, Attach, Focus, Optimization, MessageBox, MessageSources, SearchImages, SearchVideos, EmptyChat, NewsArticleWidget, WeatherWidget.
- APIs
- Weather API returns localized condition strings server-side.
- UX and quality
- Converts all remaining <img> to Next Image.
- Updates browserslist/caniuse DB to silence warnings.
- Security: Settings API Key inputs are now password fields and placeholders were removed.
2025-08-16 12:27:18 +08:00
|
|
|
export default async function manifest(): Promise<MetadataRoute.Manifest> {
|
|
|
|
|
const t = await getTranslations('manifest');
|
2025-06-02 21:52:41 -04:00
|
|
|
return {
|
feat(i18n): Integrate next-intl, localize core UI, add regional locales and zh-TW Discover sources
**Overview**
- Integrates next-intl (App Router, no i18n routing) with cookie-based locale and Accept-Language fallback.
- Adds message bundles and regional variants; sets en-US as the default.
**Key changes**
- i18n foundation
- Adds request-scoped config to load messages per locale and injects NextIntlClientProvider in [layout.tsx]
- Adds/updates messages for: en-US, en-GB, zh-TW, zh-HK, zh-CN, ja, ko, fr-FR, fr-CA, de.
Centralizes LOCALES, LOCALE_LABELS, and DEFAULT_LOCALE in [locales.ts]
- Adds LocaleSwitcher (cookie-based) and [LocaleBootstrap]
- Pages and components
- Localizes Sidebar, Home (including metadata/manifest), Settings, Discover, Library.
- Localizes common components: MessageInput, Attach, Focus, Optimization, MessageBox, MessageSources, SearchImages, SearchVideos, EmptyChat, NewsArticleWidget, WeatherWidget.
- APIs
- Weather API returns localized condition strings server-side.
- UX and quality
- Converts all remaining <img> to Next Image.
- Updates browserslist/caniuse DB to silence warnings.
- Security: Settings API Key inputs are now password fields and placeholders were removed.
2025-08-16 12:27:18 +08:00
|
|
|
name: t('name'),
|
|
|
|
|
short_name: t('shortName'),
|
|
|
|
|
description: t('description'),
|
2025-06-02 21:52:41 -04:00
|
|
|
start_url: '/',
|
|
|
|
|
display: 'standalone',
|
|
|
|
|
background_color: '#0a0a0a',
|
|
|
|
|
theme_color: '#0a0a0a',
|
2025-07-15 21:45:37 +05:30
|
|
|
screenshots: [
|
|
|
|
|
{
|
|
|
|
|
src: '/screenshots/p1.png',
|
|
|
|
|
form_factor: 'wide',
|
|
|
|
|
sizes: '2560x1600',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: '/screenshots/p2.png',
|
|
|
|
|
form_factor: 'wide',
|
|
|
|
|
sizes: '2560x1600',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: '/screenshots/p1_small.png',
|
|
|
|
|
form_factor: 'narrow',
|
|
|
|
|
sizes: '828x1792',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
src: '/screenshots/p2_small.png',
|
|
|
|
|
form_factor: 'narrow',
|
|
|
|
|
sizes: '828x1792',
|
|
|
|
|
},
|
|
|
|
|
],
|
2025-06-02 21:52:41 -04:00
|
|
|
icons: [
|
|
|
|
|
{
|
2025-07-15 21:45:37 +05:30
|
|
|
src: '/icon-50.png',
|
2025-06-02 21:52:41 -04:00
|
|
|
sizes: '50x50',
|
|
|
|
|
type: 'image/png' as const,
|
|
|
|
|
},
|
|
|
|
|
{
|
2025-07-15 21:45:37 +05:30
|
|
|
src: '/icon-100.png',
|
2025-06-02 21:52:41 -04:00
|
|
|
sizes: '100x100',
|
|
|
|
|
type: 'image/png',
|
|
|
|
|
},
|
2025-07-15 21:45:37 +05:30
|
|
|
{
|
|
|
|
|
src: '/icon.png',
|
|
|
|
|
sizes: '440x440',
|
|
|
|
|
type: 'image/png',
|
|
|
|
|
purpose: 'any',
|
|
|
|
|
},
|
2025-06-02 21:52:41 -04:00
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
}
|