Home › Forums › Ticket Products › Event Tickets Plus › Untranslatable Instance Of The Word "Tickets" in tribe-link-tickets-message
- This topic has 5 replies, 4 voices, and was last updated 9 years, 6 months ago by
Kevin Morton.
-
AuthorPosts
-
September 21, 2016 at 1:53 pm #1167128
Kevin Morton
ParticipantI believe there’s an untranslatable instance of the word “Tickets” in /event-tickets/src/views/tickets/orders-link.php
I’ve used Tribe’s own recommended tribe_str_replace function for changing all instances of a word throughout the Event Calendar plugins to another. In this case, changing “Tickets” to “Registrations” (with plurals and capitalizations accounted for). But in that instance, which shows up event pages with tickets when a logged in user has a ticket purchased for that event, it is changing only 1 instance of “Tickets” to “Registrations” and not both instances.
So the message in the “tribe-link-tickets-message” div on the event page reads:
You have 2 Tickets for this Event. View your Registrations
I had to manually change the text in the core plugin file to get it to read:
You have 2 Registrations for this Event. View your Registrations
September 21, 2016 at 2:35 pm #1167143Cliff
MemberHi Kevin. Thanks for your detailed question.
I believe you’re referring to this line of code: https://github.com/moderntribe/event-tickets/blob/4.2.7/src/views/tickets/orders-link.php#L37
Please reference that line of code and this KB article (I believe you’ll need to enter %d Ticket and %d Tickets separately) and let me know if you have any follow-up questions.
September 21, 2016 at 2:47 pm #1167152Kevin Morton
ParticipantHi Cliff,
In fact, that is the tribe_custom_theme_text/tribe_str_replace function I am already using. It is only replacing the 2nd instance of “Tickets” in this section of the site (which is line 46), and not the first instance (line 37/45).
$custom_text = array( '%d Ticket' => '%d Registration', '%d Tickets' => '%d Registrations', );Results still in:
You have 2 Tickets for this Event. View your Registrations
So it appears gettext is not working to translate line 37/45.
September 22, 2016 at 2:51 pm #1167664Cliff
MemberKevin, I checked with one of our developers and apparently the code snippet in that KB article is only filtering gettext and not ngettext. I have asked that this KB article’s snippet be updated for this.
In the meantime, you could try filtering ngettext yourself or you might try a plugin like Say What?
Let me know if you get further along with this or if you still need help.
October 14, 2016 at 9:35 am #1176633Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Untranslatable Instance Of The Word "Tickets" in tribe-link-tickets-message’ is closed to new replies.
