[PR #17133] fix: move hardcoded text to language settings (#16990) #28640

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

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

State: closed
Merged: Yes


  • Move hardcoded text from components and API to language configuration files
  • Improve internationalization support for plugins, image inputs and dataset messages

Summary

This PR addresses issue #16990 by moving hardcoded text from components and API code to language configuration files. The changes focus on three main areas:

  1. Replaced hardcoded text in API code (such as default conversation names and dataset descriptions) with I18nObject instances that support multilingual content.
  2. Moved hardcoded UI text from frontend components (like ImageInput prompts) to i18n configuration files.
  3. Improved internationalization support for plugins, image inputs, and dataset-related messages.

These changes enhance the system's internationalization capabilities, making textual content more maintainable and extensible across different languages.

Fixes #16990

Screenshots

Before After
Hardcoded dataset description text "useful for when you want to answer queries about..." Using I18nObject with multilingual dataset descriptions
Hardcoded image upload component prompt text image Using i18n configured multilingual prompt text image
Static page title "Plugins - Dify" image Dynamic i18n title using ${t('plugin.metadata.title')} - Dify image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/17133 **State:** closed **Merged:** Yes --- - Move hardcoded text from components and API to language configuration files - Improve internationalization support for plugins, image inputs and dataset messages # Summary This PR addresses issue #16990 by moving hardcoded text from components and API code to language configuration files. The changes focus on three main areas: 1. Replaced hardcoded text in API code (such as default conversation names and dataset descriptions) with I18nObject instances that support multilingual content. 2. Moved hardcoded UI text from frontend components (like ImageInput prompts) to i18n configuration files. 3. Improved internationalization support for plugins, image inputs, and dataset-related messages. These changes enhance the system's internationalization capabilities, making textual content more maintainable and extensible across different languages. Fixes #16990 # Screenshots | Before | After | |--------|-------| | Hardcoded dataset description text "useful for when you want to answer queries about..." | Using I18nObject with multilingual dataset descriptions | | Hardcoded image upload component prompt text ![image](https://github.com/user-attachments/assets/921300d9-c2ba-4bee-b91c-928bee4bf7f9) | Using i18n configured multilingual prompt text ![image](https://github.com/user-attachments/assets/e8fca54d-a256-41f5-8975-3af4f3cfee26) | | Static page title "Plugins - Dify" ![image](https://github.com/user-attachments/assets/d49a74e0-48d4-4ba9-be12-1d3b70cecd13) | Dynamic i18n title using `${t('plugin.metadata.title')} - Dify` ![image](https://github.com/user-attachments/assets/4f98dbf2-725c-4001-a299-4e846a2cf4a8) | # Checklist > [!IMPORTANT] > Please review the checklist below before submitting your pull request. - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:43:50 -05:00
yindo closed this issue 2026-02-21 20:43:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#28640