Support

Home Forums Translations Calendar french translation

Calendar french translation

Posted: March 31, 2014 at 8:24 am

Viewing 8 reply threads


Michel Leprêtre

March 31, 2014 at 8:24 am

HI !
I am setting up EE + Calendar on my french website, and need a fully translated front end. I am rewieing and completing the fr_FR translation with GlotPress.
1/ Some original strings are in… spanish ! Eg:
# 2362 : Información de Facturación
# 2700 : Número de Identificación
Please, reset all original strings !

2/ Week and day Calendar views display the : all-day string and hours are 12h format (10am…). Needing to change the string and hour format I have edited fullcalendar.min.js and it’s OK !
Is there a better way to do that (to avoid problems in case of updates) ?

3/ Some strings, specially in calendar’s tooltip can’t be translated : they do not appear in GlotPress. I have edited espresso-calendar.php and hardcoded the translation.
But I assume that :
$events[ $cntr ]['tooltip'] .= $show_time && $startTime ? '<p class="time_cal_qtip">' . __('Event Time: ', 'event_espresso') . $startTime . ' - ' . $endTime . '</p>' : '';
means : replace the string “Event Time: ” by the one in the fr_FR .mo file ?
But all occurences of this string have been translated in GP !
Best regards,
Michel Leprêtre


Dean

April 1, 2014 at 3:08 am

Hi,

1) We can’t do that as it will reset all the 2000 or so translated strings. However if you see any incorrect strings, feel free to modify the translations in Glotpress.

2) Thanks for the feedback. I’ll raise a ticket for this to be looked into in future versions.

3) There should be no need to modify the javascript here. The strings are already translatable. However the EE3 language packs are outdated and we have a ticket raised to update them. In the mean time you could add the strings directly to the PO file via text editor and then save the PO file in Poedit (a free application) which will also generate an up to date MO file.


Michel Leprêtre

April 1, 2014 at 8:58 am

Dear Dean,
Thanks for your reply.

1/ I mean some ORIGINAL STRINGS (supposed to be in english) are in spanish.
Eg editing the .po file :
#: ../../../plugins/event-espresso/gateways/megasoft/payment.php:31
msgid “Información de Facturación”
msgstr “Information de facturation”

2/ Thanks, CLOSED !

3/ At least I have corrected 2 coding errors espresso-calendar.php :
__(‘Event Time: ‘, ‘event_espresso’) >> __(‘Event Time’, ‘event_espresso’) . ” : ”
__(‘Registration Closed’, ‘event_espresso’) >> __(‘REGISTRATION CLOSED’, ‘event_espresso’)
Now, it works fine ! As some strings do not translate in back office, I guess this come from the same reason.
I’m wating for next release !
CLOSED

4/ I have a new problem with translations in Pdf invoices : it appears that no string is translated, while translations exist in .mo file.
Modifing __(‘Amount Paid:’, ‘event_espresso’) by ‘Montant réglé :’ I get a char encoding error : Montant réglé : on Pdf.
And the Date use english month names : 1 April 2014
Any suggestion to fix both problems (doing B to B I need clean invoices!) ?

Thanks for all !
Michel Leprêtre


Dean

April 2, 2014 at 4:18 am

Hi,

1) Sorry for my misunderstanding! OK, those strings are correct. They are for a Venezuelan payment gateway, so they need to be in Spanish.

2) OK

3) OK

4) We are aware of some encoding issues with the invoice translations. We have an outstanding ticket for it, but this forum thread may help https://eventespresso.com/topic/invoice-localization-php-file/

It may also be worth considering moving over to EE4, as it has a better invoice.


Michel Leprêtre

April 2, 2014 at 5:43 am

Hi !
1/ OK !!!
4/ I will have a look to the topic !
5/ I had to modify also : paypal_vars.php in PayPal gateway to translate ‘ for ‘ & ‘. Attendee: ‘ item_name_1 parameter to display a french text in PP interface. i should be nice to internationalize these strings in next release !
6/ I noticed that in General settings > Add a Default Logo, the upload button does not work in french, swtiching to english it’s OK
Best regards
Michel Leprêtre


Michel Leprêtre

April 2, 2014 at 5:47 am

Hi Dean,
I can’t use EE4 because I’m requiring Calendar & Recuring Events that are not compatible with EE4
Thanks


Michel Leprêtre

April 2, 2014 at 6:25 am

One more point : should be nice to internationalize the ‘Pay Online’ string, line 214 in gateways/invoice/template.php
Thanks


Dean

April 4, 2014 at 2:14 am

Hi,

Thanks for the feedback, I’ve made a note regarding these missing translations!


Michel Leprêtre

April 4, 2014 at 2:19 am

Hi Dean,
The link was usefull.
In custom_functions.php I solved the translation pb with :

function mycustom_filter_gettext( $translated, $original, $domain ) {
// This is an array of original strings
// and what they should be replaced with
$strings = array(
'Bill To: ' => utf8_decode('Facturé à : '), /// Use utf8_decode to avoid problems with accentuated chars
// More strings
);
// See if the current string is in the $strings array
// If so, replace it's 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;
}
add_filter( 'gettext', 'mycustom_filter_gettext', 10, 3 );

And to get the months names translated, I made some changes in /gateways/invoice/template.php :

/// Array added to get local names for months
$mois = array("","Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre");
$datefr = $jour[date("w")]." ".date("d")." ".$mois[date("n")]." ".date("Y");
// Changed line 115 :
// $pdf->Cell(180, 0, __('Date: ', 'event_espresso') . date(get_option('date_format')), 0, 1, 'R');
$pdf->Cell(180, 0, __('Date: ', 'event_espresso') . $datefr, 0, 1, 'R'); /// Set french invoice date

Thanks,
Michel

Viewing 8 reply threads

The support post ‘Calendar french translation’ 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