i18n: extract hardcoded status strings in ProgramRecordsList#685
i18n: extract hardcoded status strings in ProgramRecordsList#685jia-dodeja wants to merge 2 commits into
Conversation
|
Thanks for the pull request, @jia-dodeja! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. DetailsWhere can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
|
Hi @jajjibhai008, this is my first contribution to this project. I've extracted the hardcoded 'Completed' and 'Partially Completed' status strings in ProgramRecordsList.jsx into i18n message descriptors (closes #457). I've submitted the CLA and the PR is ready for engineering review when you get a chance! |
|
Hi @jia-dodeja! Welcome, and thank you for this contribution! In order for your CLA check to turn green, you'll need to submit a CLA form. If you are contributing as an individual, please fill out the individual CLA form here. If you are contributing on behalf of an organization, please have your manager reach out to oscm@axim.org so you may be added to your org's existing entity agreement. Please let me know if you have any questions. Thanks! |
|
Hi @mphilbrick211! I have filled out the CLA form already as well as the DocuSign document. |
|
@jia-dodeja Looks like there are some check failures, please have a look. |
What does this PR do?
This PR fixes the hardcoded
'Completed'and'Partially Completed'strings inProgramRecordsList.jsxby wrapping them in the project's i18n system. I added message descriptors usingdefineMessagesand replaced the hardcoded strings withintl.formatMessage()calls so they can be translated into the user's language.Why was this PR needed?
Issue #457 pointed out that these two status strings were hardcoded in JavaScript, meaning they always showed up in English even when the rest of the interface was translated. Since the strings are assigned to a variable in logic rather than rendered directly in JSX,
intl.formatMessage()is the right pattern to use here — which matches how other components in the codebase handle the same situation.What are the relevant issue numbers?
Closes #457
Does this PR meet the acceptance criteria?
SendLearnerRecordModalare unrelated to this change)