Skip to content

Conversation

@siddhesh1051
Copy link

@siddhesh1051 siddhesh1051 commented Oct 29, 2025

Overview

Aligned all demo apps to a single, consistent locale set used by next-app: ar, de, en, es, fr, ja, ko, ru, zh. This ensures consistent DX and parity across demos. No manual dictionary edits are needed; dictionaries/meta are generated by the compiler during dev/build.

Approach

  • Adopt next-app as the source of truth for supported locales.
  • Update compiler configs to generate the same locales in each demo.
  • Update UI LocaleSwitcher components to expose the same locale list.
  • Committed auto generated dictionary.js

Changes

  • AdonisJS
    • demo/adonisjs/vite.config.ts
      • targetLocales → ['es', 'ja', 'fr', 'ru', 'de', 'zh', 'ar', 'ko'] with sourceLocale: 'en'
    • demo/adonisjs/inertia/pages/home.tsx
      • LocaleSwitcher locales → ['en','ar','de','es','fr','ja','ko','ru','zh']
  • React Router
    • demo/react-router-app/vite.config.ts
      • targetLocales → ["ar","de","es","fr","ja","ko","ru","zh"]
    • demo/react-router-app/app/root.tsx
      • LocaleSwitcher locales → ["en","ar","de","es","fr","ja","ko","ru","zh"]
  • Next.js
    • Already set to the canonical list; no changes.

Notes

  • Dictionaries (lingo/dictionary.js) and metadata (lingo/meta.json) are auto-generated by the compiler during dev/build based on targetLocales.

Attached the final video covering those 3 demo apps

Screen.Recording.2025-10-30.at.1.16.14.AM.mov

fixes #1324

@siddhesh1051 siddhesh1051 changed the title Standardize locales across demo apps to match next-app fix/standardize locales across demo apps to match next-app Oct 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sumitsaurabh927
Copy link
Contributor

Hey @siddhesh1051 sharp catch!

You also need to add a changeset to your PR as per our contributor's guide.

Please make the necessary changes.

Copilot finished reviewing on behalf of sumitsaurabh927 December 5, 2025 08:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +112 to 159
'3/declaration/body/0/argument/1-title': {
content: {
ar: 'الصفحة الرئيسية',
de: 'Startseite',
fr: "Page d'accueil",
ja: 'ホームページ',
ko: '홈페이지',
ru: 'Главная страница',
zh: '主页',
},
hash: '7c2d68be7446e6de191c11d53f1e07b4',
},
'3/declaration/body/0/argument/3/1/1': {
content: {
ar: 'مرحباً بالعالم!',
de: 'Hallo Welt!',
fr: 'Bonjour le monde !',
ja: 'こんにちは、世界!',
ko: '안녕하세요, 월드!',
ru: 'Привет, мир!',
zh: '你好,世界!',
},
hash: '0468579ef2fbc83c9d520c2f2f1c5059',
},
'3/declaration/body/0/argument/3/1/3': {
content: {
ar: 'هذا تطبيق تجريبي يوضح كيف يمكن استخدام <element:strong>Lingo.dev Compiler</element:strong> لترجمة التطبيقات المبنية باستخدام <element:a>AdonisJS</element:a>.',
de: 'Dies ist eine Beispiel-App, die demonstriert, wie der <element:strong>Lingo.dev Compiler</element:strong> verwendet werden kann, um mit <element:a>AdonisJS</element:a> erstellte Apps zu lokalisieren.',
fr: "Ceci est une application d'exemple qui montre comment <element:strong>Lingo.dev Compiler</element:strong> peut être utilisé pour localiser des applications construites avec <element:a>AdonisJS</element:a> .",
ja: 'これは、<element:strong>Lingo.dev Compiler</element:strong> を使用して <element:a>AdonisJS</element:a> で構築されたアプリをローカライズする方法を示すサンプルアプリです。',
ko: '이것은 <element:strong>Lingo.dev Compiler</element:strong>를 사용하여 <element:a>AdonisJS</element:a>로 빌드된 앱을 지역화하는 방법을 보여주는 예제 앱입니다.',
ru: 'Это пример приложения, демонстрирующий, как <element:strong>Lingo.dev Compiler</element:strong> можно использовать для локализации приложений, созданных с помощью <element:a>AdonisJS</element:a> .',
zh: '这是一个示例应用程序,演示了如何使用 <element:strong>Lingo.dev Compiler</element:strong> 来本地化使用 <element:a>AdonisJS</element:a> 构建的应用程序。',
},
hash: '82b29979a52b215b94b2e811e8c03005',
},
'3/declaration/body/0/argument/3/1/5': {
content: {
ar: 'للتبديل بين اللغات، استخدم القائمة المنسدلة التالية:',
de: 'Um zwischen den Gebietsschemas zu wechseln, verwenden Sie das folgende Dropdown-Menü:',
fr: 'Pour basculer entre les langues, utilisez le menu déroulant suivant :',
ja: 'ロケールを切り替えるには、次のドロップダウンを使用します。',
ko: '로케일 간에 전환하려면 다음 드롭다운을 사용하세요:',
ru: 'Чтобы переключиться между языками, используйте следующее выпадающее меню:',
zh: '要切换语言环境,请使用以下下拉菜单:',
},
hash: '9ffb5f98cf11c88f3903e060f4028b46',
},
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

All entries in the '3/declaration/...' section are missing translations for en and es locales. Each entry only contains 7 locales (ar, de, fr, ja, ko, ru, zh) instead of the expected 9 (ar, de, en, es, fr, ja, ko, ru, zh).

For comparison, the equivalent entries in the '2/declaration/...' section (lines 56-110) have all 9 locales correctly populated. This appears to be an issue with the auto-generated dictionary that should be investigated and resolved by regenerating the dictionary file.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align demo apps to a consistent set of locales

2 participants