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

Localizing Care #4467

Closed
16 tasks done
rithviknishad opened this issue Jan 3, 2023 · 2 comments
Closed
16 tasks done

Localizing Care #4467

rithviknishad opened this issue Jan 3, 2023 · 2 comments
Labels

Comments

@rithviknishad
Copy link
Member

rithviknishad commented Jan 3, 2023

💬 Follow up of #4423 (comment) by @khavinshankar
@rithviknishad as a follow-up to this issue, can you make an epic issue that tracks multiple issues for adding localization support across the platform for all hardcoded string

The below sub-issues can be assigned to yourself 😃

Procedure for each sub-issues of this epic

  1. All static/hardcoded strings that are rendered should be taken from the localizations.
  2. Do check if the translation already exists, if not add the translation for en locale first. Other locales will be added later on eventually by translators.
  • While adding the translations, add it to their respective JSON files.
  • Texts that may potentially be common across the platform shall be added to Common.json.
  • Others shall be added to their respective JSON files (for example if text is present inside /src/Components/Patients/*.tsx, it can be added to src/Locale/en/Patient.json)

For example:

Before

// src/Components/Patient/DailyRounds.tsx
<FieldLabel>
  {"SPO2 (%)"}
  {getStatus(90, "Low", 100, "High", "ventilator_spo2")}
</FieldLabel>

After:

// src/Components/Patient/DailyRounds.tsx
const { t } = useTranslations();

<FieldLabel>
  {t("SPO2") + " %"}
  {getStatus(90, t("Low"), 100, t("High"), "ventilator_spo2")}
</FieldLabel>
// src/Locale/en/Patient.json
{
  "SPO2": "SPO2",
}
// src/Locale/en/Common.json
{
  "Low": "Low",
  "High": "High",
}

Sub-issues to be done in separate PRs:

ℹ️ Facility/Consultations means .tsx files present in src/Components/Facility/Consultations directory

cc: @gigincg @khavinshankar

@rithviknishad
Copy link
Member Author

Marking it as hold to finalize the approach

@rithviknishad
Copy link
Member Author

Feel free to further break down each sub-issue to multiple sub-issues if there's lots of translations to be done in one sub-issue itself.
If so, link the issue in the sub-issues section by editing the first comment.

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

No branches or pull requests

1 participant