Support

Home Forums Event Espresso Premium Missing strings – translate

Missing strings – translate

Posted: June 25, 2015 at 5:43 pm


Gabriel Hernández

June 25, 2015 at 5:43 pm

I just downloaded the last version of the es_ES.po file from the GlotPress projects, i edited a lot of strings but some text don’t change and another one don’t even appear in the file.

It’s weird because some strings works perfectly, just to let you know the file is in: ../wp-content/uploads/espresso/languages/event-espresso-es_ES.mo

3 Samples of missing strings:

1- “Please note that a maximum number of 10 tickets can be purchased for this event per order.” (I already changed in the.mo file)

2.- “Goes On Sale” (Not in the .po/.mo file)

3.- “Show details +” (Not in the .po/.mo file)

Here is some images with the problems.
http://pasteboard.co/1uSqJ8vC.jpg
http://pasteboard.co/1uSshhTI.jpg

Or take a look in:
http://calidadeinocuidad.com/eventos/1er-congreso-nacional-de-calidad-e-inocuidad-alimentaria/

I also try adding this manually with code in myplugins (.php):

function mycustom_filter_gettext( $translated, $original, $domain ) {
  
    // This is an array of original strings
    // and what they should be replaced with
    $strings = array(
        'Goes On Sale' => 'Inicio de Venta',
        'show details +' => 'Ver detalles',
        // Add some more strings here
    );
  
    // See if the current string is in the $strings array
    // If so, replace its translation
    if ( isset( $strings[$original] ) ) {
        // This accomplishes the same thing as __()
        // but without running it through the filter again
        $translations = get_translations_for_domain( $domain );
        $translated = $translations->translate( $strings[$original] );
    }
  
    return $translated;
}

I hope you can help me, thanks in advance.


Dean

June 26, 2015 at 2:05 am

Hi,

The strings aren’t always obvious from the front end of the site, mainly due to programming logic. These should be the correct strings for you:

Please note that a maximum number of %d tickets can be purchased for this event per order.

Goes On Sale:

show%1$sdetails%1$s+


Gabriel Hernández

June 26, 2015 at 8:54 am

With the info you gave me i could fix 2

“Show details +” and instead “Goes On Sale:” i found the right one, “Goes On Sale” without the colon :

About the first one (*Please note that a maximum number of 10 tickets can be purchased for this event per order.) i already had that one translated but doesn’t works, also the “registration checkout”. I hope you can help me fixing this.

Live site:
http://calidadeinocuidad.com/eventos/1er-congreso-nacional-de-calidad-e-inocuidad-alimentaria/

Do you wanna take a look on my .po files? I also translated a lot of strings missed in the file uploaded in the GlotPress projects in case you want merge it.

http://calidadeinocuidad.com/wp-content/uploads/espresso/languages/event_espresso-es_ES-po-mo.zip

Thanks.


Gabriel Hernández

June 26, 2015 at 8:56 am

I’m sorry the last post deleted the right string for the “Goes On Sale” was Goes On Sale


Lorenzo Orlando Caum

  • Support Staff

June 26, 2015 at 9:31 am

Hi there Gabriel, could you clarify on the strings that aren’t working one more time so we can help you get those working?

We’ll then take a look at importing your contributions into GlotPress.

Thanks again!


Lorenzo


Gabriel Hernández

June 26, 2015 at 9:38 am

Sure

The first one is the stripg: Please note that a maximum number of %d tickets can be purchased for this event per order. and i already translated, check it in this image marked in yellow: http://pasteboard.co/1uSqJ8vC.jpg

The second one is “Registration Checkout” marked in blue in this image: http://pasteboard.co/1vTfbUMY.jpg

Thanks for your time.


Gabriel Hernández

June 26, 2015 at 11:31 am

About the string “Registration Checkout” wasn’t in the languages files. I just change the title page of the Registration Checkout page in the Event Espresso-General Settings under the Critical Pages Tab.

Image: http://pasteboard.co/1w0xLfYg.jpg

I’m Sorry, i didn’t see it.

I just have problem with the string: Please note that a maximum number of %d tickets can be purchased for this event per order. i know if that should be changed in the languages files but doesn’t works.

THANKS AGAIN.


Lorenzo Orlando Caum

  • Support Staff

June 26, 2015 at 2:04 pm

Hello, there is a filter available for that messaging. Could you give that a try?

https://gist.github.com/lorenzocaum/38baf9ceb1188185187d


Lorenzo


Gabriel Hernández

June 26, 2015 at 3:41 pm

I just tried and doesn’t works… The text disappears.

http://calidadeinocuidad.com/eventos/1er-congreso-nacional-de-calidad-e-inocuidad-alimentaria/


Lorenzo Orlando Caum

  • Support Staff

June 29, 2015 at 11:08 am

Hi, I spotted a typo and corrected it. Could you try again?

https://gist.github.com/38baf9ceb1188185187d


Lorenzo


Gabriel Hernández

June 29, 2015 at 11:25 am

Thanks Lorenzo, partially works. The problem is the number of tickets code. Don’t show the number variable, the code appears in the frontpage, i mean: number of %1$d tickets i also tried with the original code number of %$ tickets

Just to let you know i found another strings missed in the .PO files, even in the english one. I think is because are from the last multiple event plugin.

This is the list of them:

  • Return to Event Cart
  • Return to Event List
  • Proceed to Registration
  • empty Event Cart
  • update Event Cart
  • The Event Cart is empty

Thanks so much for your patience.


Lorenzo Orlando Caum

  • Support Staff

June 30, 2015 at 9:48 am

Alright Gabriel, this solution should definitely work:

https://gist.github.com/38baf9ceb1188185187d

The new strings are for the multiple event registration add-on. Have you recently merged your language file with the source file on GlotPress?

If not, could you share the latest version of your translation file and I’ll merge that into GlotPress for you?


Lorenzo


Gabriel Hernández

June 30, 2015 at 10:05 am

Nice, works like a charm! Thanks.

About the new string for the multiple aven add-on i tried like 4 days ago but the strings wasn’t in the file.

You can download my translations here:
http://calidadeinocuidad.com/wp-content/uploads/espresso/languages/event_espresso-es_ES2.zip

I already have 535 strings translated =)
i will let you know when i have more to share it.

Thanks so much for all your help.


Lorenzo Orlando Caum

  • Support Staff

June 30, 2015 at 11:02 am

Hello, I imported your contributions into GlotPress. Thank you!

You can download the latest version here:

http://translate.eventespresso.com/projects/event-espresso-4/es-mx/event-espresso-es_MX/export-translations

GlotPress is updated within a day or so of us releasing a maintenance release. This language file is for Event Espresso 4 core along with its add-ons.

If you are checking for the updated strings directly from the core plugin, then you would not see those strings for the Multiple Events Registration add-on.

Thanks


Lorenzo


Gabriel Hernández

July 3, 2015 at 2:51 pm

Everything works fine.

Thanks for all your help, i hope this help to somebody else.

The support post ‘Missing strings – translate’ 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.

Event Espresso