[PR #8681] chore: Optimize I18nObject class for better performance and readability #26128

Closed
opened 2026-02-21 20:36:25 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/8681

State: closed
Merged: Yes


Checklist:

Important

Please review the checklist below before submitting your pull request.

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

  • Reorder fields to put required 'en_US' first
  • Use Pydantic's Field for optional fields with default values
  • Remove unnecessary if statements in init
  • Update type hints for clarity

Type of Change

  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
**Original Pull Request:** https://github.com/langgenius/dify/pull/8681 **State:** closed **Merged:** Yes --- # Checklist: > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods # Description - Reorder fields to put required 'en_US' first - Use Pydantic's Field for optional fields with default values - Remove unnecessary if statements in __init__ - Update type hints for clarity ## Type of Change - [ ] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
yindo added the pull-request label 2026-02-21 20:36:25 -05:00
yindo closed this issue 2026-02-21 20:36:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#26128