Skip to content

feat: translate page titles via generateMetadata - #537

Open
marioommg wants to merge 1 commit into
spliit-app:mainfrom
marioommg:fix/translate-page-titles
Open

feat: translate page titles via generateMetadata#537
marioommg wants to merge 1 commit into
spliit-app:mainfrom
marioommg:fix/translate-page-titles

Conversation

@marioommg

Copy link
Copy Markdown

Summary

  • Translate browser tab / HTML page titles with generateMetadata + getTranslations, so they follow the selected locale (Page titles not working with translations #325).
  • Keep metadata only in server page.tsx / layout.tsx files (no generateMetadata in client components).
  • Use plain-text keys for document titles (Homepage.metaTitle, Groups.createGroup) instead of rich-text or empty-state strings.

Related: builds on the same idea as #502, but avoids the issues in that branch (client + next-intl/server, Homepage.title with <strong> tags, and Groups.NoRecent.create for the create-group page).

Test plan

  • Open a group with locale set to Spanish (or another non-English language)
  • Check browser tab titles on Expenses, Balances, Activity, Totals, Settings, Information
  • Check Create expense / Edit expense / Create group / Recent groups
  • Confirm home tab title has no literal <strong> tags

Use next-intl in server page/layout metadata so browser tabs follow the selected locale. Avoid client modules and rich-text homepage strings for document titles.

Resolves spliit-app#325

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant