Skip to content

Fix: Homepage Translations Not Displaying Properly#164

Merged
Gyanthakur merged 1 commit into
Gyanthakur:mainfrom
ankitjhagithub21:fix-translation
Oct 19, 2025
Merged

Fix: Homepage Translations Not Displaying Properly#164
Gyanthakur merged 1 commit into
Gyanthakur:mainfrom
ankitjhagithub21:fix-translation

Conversation

@ankitjhagithub21

@ankitjhagithub21 ankitjhagithub21 commented Oct 19, 2025

Copy link
Copy Markdown
Contributor

📝 Description

This pull request fixes the issue where translation keys (e.g., homepage.hero_title, homepage.hero_description) were displayed instead of their corresponding translated values on the homepage.

✨ What Was Happening

Previously, the homepage was rendering translation keys directly because the localization setup was incomplete and not integrated properly with the page components.

💡 What Was Done

  • Integrated next-intl for handling internationalization.
  • Configured next-intl provider in the app layout to wrap all pages.
  • Added and organized translation files under the messages/ directory.
  • Updated the homepage component to use useTranslations('homepage') for fetching localized strings.
  • Verified that all text on the homepage (titles, descriptions, and buttons) now display correct translation values.

Fixes: #163

🔍 Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)

✅ Checklist

  • My code follows the project’s coding style and guidelines.
  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have added tests (or verified functionality manually) to ensure translations render correctly.
  • New and existing tests pass locally with my changes.
  • I have updated the documentation (if required).

📸 Screenshots (Before & After)

❌ Before

Translations displayed as raw keys:

Screenshot 2025-10-19 at 6 07 47 PM

✅ After

Translations are correctly rendered using localized text:

Screenshot 2025-10-19 at 6 06 47 PM

💬 Additional Comments

  • The fix standardizes internationalization using next-intl across the app, improving scalability for future translations.
  • This change ensures better maintainability and localization consistency across pages.
  • Verified working for en and fr locales.
  • No breaking changes introduced.

@vercel

vercel Bot commented Oct 19, 2025

Copy link
Copy Markdown

@ankitjhagithub21 is attempting to deploy a commit to the gyanthakur's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @ankitjhagithub21! Thanks for creating the pull request.
Soon the maintainers/owner will review it and provide you with feedback/suggestions.
Make sure to star this awesome repository and follow the account!

@vercel

vercel Bot commented Oct 19, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
component-library Ready Ready Preview Comment Oct 19, 2025 3:47pm

💡 Enable Vercel Agent with $100 free credit for automated AI reviews

@Gyanthakur Gyanthakur merged commit ae4623d into Gyanthakur:main Oct 19, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants