[PR #17819] [MERGED] fix: i81n.t and correct button layout issue #24560

Closed
opened 2026-04-20 05:27:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/17819
Author: @silentoplayz
Created: 9/27/2025
Status: Merged
Merged: 9/27/2025
Merged by: @tjbck

Base: devHead: fix-layout-and-i18n


📝 Commits (1)

  • 27cd87e fix: i81n.t and correct button layout issue

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 src/lib/components/playground/Chat.svelte (+1 -1)
📝 src/routes/(app)/workspace/models/create/+page.svelte (+1 -1)

📄 Description

Pull Request Checklist

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation Open WebUI Docs, or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

  • i18n Regression: A latent bug in src/routes/(app)/workspace/models/create/+page.svelte was causing an i18n.t is not a function error. This was due to an incorrect call to the i18n Svelte store. The fix corrects the call to use the proper auto-subscription syntax ($i18n.t()).

  • Vertical Button Text: In src/lib/components/playground/Chat.svelte, the "Assistant"/"User" role button's text was displaying vertically. This was caused by a flex-1 class on its container, which has been removed.

Changed

  • Updated src/routes/(app)/workspace/models/create/+page.svelte to use the correct Svelte store auto-subscription syntax for the i18n object.

Removed

  • Removed the flex-1 utility class from a container div in src/lib/components/playground/Chat.svelte.

Fixed

  • Corrected a latent bug that caused an i18n.t is not a function error on the model creation page by fixing the Svelte store subscription.
  • Fixed a layout issue causing the "Assistant/User" button text to render vertically in the Playground chat interface.

Before the fix is applied:

image image

After the fix has been applied:

image image

Pro Tip

In VS Code's search panel (with regex mode on), use this pattern:

(?<!\$)i18n\.t\(

Explanation

  • (?<!\$) – negative look-behind: the preceding character must not be a literal $.
  • i18n\.t\( – matches the literal text i18n.t(.

This will find every i18n.t( that is not already prefixed with $. Thankfully, having done so myself only resulted in 1 match from the src/lib/components/playground/Chat.svelte file, which I solve promptly with this PR.

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.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/17819 **Author:** [@silentoplayz](https://github.com/silentoplayz) **Created:** 9/27/2025 **Status:** ✅ Merged **Merged:** 9/27/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `fix-layout-and-i18n` --- ### 📝 Commits (1) - [`27cd87e`](https://github.com/open-webui/open-webui/commit/27cd87e9ada6e5d85d5a142ee08b4c30367357cd) fix: i81n.t and correct button layout issue ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/playground/Chat.svelte` (+1 -1) 📝 `src/routes/(app)/workspace/models/create/+page.svelte` (+1 -1) </details> ### 📄 Description # Pull Request Checklist - [X] **Target branch:** Please verify that the pull request targets the `dev` branch. - [X] **Description:** Provide a concise description of the changes made in this pull request. - [X] **Changelog:** Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description. - [X] **Documentation:** Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources? - [X] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [X] **Testing:** Have you written and run sufficient tests to validate the changes? - [X] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [X] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **BREAKING CHANGE**: Significant changes that may affect compatibility - **build**: Changes that affect the build system or external dependencies - **ci**: Changes to our continuous integration processes or workflows - **chore**: Refactor, cleanup, or other non-functional code changes - **docs**: Documentation update or addition - **feat**: Introduces a new feature or enhancement to the codebase - **fix**: Bug fix or error correction - **i18n**: Internationalization or localization changes - **perf**: Performance improvement - **refactor**: Code restructuring for better maintainability, readability, or scalability - **style**: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.) - **test**: Adding missing tests or correcting existing tests - **WIP**: Work in progress, a temporary label for incomplete or ongoing work # Changelog Entry ### Description - **i18n Regression:** A latent bug in `src/routes/(app)/workspace/models/create/+page.svelte` was causing an `i18n.t is not a function` error. This was due to an incorrect call to the `i18n` Svelte store. The fix corrects the call to use the proper auto-subscription syntax (`$i18n.t()`). - **Vertical Button Text:** In `src/lib/components/playground/Chat.svelte`, the "Assistant"/"User" role button's text was displaying vertically. This was caused by a `flex-1` class on its container, which has been removed. ### Changed - Updated `src/routes/(app)/workspace/models/create/+page.svelte` to use the correct Svelte store auto-subscription syntax for the `i18n` object. ### Removed - Removed the `flex-1` utility class from a container `div` in `src/lib/components/playground/Chat.svelte`. ### Fixed - Corrected a latent bug that caused an `i18n.t is not a function` error on the model creation page by fixing the Svelte store subscription. - Fixed a layout issue causing the "Assistant/User" button text to render vertically in the Playground chat interface. ### Before the fix is applied: <img width="2299" height="300" alt="image" src="https://github.com/user-attachments/assets/6dd9e441-6ea3-4b28-951a-c388551967ea" /> <img width="2296" height="216" alt="image" src="https://github.com/user-attachments/assets/dfed70f4-cc8e-424c-8f6e-2b0eb00ee38a" /> ### After the fix has been applied: <img width="2297" height="160" alt="image" src="https://github.com/user-attachments/assets/9add2376-53a5-4483-af38-94928def7a5a" /> <img width="2297" height="160" alt="image" src="https://github.com/user-attachments/assets/de0f89ed-d85f-4196-9bd1-5fc91c59f608" /> ### Pro Tip In VS Code's search panel (with regex mode **on**), use this pattern: ``` (?<!\$)i18n\.t\( ``` Explanation - `(?<!\$)` – negative look-behind: the preceding character must **not** be a literal `$`. - `i18n\.t\(` – matches the literal text `i18n.t(`. This will find every `i18n.t(` that is **not** already prefixed with `$`. Thankfully, having done so myself only resulted in 1 match from the `src/lib/components/playground/Chat.svelte` file, which I solve promptly with this PR. ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 05:27:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#24560