Home › Forums › Calendar Products › Filter Bar › Translate %s Category
- This topic has 6 replies, 3 voices, and was last updated 10 years, 2 months ago by
Geoff.
-
AuthorPosts
-
January 29, 2016 at 3:27 am #1064211
Mikhail
ParticipantHello!
I’m have translated “%s Category” in file “tribe-events-filter-view-ru_RU” , and have recompile .po and .mo files,
but changes have applied only in backend. On frontend I see “Category”: http://citifox.ru/events/
January 29, 2016 at 12:11 pm #1064651George
ParticipantHey @Mikhail,
This string – %s Category – and variations of it appear in multiple places throughout the file. Have you only changed it in one spot? Or have you changed all instances of this sort of string?
Also, I could not see this in English on your site anywhere. Can you share a screenshot of an exact place on the front-end where the string is not translated? You can do so by uploading the screenshot to Imgur.com, Flickr.com, CloudUp.com, or any similar image-hosting site; then just share the links to those images here and I’ll take a look.
Thank you!
GeorgeFebruary 1, 2016 at 1:59 am #1065461Mikhail
ParticipantI translated all %s Category
Screen: http://imgur.com/8V5yNKR
February 1, 2016 at 12:52 pm #1065941George
ParticipantThank you for searching for that, and for your patience here!
I did some more digging and found the problem, and found that it’s actually stemming from the way Filter Bar constructs the filter tabs. They actually don’t even use translatable strings, they are auto-generated in the code.
This means that, unfortunately, the only way to translate the text of that “Event Category” filter title is to add code like the following to your theme’s functions.php file:
function tribe_translate_filterbar_filter_title( $title, $slug ) {if ( ! empty( $slug ) && 'eventcategory' == $slug ) {
$title = 'New Title';
}return $title;
}add_filter( 'tribe_events_filter_title', 'tribe_translate_filterbar_filter_title', 10, 2 );
Where you see the text that says ‘New Title’, you can add your Russian version of the phrase “Event Category” and it should replace it correctly.
I’m sorry that this is required to change the text! We can definitely improve this over time. But I hope this code and suggestion help for now.
Thank you,
GeorgeFebruary 1, 2016 at 9:53 pm #1066108Mikhail
ParticipantIt works!
Thank you
February 3, 2016 at 12:20 pm #1067211George
ParticipantGlad to hear it Mikhail; this is definitely a bug nonetheless and I’ve made a bug ticket so that our developers can find and fix the problem.
Thanks for your patience with things while we work on that bugfix–I hope this temporary solution is an adequate one in the meantime!
I’ll close up this thread for now, but feel free to open a new thread any time if we can help with anything else.
Cheers,
GeorgeFebruary 18, 2016 at 10:33 am #1077206Geoff
MemberHey there!
Just wanted to jump in here and let you know that we released Filter Bar 4.0.3 last night and it included a fix for this issue. Please check your WordPress updates, or you can also grab the latest copy by logging into this site and heading to My Account > Downloads.
Thanks for your patience while we worked on this! Please feel free to open a new thread if you continue to experience the same issue or have any other questions that pop up during updating and we’d be happy to help. 🙂
Cheers!
Geoff -
AuthorPosts
- The topic ‘Translate %s Category’ is closed to new replies.
