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

Translation issue on Unenroll Confirm Modal #546

Open
igobranco opened this issue Jan 13, 2025 · 2 comments
Open

Translation issue on Unenroll Confirm Modal #546

igobranco opened this issue Jan 13, 2025 · 2 comments
Labels
help wanted Ready to be picked up by anyone in the community

Comments

@igobranco
Copy link

igobranco commented Jan 13, 2025

The reasons why the student has choosen to be unenroll on the course, that is shown on the "Unenroll Confirm Modal" screen, aren't being translated from English.

Example, viewing the modal in "Portuguese (Portugal)" pt_PT locale, the reasons are still being shown in English.
image

Example, viewing the modal in English and its flow.
image
image
image

Note: Tested on Redwood release, but main should have the same issue.

@deborahgu deborahgu moved this to Backlog in Aperture-Maintained Jan 13, 2025
@deborahgu deborahgu added the help wanted Ready to be picked up by anyone in the community label Jan 13, 2025
@deborahgu
Copy link
Member

looking at this one, and seeing that the 'learner-dash.unenrollConfirm.confirm.reasons.* have not translated into any language, I'm going to guess that's because the successfully translated messages from that modal are in UnenrollConfirmModal/components/messages.js and the untranslated message strings are in UnenrollConfirmModal/constants.js. Someone will have to take a look at this and see if that's correct and how to successfully modify it without breaking anything.

@igobranco
Copy link
Author

looking at this one, and seeing that the 'learner-dash.unenrollConfirm.confirm.reasons.* have not translated into any language, I'm going to guess that's because the successfully translated messages from that modal are in UnenrollConfirmModal/components/messages.js and the untranslated message strings are in UnenrollConfirmModal/constants.js. Someone will have to take a look at this and see if that's correct and how to successfully modify it without breaking anything.

@deborahgu I think the problem is on extract translations method aren't detect those translations. If those translations aren't put on the Transifex, they won't be translated...

When I run extract_translations the "reasons" aren't found:

$ make extract_translations

$ grep -rin "learner-dash.unenrollConfirm." src/containers
src/containers/UnenrollConfirmModal/constants.js:31:    id: 'learner-dash.unenrollConfirm.reasons.prereqs',
src/containers/UnenrollConfirmModal/constants.js:36:    id: 'learner-dash.unenrollConfirm.reasons.difficulty',
src/containers/UnenrollConfirmModal/constants.js:41:    id: 'learner-dash.unenrollConfirm.reasons.goals',
src/containers/UnenrollConfirmModal/constants.js:46:    id: 'learner-dash.unenrollConfirm.reasons.broken',
src/containers/UnenrollConfirmModal/constants.js:51:    id: 'learner-dash.unenrollConfirm.reasons.time',
src/containers/UnenrollConfirmModal/constants.js:56:    id: 'learner-dash.unenrollConfirm.reasons.browse',
src/containers/UnenrollConfirmModal/constants.js:61:    id: 'learner-dash.unenrollConfirm.reasons.support',
src/containers/UnenrollConfirmModal/constants.js:66:    id: 'learner-dash.unenrollConfirm.reasons.quality',
src/containers/UnenrollConfirmModal/constants.js:71:    id: 'learner-dash.unenrollConfirm.reasons.easy',
src/containers/UnenrollConfirmModal/constants.js:76:    id: 'learner-dash.unenrollConfirm.reasons.custom-placeholder',
src/containers/UnenrollConfirmModal/components/messages.js:6:    id: 'learner-dash.unenrollConfirm.confirm.header',
src/containers/UnenrollConfirmModal/components/messages.js:11:    id: 'learner-dash.unenrollConfirm.confirm.cancel',
src/containers/UnenrollConfirmModal/components/messages.js:16:    id: 'learner-dash.unenrollConfirm.confirm.unenroll',
src/containers/UnenrollConfirmModal/components/messages.js:21:    id: 'learner-dash.unenrollConfirm.confirm.reason.heading',
src/containers/UnenrollConfirmModal/components/messages.js:26:    id: 'learner-dash.unenrollConfirm.confirm.reason.skip',
src/containers/UnenrollConfirmModal/components/messages.js:31:    id: 'learner-dash.unenrollConfirm.confirm.reason.submit',
src/containers/UnenrollConfirmModal/components/messages.js:36:    id: 'learner-dash.unenrollConfirm.confirm.finish.heading',
src/containers/UnenrollConfirmModal/components/messages.js:41:    id: 'learner-dash.unenrollConfirm.confirm.finish.thanks-text',
src/containers/UnenrollConfirmModal/components/messages.js:46:    id: 'learner-dash.unenrollConfirm.confirm.finish.text',
src/containers/UnenrollConfirmModal/components/messages.js:51:    id: 'learner-dash.unenrollConfirm.confirm.finish.return',

$ grep -rin "learner-dash.unenrollConfirm." temp/babel-plugin-formatjs/Default.messages.json 
430:    "id": "learner-dash.unenrollConfirm.confirm.header"
435:    "id": "learner-dash.unenrollConfirm.confirm.cancel"
440:    "id": "learner-dash.unenrollConfirm.confirm.unenroll"
445:    "id": "learner-dash.unenrollConfirm.confirm.reason.heading"
450:    "id": "learner-dash.unenrollConfirm.confirm.reason.skip"
455:    "id": "learner-dash.unenrollConfirm.confirm.reason.submit"
460:    "id": "learner-dash.unenrollConfirm.confirm.finish.heading"
465:    "id": "learner-dash.unenrollConfirm.confirm.finish.thanks-text"
470:    "id": "learner-dash.unenrollConfirm.confirm.finish.text"
475:    "id": "learner-dash.unenrollConfirm.confirm.finish.return"

I think the code needs a refactor making the extract translations detect those translations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Ready to be picked up by anyone in the community
Projects
Status: Backlog
Development

No branches or pull requests

2 participants