Skip to content

Add i18n support for login and navbar - #680

Open
krishna5379chaudhary-eng wants to merge 1 commit into
scorelab:masterfrom
krishna5379chaudhary-eng:add-i18n-support-576
Open

Add i18n support for login and navbar#680
krishna5379chaudhary-eng wants to merge 1 commit into
scorelab:masterfrom
krishna5379chaudhary-eng:add-i18n-support-576

Conversation

@krishna5379chaudhary-eng

Copy link
Copy Markdown

Description

This PR adds internationalization (i18n) support to the Login and Navbar components.

The implementation uses i18next and react-i18next and currently provides English and Hindi translations. User-facing text in the Login and Navbar components has been moved to translation files so that additional languages can be added more easily in the future.

This also updates the Login component tests to work with the translated component.

Fixes #576

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The changes were tested locally using the project's existing Jest test suite.

Command used:

npm test -- --watchAll=false

Test result:

  • 8 test suites passed
  • 38 tests passed
  • 0 tests failed

The Login component tests were updated to provide the translation function when testing the unwrapped component.

Test Configuration:

  • Node.js: Local development environment
  • React: Existing project version
  • Test framework: Jest
  • Test runner: Enzyme

Screenshots can be added to this PR to demonstrate the translated Login and Navbar UI.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

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.

Adding i18n Support for Localisation and Internationalsation

1 participant