[PR #1207] [CLOSED] feat: sub-path based i18n #1475

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1207
Author: @younes101020
Created: 6/29/2024
Status: Closed

Base: mainHead: feat/i18n-885-setup-internationalization


📝 Commits (7)

  • 16e003d feat: sub-path based i18n
  • fb9e2de Update apps/marketing/get-dictionary.ts
  • 5358010 feat: translation advancement
  • 0dd5d20 feat: translation advancement
  • dcc4f8c feat: translation advancement
  • 92c91c9 chore: centralize i18n packages
  • ff95af2 feat: translation avancement

📊 Changes

134 files changed (+4329 additions, -536 deletions)

View changed files

📝 .npmrc (+1 -1)
📝 apps/marketing/content/blog/en/announcing-direct-links.mdx (+0 -0)
📝 apps/marketing/content/blog/en/announcing-open-source-docusign-alternative.mdx (+0 -0)
📝 apps/marketing/content/blog/en/building-documenso-pt1.mdx (+0 -0)
📝 apps/marketing/content/blog/en/building-documenso-pt2.mdx (+0 -0)
📝 apps/marketing/content/blog/en/commodifying-signing.mdx (+0 -0)
📝 apps/marketing/content/blog/en/deploy-with-vercel-supabase-resend.mdx (+0 -0)
📝 apps/marketing/content/blog/en/design-system.mdx (+0 -0)
📝 apps/marketing/content/blog/en/early-adopters.mdx (+0 -0)
📝 apps/marketing/content/blog/en/email-provider-incident-2024-01-10.mdx (+0 -0)
📝 apps/marketing/content/blog/en/how-documenso-enhances-contract-management-for-freelancers-helping-them-close-more-clients-efficiently.mdx (+0 -0)
📝 apps/marketing/content/blog/en/how-documenso-help-freelancers-close-more-clients-efficiently.mdx (+0 -0)
📝 apps/marketing/content/blog/en/launch-week-2-day-1.mdx (+0 -0)
📝 apps/marketing/content/blog/en/launch-week-2-day-2.mdx (+0 -0)
📝 apps/marketing/content/blog/en/launch-week-2-day-3.mdx (+0 -0)
📝 apps/marketing/content/blog/en/launch-week-2-day-4.mdx (+0 -0)
📝 apps/marketing/content/blog/en/launch-week-2-day-5.mdx (+0 -0)
📝 apps/marketing/content/blog/en/linear-gh.mdx (+0 -0)
📝 apps/marketing/content/blog/en/live-roadmap-singleplayer.mdx (+0 -0)
📝 apps/marketing/content/blog/en/malfunction-mania.mdx (+0 -0)

...and 80 more files

📄 Description

Description

  • append lang sub-path when not specified to URL
  • read sub-path from server component for allowing server-side translations
  • add new useDictionary hook and DictionaryProvider provider for allowing client-side translations
  • complete "en" + "fr" translation
  • add 2 or 3 new language translation

Changes Made

Regarding dates and time I replaced the use of methods from the luxon library with those from the native Intl API

Manual testing

  • Test if lang sub-path is correctly appending when no specified
  • Test to manually update lang sub-path
  • Test that the translation fits the sub-path lang
  • Tested on Chrome.

Checklist

  • [ x] I have tested these changes locally and they work as expected.
  • [ x] I have added/updated tests that prove the effectiveness of these changes.
  • I have updated the documentation to reflect these changes, if applicable.
  • [ x] I have followed the project's coding style guidelines.
  • I have addressed the code review feedback from the previous submission, if applicable.

Additional Notes

this is my first open source participation so please don't hesitate if you have advice for me

Summary by CodeRabbit

  • New Features

    • Added internationalization support for English and French locales.
    • Introduced dynamic content rendering based on locale for various marketing pages and components.
    • Added a React context provider for managing dictionaries.
  • Bug Fixes

    • Replaced hardcoded text with dynamic content fetched from dictionaries to support multiple languages.
  • Documentation

    • Introduced new blog posts to explain features and improvements in Documenso.
  • Chores

    • Updated dependencies to support internationalization features.
  • Refactor

    • Modified several components to accept dictionary props for dynamic content rendering.
    • Introduced middleware for handling locale negotiation in a Next.js application.

🔄 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/1207 **Author:** [@younes101020](https://github.com/younes101020) **Created:** 6/29/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/i18n-885-setup-internationalization` --- ### 📝 Commits (7) - [`16e003d`](https://github.com/documenso/documenso/commit/16e003d4291f780b316109aef31c2dbc5cdf1faa) feat: sub-path based i18n - [`fb9e2de`](https://github.com/documenso/documenso/commit/fb9e2ded589ac7c5ca5a2c77e923bcbb6b345001) Update apps/marketing/get-dictionary.ts - [`5358010`](https://github.com/documenso/documenso/commit/535801076be93eb2212170604b548bd1b73044d9) feat: translation advancement - [`0dd5d20`](https://github.com/documenso/documenso/commit/0dd5d2072210f0aa028f64948573e5b7452abcf7) feat: translation advancement - [`dcc4f8c`](https://github.com/documenso/documenso/commit/dcc4f8cc97a8135213f88583f3350c3d28ae2beb) feat: translation advancement - [`92c91c9`](https://github.com/documenso/documenso/commit/92c91c9435a50caa3725da4c5b4efce0df2265ef) chore: centralize i18n packages - [`ff95af2`](https://github.com/documenso/documenso/commit/ff95af2b952777d0f034d4da53eaa34d2581e061) feat: translation avancement ### 📊 Changes **134 files changed** (+4329 additions, -536 deletions) <details> <summary>View changed files</summary> 📝 `.npmrc` (+1 -1) 📝 `apps/marketing/content/blog/en/announcing-direct-links.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/announcing-open-source-docusign-alternative.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/building-documenso-pt1.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/building-documenso-pt2.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/commodifying-signing.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/deploy-with-vercel-supabase-resend.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/design-system.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/early-adopters.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/email-provider-incident-2024-01-10.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/how-documenso-enhances-contract-management-for-freelancers-helping-them-close-more-clients-efficiently.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/how-documenso-help-freelancers-close-more-clients-efficiently.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/launch-week-2-day-1.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/launch-week-2-day-2.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/launch-week-2-day-3.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/launch-week-2-day-4.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/launch-week-2-day-5.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/linear-gh.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/live-roadmap-singleplayer.mdx` (+0 -0) 📝 `apps/marketing/content/blog/en/malfunction-mania.mdx` (+0 -0) _...and 80 more files_ </details> ### 📄 Description ## Description <!--- Describe the changes introduced by this pull request. --> <!--- Explain what problem it solves or what feature/fix it adds. --> - [x] append lang sub-path when not specified to URL - [x] read sub-path from server component for allowing server-side translations - [x] add new `useDictionary` hook and `DictionaryProvider` provider for allowing client-side translations - [x] complete "en" + "fr" translation - [ ] add 2 or 3 new language translation ## Related Issue <!--- If this pull request is related to a specific issue, reference it here using #issue_number. --> <!--- For example, "Fixes #123" or "Addresses #456". --> ## Changes Made <!--- Provide a summary of the changes made in this pull request. --> <!--- Include any relevant technical details or architecture changes. --> Regarding dates and time I replaced the use of methods from the luxon library with those from the native Intl API ## Manual testing <!--- Describe the testing that you have performed to validate these changes. --> <!--- Include information about test cases, testing environments, and results. --> - Test if lang sub-path is correctly appending when no specified - Test to manually update lang sub-path - Test that the translation fits the sub-path lang - Tested on Chrome. ## Checklist <!--- Please check the boxes that apply to this pull request. --> <!--- You can add or remove items as needed. --> - [ x] I have tested these changes locally and they work as expected. - [ x] I have added/updated tests that prove the effectiveness of these changes. - [ ] I have updated the documentation to reflect these changes, if applicable. - [ x] I have followed the project's coding style guidelines. - [ ] I have addressed the code review feedback from the previous submission, if applicable. ## Additional Notes <!--- Provide any additional context or notes for the reviewers. --> <!--- This might include details about design decisions, potential concerns, or anything else relevant. --> this is my first open source participation so please don't hesitate if you have advice for me <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added internationalization support for English and French locales. - Introduced dynamic content rendering based on locale for various marketing pages and components. - Added a React context provider for managing dictionaries. - **Bug Fixes** - Replaced hardcoded text with dynamic content fetched from dictionaries to support multiple languages. - **Documentation** - Introduced new blog posts to explain features and improvements in Documenso. - **Chores** - Updated dependencies to support internationalization features. - **Refactor** - Modified several components to accept dictionary props for dynamic content rendering. - Introduced middleware for handling locale negotiation in a Next.js application. <!-- 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:25 +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#1475
No description provided.