Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor hardcoded string literals to i18n format #5738

Open
prathamVaidya opened this issue Mar 30, 2024 · 0 comments
Open

Refactor hardcoded string literals to i18n format #5738

prathamVaidya opened this issue Mar 30, 2024 · 0 comments

Comments

@prathamVaidya
Copy link
Contributor

Current Behavior:

The WikiEduDashboard codebase uses i18n to support localization. Localization helps translate the website text into multiple languages. Though the codebase has very high localization support, there are more than 300+ warnings related to hardcoded string literals.

Expected Behavior:

These hardcoded string literals should be moved to i18n format to enable localization. This is a good first issue for beginners. Once you have setup the development environment, run the following command :

yarn coverage

The command will take 1-2 mins to complete and will list all the components that require refactoring. Then you can pick up one component and try to move the hardcoded string to i18n.

Example of how to do it

Before:

image

After:

image

Extract the text and add it in en.yml under a meaningful group with a proper tag name.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant