Skip to content

Conversation

@levilevente
Copy link
Owner

This pull request introduces internationalization (i18n) to the application, enabling support for multiple languages (starting with English) and replacing hardcoded UI text with translation keys. The main changes include integrating the i18next library and related packages, adding translation files, and updating various UI components to use translated text.

Internationalization Integration:

  • Added i18next, react-i18next, i18next-http-backend, and i18next-browser-languagedetector to package.json dependencies to support translation and language detection.
  • Created and configured src/i18n.js to initialize i18n with backend and language detector plugins.
  • Imported i18n initialization in src/main.tsx to ensure translations are available throughout the app.
  • Added English translation resources in public/locales/en/translation.json.

Component Updates for Translations:

  • Updated FooterBar, NavigationBar, AgentChatWidget, EpicDataCard, ImageOfTheDay, ImageOfTheDayContainer, ImageOfTheDayHistory, and SearchResults components to use useTranslation and translation keys instead of hardcoded strings. [1] [2] [3] [4] [5] [6] [7] [8]

UI/UX Improvements:

These changes lay the groundwork for supporting multiple languages and improve maintainability by centralizing UI text.

@levilevente levilevente self-assigned this Dec 14, 2025
@levilevente levilevente linked an issue Dec 14, 2025 that may be closed by this pull request
@levilevente levilevente requested a review from Copilot December 14, 2025 10:53
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces internationalization (i18n) support to the GalacticView application by integrating the i18next library ecosystem. The implementation establishes the foundation for multi-language support by replacing hardcoded UI strings with translation keys sourced from centralized JSON files, starting with English translations.

Key Changes

  • Added i18next libraries (i18next, react-i18next, i18next-http-backend, i18next-browser-languagedetector) to enable translation functionality
  • Created i18n configuration in src/i18n.js with language detection and backend loading plugins
  • Updated 11 components to use the useTranslation hook and translation keys instead of hardcoded strings

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
package.json Added i18next dependencies for internationalization support
yarn.lock Added dependency entries for i18next packages and their transitive dependencies
src/i18n.js Created i18n configuration with fallback language, debug mode, and plugin initialization
src/main.tsx Imported i18n configuration to initialize translations at application startup
public/locales/en/translation.json Added English translation resources with nested structure for organized key management
src/components/FooterBar.tsx Replaced hardcoded footer text with translation keys
src/components/NavigationBar.tsx Replaced navigation link labels with translation keys
src/components/AgentChatWidget.tsx Internationalized chat widget welcome message and input placeholder
src/components/epicdata/EpicDataCard.tsx Replaced card text with translation keys using string concatenation
src/components/imageoftheday/ImageOfTheDay.tsx Internationalized image titles and error messages
src/components/imageoftheday/ImageOfTheDayContainer.tsx Replaced loading and error messages with translation keys
src/components/imageoftheday/ImageOfTheDayHistory.tsx Internationalized date picker form labels and button text
src/components/search/SearchResults.tsx Replaced error message with translation key and updated comment capitalization
src/pages/HomePage.tsx Internationalized month names while leaving day names and "LIVE" text hardcoded
src/pages/SearchItemPage.tsx Replaced loading spinner text with translation key
src/pages/EpicDataPostPage.tsx Internationalized all descriptive text and section headings for EPIC data

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@levilevente levilevente merged commit 87dfe8a into develop Dec 14, 2025
2 checks passed
@levilevente levilevente deleted the feature/internationalization-i18n branch December 14, 2025 15:02
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.

Internationalization i18n

2 participants