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

Wrap Question Number in span tag #7622

Open
valiceops opened this issue Jul 1, 2024 · 0 comments
Open

Wrap Question Number in span tag #7622

valiceops opened this issue Jul 1, 2024 · 0 comments
Labels
[Status] Needs Triage Issue needs to be triaged [Type] Bug

Comments

@valiceops
Copy link

Steps to Reproduce

Quiz questions are no longer translating using TranslatePress so the request is to wrap the question number within the h2 heading that outputs the question title, in a span tag.

We are using a translation plugin (TranslatePress) which is fairly popular. We ran into an issue which, in the interest of time, we had just resolved by modifying the /woothemes-sensei/plugins/sensei-lms/includes/class-sensei-question.php file to wrap the output of the question number ($title_html .= sprintf( esc_html__( '%d. ', 'sensei-lms' ), sensei_get_the_question_number() );) in a span tag.

The reason for the request is that the translation plugin identifies the entire content, including the number, as a string so it wasn't finding our 100+ question translations because prior to a year or so I go I guess now, Sensei didn't output the question numbers. We also, FYI use the random order feature so it would be very daunting to re-translate every possible combination of numbers and questions in the translation file/plugin.

PHP / WordPress / Sensei LMS version

WP 6.5.4 / Sensei LMS 4.24.1

@valiceops valiceops added [Status] Needs Triage Issue needs to be triaged [Type] Bug labels Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Triage Issue needs to be triaged [Type] Bug
Projects
None yet
Development

No branches or pull requests

1 participant