[PR #1337] [MERGED] feat: add language switcher #1567

Closed
opened 2026-02-26 19:33:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1337
Author: @dguyen
Created: 9/10/2024
Status: Merged
Merged: 9/11/2024
Merged by: @dguyen

Base: mainHead: feat/web-lang-switcher


📝 Commits (2)

  • a071627 feat: add language switcher
  • 93e333a chore: extract translations

📊 Changes

18 files changed (+240 additions, -195 deletions)

View changed files

📝 apps/marketing/src/components/(marketing)/footer.tsx (+19 -8)
apps/marketing/src/components/(marketing)/i18n-switcher.tsx (+0 -71)
apps/marketing/src/middleware.ts (+0 -39)
📝 apps/web/src/components/(dashboard)/common/command-menu.tsx (+54 -1)
📝 apps/web/src/components/(dashboard)/layout/menu-switcher.tsx (+14 -0)
📝 apps/web/src/middleware.ts (+1 -7)
📝 packages/lib/constants/app.ts (+1 -1)
📝 packages/lib/server-only/i18n/switch-i18n-language.ts (+1 -1)
📝 packages/lib/translations/de/common.po (+4 -0)
📝 packages/lib/translations/de/marketing.po (+2 -2)
📝 packages/lib/translations/de/web.js (+1 -1)
📝 packages/lib/translations/de/web.po (+39 -30)
📝 packages/lib/translations/en/common.po (+4 -0)
📝 packages/lib/translations/en/marketing.po (+2 -2)
📝 packages/lib/translations/en/web.js (+1 -1)
📝 packages/lib/translations/en/web.po (+39 -30)
📝 packages/lib/utils/i18n.ts (+1 -1)
packages/ui/components/common/language-switcher-dialog.tsx (+57 -0)

📄 Description

Description

Web changes:

  • Enabled i18n for web
  • Add option to change language in command menu
  • Add option to change language in menu-switcher

Web and marketing changes:

  • Stop setting 'en' preference into cookie if the user's language is not supported
  • Dropped middleware changes
  • Rotated cookie from 'i18n' to 'language'

Summary by CodeRabbit

  • New Features

    • Introduced a language switcher in the footer for improved language selection.
    • Added dynamic language change functionality in the command menu.
    • Implemented a dropdown menu item for quick access to the language switcher.
  • Bug Fixes

    • Resolved issues related to language change notifications and state management.
  • Translations

    • Added new translation entries for improved language support, including "Search languages..." in English and German.
    • Updated existing translations to enhance clarity and accuracy.
  • Chores

    • Simplified internationalization handling in middleware.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/documenso/documenso/pull/1337 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 9/10/2024 **Status:** ✅ Merged **Merged:** 9/11/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `feat/web-lang-switcher` --- ### 📝 Commits (2) - [`a071627`](https://github.com/documenso/documenso/commit/a0716272785567e7ae375b62570b374cdafc98ee) feat: add language switcher - [`93e333a`](https://github.com/documenso/documenso/commit/93e333a269fefb77ad24b139f8f709503f7b8c82) chore: extract translations ### 📊 Changes **18 files changed** (+240 additions, -195 deletions) <details> <summary>View changed files</summary> 📝 `apps/marketing/src/components/(marketing)/footer.tsx` (+19 -8) ➖ `apps/marketing/src/components/(marketing)/i18n-switcher.tsx` (+0 -71) ➖ `apps/marketing/src/middleware.ts` (+0 -39) 📝 `apps/web/src/components/(dashboard)/common/command-menu.tsx` (+54 -1) 📝 `apps/web/src/components/(dashboard)/layout/menu-switcher.tsx` (+14 -0) 📝 `apps/web/src/middleware.ts` (+1 -7) 📝 `packages/lib/constants/app.ts` (+1 -1) 📝 `packages/lib/server-only/i18n/switch-i18n-language.ts` (+1 -1) 📝 `packages/lib/translations/de/common.po` (+4 -0) 📝 `packages/lib/translations/de/marketing.po` (+2 -2) 📝 `packages/lib/translations/de/web.js` (+1 -1) 📝 `packages/lib/translations/de/web.po` (+39 -30) 📝 `packages/lib/translations/en/common.po` (+4 -0) 📝 `packages/lib/translations/en/marketing.po` (+2 -2) 📝 `packages/lib/translations/en/web.js` (+1 -1) 📝 `packages/lib/translations/en/web.po` (+39 -30) 📝 `packages/lib/utils/i18n.ts` (+1 -1) ➕ `packages/ui/components/common/language-switcher-dialog.tsx` (+57 -0) </details> ### 📄 Description ## Description Web changes: - Enabled i18n for web - Add option to change language in command menu - Add option to change language in menu-switcher Web and marketing changes: - Stop setting 'en' preference into cookie if the user's language is not supported - Dropped middleware changes - Rotated cookie from 'i18n' to 'language' <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a language switcher in the footer for improved language selection. - Added dynamic language change functionality in the command menu. - Implemented a dropdown menu item for quick access to the language switcher. - **Bug Fixes** - Resolved issues related to language change notifications and state management. - **Translations** - Added new translation entries for improved language support, including "Search languages..." in English and German. - Updated existing translations to enhance clarity and accuracy. - **Chores** - Simplified internationalization handling in middleware. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 19:33:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#1567
No description provided.