[PR #1353] [MERGED] fix: add check for invalid locales #1577

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

📋 Pull Request Information

Original PR: https://github.com/documenso/documenso/pull/1353
Author: @dguyen
Created: 9/18/2024
Status: Merged
Merged: 9/18/2024
Merged by: @dguyen

Base: mainHead: fix/invalid-locales


📝 Commits (1)

  • c0eab5c fix: add check for invalid locales

📊 Changes

1 file changed (+11 additions, -1 deletions)

View changed files

📝 packages/lib/utils/i18n.ts (+11 -1)

📄 Description

Description

Currently invalid or missing accept-language headers will cause issues rendering Plural components since we do not validate them.

This adds a check to try filter out invalid locales.

Testing Performed

TBD

Summary by CodeRabbit

  • New Features

    • Enhanced locale filtering process to ensure only valid locales are processed.
  • Bug Fixes

    • Improved data integrity by preventing invalid locales from affecting application functionality.

🔄 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/1353 **Author:** [@dguyen](https://github.com/dguyen) **Created:** 9/18/2024 **Status:** ✅ Merged **Merged:** 9/18/2024 **Merged by:** [@dguyen](https://github.com/dguyen) **Base:** `main` ← **Head:** `fix/invalid-locales` --- ### 📝 Commits (1) - [`c0eab5c`](https://github.com/documenso/documenso/commit/c0eab5ce5d9a65c10c1e5279196e9a288d942d0a) fix: add check for invalid locales ### 📊 Changes **1 file changed** (+11 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/lib/utils/i18n.ts` (+11 -1) </details> ### 📄 Description ## Description Currently invalid or missing `accept-language` headers will cause issues rendering Plural components since we do not validate them. This adds a check to try filter out invalid locales. ## Testing Performed TBD <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Enhanced locale filtering process to ensure only valid locales are processed. - **Bug Fixes** - Improved data integrity by preventing invalid locales from affecting application functionality. <!-- 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:51 +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#1577
No description provided.