mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #16633] feat: Implement banner internationalization #47240
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/16633
Author: @Rain6435
Created: 8/14/2025
Status: 🔄 Open
Base:
dev← Head:feat/banner-internationalization📝 Commits (5)
9ce29c6feat: Implement banner internationalizatione21f9f7feat: Add translation for "Search all emojis" to fix conflict857cf18Merge branch 'dev' into feat/banner-internationalization16c472efeat: Enhance banner translation handling and update content retrieval logic1176e6cfix formatting📊 Changes
5 files changed (+444 additions, -38 deletions)
View changed files
📝
backend/open_webui/config.py(+1 -0)📝
src/lib/components/admin/Settings/Interface/Banners.svelte(+423 -37)📝
src/lib/components/common/Banner.svelte(+13 -1)📝
src/lib/i18n/locales/en-US/translation.json(+6 -0)📝
src/lib/types/index.ts(+1 -0)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This PR introduces internationalization (i18n) support for system-wide banners, enabling administrators to create and manage banner content in multiple languages. This ensures that users see announcements and important information in their preferred language, enhancing the user experience for a global audience.
Added
BannerModelon the backend and theBannertype on the frontend now support an optionaltranslationsfield, which stores a mapping of language codes to translated content.Banner.sveltecomponent now intelligently displays the appropriate translation based on the user's current language setting, falling back to the default content if a specific translation is not available.Changed
Banner.sveltecomponent has been updated to prioritize and render translated content when available.API Endpoints
No new API endpoints have been added. The existing endpoints for banner management have been updated to handle the new
translationsfield in the request and response payloads.Example Banner Object with Translations:
Screen-recording
https://github.com/user-attachments/assets/6cb3dc61-2179-4bad-bc0e-778f7c55cf5a
Test Plan
translationsobject.translationsfield is properly stored in and retrieved from the database.translationsfield at all.Benefits
For Users:
For Administrators:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to
the Contributor License Agreement (CLA), and
I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.