-
Notifications
You must be signed in to change notification settings - Fork 198
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
Comments
Just checking in to see if there is any movement here. It's a pretty small change, and doesn't seem like this request would have any impact on the majority of users but would make it compatible with TranslatePress and randomly ordering quiz questions. Or is there at least some other suggestion besides modifying the core template file? |
@valiceops Hello, and thanks for your inquiry. Would you mind confirming whether Learning Mode is enabled on your site?
Please ignore. I just realized that setting does not control the question number format, but rather the points format. |
Hi @donnapep - Yes, we are using Learner Mode |
@valiceops Thanks. Can you confirm that #7738 will resolve the TranslatePress issue? |
I wasn't able to load the playground but viewing the commit, yes, this is what we have in our override and works for translating the randomly ordered questions. Thank you! |
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
The text was updated successfully, but these errors were encountered: