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) O3-3522: Replace module-local translations with core translations #1895

Merged
merged 10 commits into from
Jul 16, 2024

Conversation

jwnasambu
Copy link
Contributor

@jwnasambu jwnasambu commented Jul 4, 2024

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

Summary

I replaced the t() calls with getCoreTranslation() calls knowing that getCoreTranslation behaves similarly to t() and returns the translated text.

Screenshots

Related Issue

https://openmrs.atlassian.net/browse/O3-3522

Other

@jwnasambu
Copy link
Contributor Author

@jnsereko, @denniskigen, @ibacher, could you please help me review my PR please? Besides, I am encountering this error: Argument of type '"patientIdentifierSticker"' is not assignable to parameter of type '"address" | "male" | "female" and more additional strings that are not present in the esm-translations file that I believe I should add Kindly feel free to correct me if necessary. Thank you!

@jwnasambu jwnasambu marked this pull request as draft July 4, 2024 19:06
@jwnasambu jwnasambu marked this pull request as ready for review July 8, 2024 11:54
@ibacher
Copy link
Member

ibacher commented Jul 8, 2024

Short version is not everything goes into Core Translations, only strings that we use in several places. patientIdentifierSticker should be translated using the t() function as usual.

@jwnasambu
Copy link
Contributor Author

@ibacher thanks for the review and guidance

@jwnasambu jwnasambu force-pushed the (refactor)O3-3522 branch from 6fed1ec to 16c0ed9 Compare July 8, 2024 20:40
@jwnasambu
Copy link
Contributor Author

Short version is not everything goes into Core Translations, only strings that we use in several places. patientIdentifierSticker should be translated using the t() function as usual.

@ibacher I have fixed the proposed changes.

@jwnasambu
Copy link
Contributor Author

Short version is not everything goes into Core Translations, only strings that we use in several places. patientIdentifierSticker should be translated using the t() function as usual.

@ibacher, would it be okay for me to close this PR? I have already fixed the frequently used strings in the core translations. The specific or less frequently used strings are to be translated directly using the t() function in the code where they are used, based on your comment above which makes me believe these changes are not needed? kindly correct me please!

@ibacher
Copy link
Member

ibacher commented Jul 10, 2024

@jwnasambu We merged in the PR with changes. I think having standardized translations for printing, etc. makes sense. However, in this PR you will need to update the versions of the CLI and framework as outlined here for this code to be able to "see" those changes.

@jwnasambu jwnasambu marked this pull request as draft July 10, 2024 21:52
@jwnasambu jwnasambu marked this pull request as ready for review July 10, 2024 22:45
@jwnasambu
Copy link
Contributor Author

jwnasambu commented Jul 10, 2024

@ibacher, I have tried out something here and would appreciate your guidance and review. The build failure is from the programs app, which is not related to this file.

@denniskigen denniskigen changed the title (refactor)O3-3522: Replace module-local translations with core translations (refactor) O3-3522: Replace module-local translations with core translations Jul 16, 2024
@denniskigen denniskigen requested a review from ibacher July 16, 2024 12:36
Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @jwnasambu.

@denniskigen denniskigen merged commit 6f05b1a into openmrs:main Jul 16, 2024
6 checks passed
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.

3 participants