Posted: April 18, 2016 at 9:19 am
|
I’m having some trouble translating the sublines in [ESPRESSO_MY_EVENTS] shortcode. I mean the lines beneath the events table with the colored squares on their left. The problem is that because each subline is made of separate words (not a full sentence) the tranlation of each word individually does not make sense in Spanish. i.e “Approved Registration” is not equal to “Aprobado Registro”, but “Registro Aprobado” with the words interchanged, and this means I need to change the order of the words. How could I get this translated? Thank you! |
Hello, This should work: https://gist.github.com/anonymous/ed81729c0bee464df3d9127028722588 If you have an existing gettext function in use, then you could just add the new entry and save changes. — |
|
|
Where does this go? I paste it in functions.php and does not work. |
Hello, It can go into a site specific plugin (https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/). If you are already using a child theme which has some customizations, then you can add it there instead of creating a new site specific plugin. — |
|
|
There is something wrong with the code. After adding the code in my customizations plugin, the website simply gets blank. My plugin code is now this:
|
Hi ardiaful, I’ve just tested that plugin on a test site and it works fine. I’m guessing you have another snippet of code doing similar with the same function name. If you enable WP_DEBUG and activate that plugin you should see the error on the white page. However, one thing to note is that all of those gettext translations can actually be included within a single function. So that additional single line translation can be added to your ee_custom_messaging_changes() function so the whole plugin becomes: 'Próximamente', 'Upcoming' => 'Próximamente', '%s Registration, %s Event' => 'Registration %s, %s Event', ); if ( isset( $strings[$original] ) ) { $translations = get_translations_for_domain( $domain ); $translated = $translations->translate( $strings[$original] ); } return $translated; } add_filter( 'gettext', 'ee_custom_messaging_changes', 10, 3 ); /* Stop Adding Functions */ |
|
|
Yes, this worked fine for ‘%s Registration, %s Event’ => ‘Registration %s, %s Event’. However, I still have the same problem for ‘Status, Event’, that should change to ‘Evento, Status’ (i.e. ‘Sold out event’, to ‘event sold out’). How can I solve this? Finally, regarding the icons below in my_events page, I cannot see the one for “edit the registration details” (only can read the text line), and the icon & text line for the invoice is lost. Hope you can help to visualize these two. Thank you in advance. |
Where do you see those strings? Can you add a screenshot so we can see please?
Can you see the other icons? For example can you see the resend confirmation email link? – http://take.ms/eeRMr Invoice/Receipt links are only shown the primary registration within the group, so do you see those links on that? |
|
|
See attached a screenshot for the text lines that I need translated: As I said befores, this are separate words and I need them with the order changed: i.e. Active Event = Evento Activo Regarding the icons, I particularly cannot see invoice icon in the front page (legends) |
Hello, You can adjust the order like this: https://gist.github.com/anonymous/f61da000b2e5570b24afc25f85165786 If you compare that to the original, then you’ll see that the placeholders have changed in position. — |
|
|
Thanks, that solved much of the translation issue. However, there are still 3 text lines getting tough. Please check out screenshot. |
Hello, What are the phrases that are not translating? — |
|
|
It seems that screenshot was not added in my last message. Please check it out now here: http://i.imgur.com/7liyKIG.png The phrases to translate are: Additionally, the invoice icon does not show up among the legend icons and I’d like to display it, how could I get this done? Thanks |
You’ll need to add some additional strings to your translation plugin: “Inactive Event” = “Evento Inactivo” Are output using ‘%s Event’, so you need:
“No Approved Registration” = “Registro No Aprobado” Is output using ‘%s Registration’, so for that you need:
That should translate the remaining strings. |
|
|
I got this finally translated. Thank you for your committed support! Finally, I’d just like to show the invoice icon among the icons legends as this is the only one left to display. In particular I mean this icon: |
Hi, It looks like when we introduced the invoice link, we overlooked making an addition for the legend. We will get that added and this will be available as a one-click update for the next version of the WP user integration add-on — |
|
The support post ‘Translation of [ESPRESSO_MY_EVENTS] sublines’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.