[PR #4466] [MERGED] Preserve translated message line breaks and add a translation styling hook #6390

Closed
opened 2026-10-23 04:09:58 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4466
Author: @minikkeuen
Created: 8/2/2026
Status: ✅ Merged
Merged: 8/2/2026
Merged by: @SpicyMarinara

Base: staging ← Head: translation-style-hook


📝 Commits (4)

  • c82291d Merge pull request #4438 from Pasta-Devs/staging
  • 2e24e90 feat(themes): expose translation text styling hook
  • 23d0e52 Merge branch 'staging' into translation-style-hook
  • 71022ff Merge branch 'staging' into translation-style-hook

📊 Changes

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

View changed files

📝 packages/client/src/components/chat/ChatMessage.tsx (+4 -2)
📝 packages/client/src/components/chat/ConversationMessageShared.tsx (+1 -1)

📄 Description

Linked issue

Closes #4465

Why this change

  • Translated messages should preserve their original line breaks.
  • Providing a dedicated CSS hook also makes translated text easier for themes to style consistently.

What changed

  • Preserved translated message line breaks with whitespace-pre-wrap.
  • Added a dedicated translation-text class to translated message containers.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Verified translated messages preserve line breaks.
  • Verified the default appearance remains unchanged.
  • Verified translated text can be styled consistently through the .translation-text class.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Summary by CodeRabbit

  • Style
    • Standardized the appearance of translated chat and conversation messages.
    • Preserved readable line wrapping and consistent formatting across translation displays.

🔄 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/Pasta-Devs/Marinara-Engine/pull/4466 **Author:** [@minikkeuen](https://github.com/minikkeuen) **Created:** 8/2/2026 **Status:** ✅ Merged **Merged:** 8/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `translation-style-hook` --- ### 📝 Commits (4) - [`c82291d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c82291d6c032e566144fde1fd2eee7c7c12466df) Merge pull request #4438 from Pasta-Devs/staging - [`2e24e90`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2e24e905b86b8c421d2853b92aa52de71808d27f) feat(themes): expose translation text styling hook - [`23d0e52`](https://github.com/Pasta-Devs/Marinara-Engine/commit/23d0e529eb185808d4bc6440822b3c47ce4e1f81) Merge branch 'staging' into translation-style-hook - [`71022ff`](https://github.com/Pasta-Devs/Marinara-Engine/commit/71022ff0a79de9d97085f3bab90c4bcd368bff35) Merge branch 'staging' into translation-style-hook ### 📊 Changes **2 files changed** (+5 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/chat/ChatMessage.tsx` (+4 -2) 📝 `packages/client/src/components/chat/ConversationMessageShared.tsx` (+1 -1) </details> ### 📄 Description ## Linked issue Closes #4465 ## Why this change - Translated messages should preserve their original line breaks. - Providing a dedicated CSS hook also makes translated text easier for themes to style consistently. ## What changed - Preserved translated message line breaks with `whitespace-pre-wrap`. - Added a dedicated `translation-text` class to translated message containers. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes - Verified translated messages preserve line breaks. - Verified the default appearance remains unchanged. - Verified translated text can be styled consistently through the `.translation-text` class. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Style** * Standardized the appearance of translated chat and conversation messages. * Preserved readable line wrapping and consistent formatting across translation displays. <!-- 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>
bsakaguchi 2026-10-23 04:09:58 +07: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
Pasta-Devs/Marinara-Engine#6390
No description provided.