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

Bad translation triggers a fatal error #250

Closed
beatricelucaci opened this issue Jan 4, 2023 · 0 comments
Closed

Bad translation triggers a fatal error #250

beatricelucaci opened this issue Jan 4, 2023 · 0 comments
Assignees
Milestone

Comments

@beatricelucaci
Copy link

Describe the bug
In the function “kbs_setup_kbs_ticket_tag_taxonomy()” you have this line of code:

'search_items' => sprintf( esc_html__( 'Search %s Tags', 'kb-support' ), kbs_get_ticket_label_singular() ),
When you change the language to Spanish in the backend, that line of code becomes:

sprintf('Buscar Etiqueta…', 'Ticket')
It triggers a fatal error because the Spanish translation of ‘Search %s Tags’ misses the %s.

I suggest you be sure all the translations have the format specifier required by the function sprintf.

In my case, it triggers a fatal error in the backend because of a bad translation.

Here what I find in the debug.log file:

[01-Jan-2023 18:09:30 UTC] PHP Fatal error: Uncaught ValueError: Missing format specifier at end of string in /Users/josemortellaro/Sites/plugins/wp-content/plugins/kb-support/includes/post-taxonomies.php:76

https://wordpress.org/support/topic/bad-translation-triggers-a-fatal-error/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants