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 some files to i18n format instead of hardcoded string literals #5980

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

osujipius
Copy link

@osujipius osujipius commented Oct 4, 2024

NOTE: Please review the pull request process before opening your first PR: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/CONTRIBUTING.md#pull-request-process

What this PR does

Refactors some files to i18n format instead of hardcoded string literals
Fixes #5738

Screenshots

Before:
Screenshot 2024-10-04 at 22 55 50

After:
Screenshot 2024-10-04 at 22 53 30
Screenshot 2024-10-04 at 22 53 43
Screenshot 2024-10-04 at 22 54 05
Screenshot 2024-10-04 at 22 54 17

@ragesoss
Copy link
Member

ragesoss commented Oct 7, 2024

This introduces some linting errors.

@osujipius
Copy link
Author

This introduces some linting errors.

Fixed!

{text}
{remaining.length ? (
<small>
{remaining.length} {I18n.t('training.remaining_exercise')}
Copy link
Member

Choose a reason for hiding this comment

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

Rather than concatenating the number with the message, this should be implemented as an argument to the message, so that translators have full control of how to handle the number within the message.

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.

Refactor hardcoded string literals to i18n format
2 participants