Skip to content

Conversation

@wei840222
Copy link

Resolve issue #738

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]
    • Updated academicSearch, redditSearch, webSearch, wolframAlpha, writingAssistant, and youtubeSearch prompts to improve clarity and consistency in formatting instructions.
  • Added language handling instructions to writingAssistant and other prompts for better localization support.

  • Modified MetaSearchAgent to include locale and language parameters for improved prompt generation and language-specific responses.

  • 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 to Next Image.
    • Updates browserslist/caniuse DB to silence warnings.
    • Security: Settings API Key inputs are now password fields and placeholders were removed.

…es 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.
…dling and formatting instructions

- Updated academicSearch, redditSearch, webSearch, wolframAlpha, writingAssistant, and youtubeSearch prompts to improve clarity and consistency in formatting instructions.
- Added language handling instructions to writingAssistant and other prompts for better localization support.
- Modified MetaSearchAgent to include locale and language parameters for improved prompt generation and language-specific responses.

# Conflicts:
#	Dockerfile
Copy link
Author

@wei840222 wei840222 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self reviewed

@ItzCrazyKns ItzCrazyKns self-requested a review August 17, 2025 15:58
@ItzCrazyKns
Copy link
Owner

LGTM

@ItzCrazyKns
Copy link
Owner

I'll test the changes in the prompt with different locales and merge it afterwards

@wei840222
Copy link
Author

@ItzCrazyKns Thank you!

@wei840222
Copy link
Author

resolve conflict

@ItzCrazyKns
Copy link
Owner

Hey, extremely sorry!! I was aggressively working on this new update. Let us get this resolved, we'll merge it.

@wei840222
Copy link
Author

sure, I can help resolved the conflict.
If any feedback you can tell me.

# Conflicts:
#	src/app/api/chat/route.ts
#	src/app/api/search/route.ts
#	src/app/api/suggestions/route.ts
#	src/app/discover/page.tsx
#	src/app/layout.tsx
#	src/app/page.tsx
#	src/app/settings/page.tsx
#	src/components/EmptyChat.tsx
#	src/components/EmptyChatMessageInput.tsx
#	src/components/MessageActions/Copy.tsx
#	src/components/MessageBox.tsx
#	src/components/MessageInputActions/Attach.tsx
#	src/components/MessageInputActions/Focus.tsx
#	src/components/MessageInputActions/Optimization.tsx
#	src/components/Navbar.tsx
#	src/components/NewsArticleWidget.tsx
#	src/components/Sidebar.tsx
#	src/components/WeatherWidget.tsx
#	src/lib/actions.ts
#	src/lib/hooks/useChat.tsx
#	src/lib/prompts/academicSearch.ts
#	src/lib/prompts/redditSearch.ts
#	src/lib/prompts/wolframAlpha.ts
#	src/lib/prompts/youtubeSearch.ts
#	yarn.lock
- Added LocaleSwitcher component to General settings section for language selection.
- Integrated translations for various settings fields and dialogs, improving localization support.
- Updated UIConfigField definitions to simplify options handling.
- Refactored provider dialogs to utilize translations for user feedback messages.
- Improved measurement unit handling in WeatherWidget component.
- Cleaned up unused properties in provider configuration fields across multiple providers.
- Ensured consistent naming and descriptions in the settings UI for better user experience.
- Updated settings structure in en-GB, en-US, fr-CA, fr-FR, ja, ko, zh-CN, and zh-HK JSON files.
- Consolidated preferences, automatic search, and system instructions into a more organized format.
- Added new sections for general settings, model management, and search settings.
- Enhanced descriptions and placeholders for better user guidance.
- Improved consistency across different language files.
@wei840222
Copy link
Author

@ItzCrazyKns Hi, I resolved the conflict, plz review. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants