WikiEducationFoundation / WikiEduDashboard

Wiki Education Foundation's Wikipedia course dashboard system
https://dashboard.wikiedu.org
MIT License
387 stars 617 forks source link

Refactor hardcoded string literals to i18n format #5738

Open prathamVaidya opened 6 months ago

prathamVaidya commented 6 months ago

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

osujipius commented 11 hours ago

Can I pick this up? @ragesoss