Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    Hey there,

    I realized that this is a missing feature, WordPress supports translation of common date names https://codex.www.ads-software.com/Function_Reference/date_i18n but the plugin is using date() instead of date_i18n – I will have it fixed for the next release

    as for other updates to the translation, these are mostly welcome
    are you familiar with https://poedit.net/ ?

    if you see strings (other than months, it’ll be automatic) that you need to correct for French, you can edit the translation files and issue a request to https://github.com/pderksen/WP-Google-Calendar-Events/tree/master/google-calendar-events/languages

    thanks ??

    Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    Hi again

    I went through the code and I think date_i18 is being used already when necessary – where exactly (in the grid? list?) you saw the months appearing in English instead of French? When WordPress switches to French language, it should pick months in French…

    Hi Fulvio Notarstefano,

    I am having the same problem with translation and was told that “hey it wasn’t like this before”.

    The English version of the calender is fine.
    Now, if you switch to French version of the page, first it’s alright. But when you click on “Préc” or “Suiv” the calender becomes English.

    See demo.

    Thanks.

    Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    Hi

    I could not replicate the issue so far – the buttons show in the right locale for me even when cycling pages; the french locale file also seems ok

    but I’m trying to figure out what might be breaking things
    perhaps it was a filter on prev/next buttons that I think was placed there to allow people to change the text (but when it’s done, it means the person doing so also needs to write their own translation)

    check if you are not using in your theme filters called
    gce_prev_text and gce_next_text

    you can then try downloading this version of the 2.2.6 plugin: https://github.com/pderksen/WP-Google-Calendar-Events/archive/fulvio-prevnext-i18n.zip (note: the plugin is inside the folder google-calendar-events inside the archive)

    Refresh your caches after you have copied this version (I think you can safely overwrite your existing version since it only makes a tiny change, but just in case make a backup if you are not doing this on a local machine)

    please let me know if it works out or if you were running those filters by any chance

    Hi,

    Thanks for your time. I checked our calendar settings…I’m pretty sure we are not translating months and days manually, neither we are using custom filters for gce_prev_text/gce_next_text.

    I applied your update, cleared feed cache and browser cache but the problem still persists.

    1. I was thinking, if we could find another bilingual website where this problem doesn’t exist then it would mean a particular sequence of code execution on our site is causing this. But then again, simplemediaca^ said the French translation is not happening on his site. He didn’t say the calender doesn’t show French at all or not, for me it shows French until you switch months.

    2. I am using QTranslate….it’s a headache. May be the localization file for QTranslate is overriding all translations from Google Calendar? I disabled the French language file in QTranslate but still the same.

    The thing is, it knows the language is French but when you switch month, that piece of information is reset. Using QTranslate’s qtrans_getLanguage(); I could force php-calendar.php in GCal the current language, but that’s not a good solution in terms of future updates. You might want to see this php-calendar.php, it was used as a patch for the same issue in an older version of GCal.

    Thanks again. I’ll let you know if I find out the fix.

    Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    Hi there,

    thanks for helping to sort this out

    I think it might have to do either with the filter being applied to the buttons or to the way the ajax refreshes calendar pages (in php-calendar.php see L45, L46). Please try out the branched version I linked in my previous post. It contains edits to remove the filters to the buttons names.

    Hi,

    I guess the change is the php-calendar.php file only? I replaced that file from the branched version; then cleared plugin and browser cache, but still same problem. Does that mean it’s not really those filter definitions? My guess is it’s the AJAX call, which doesn’t restore language parameter when it refreshes the calendar.

    I plan to analyze the button click and AJAX call. Will let you know if I find something interesting.

    Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    yeah, probably is the ajax call, the filter was mostly a tentative guess, I need to check if those strings are passed in localize script correctly

    currently rewriting this plugin from scratch (maintaining backwards compatibility) and at some point I will address the ajax issues as well – it will take some time though (current branch ‘refactor’ on github, but it’s coming nicely)

    if I can fix current bugs quickly I will patch the current plugin

    so if you have any finding I will definitely push the changes if they work, thanks

    Having the same issue. Just adding myself to receive follow-up posts
    thanks

    Plugin Contributor Fulvio Notarstefano

    (@nekojira)

    2.2.7 has an updated French translations file, could you all check if the issue is solved with that please?

    If you are asking if the reverting to English on cycling pages (previous/next month) is resolved. Sorry, no. I am still seeing the problem (That the display reverts to English).
    thanks

    Thread Starter simplemediaca

    (@simplemediaca)

    Hi Fulvio!

    Thanks for your help on this! Also ashpriom fro contributing!

    Sorry I wasn’t in earlier I was gone on vacation. I performed the plugin update and cleared my cache and the problem still persists

    Here’s the link where you can experience the problem https://russelldome.worryfreeweb.ca/fr/evenements/ just click Suiv. and the month will change from Aout to September.

    We use WPML as the site translator but there is nothing that was translated for your plugin through WPML.

    Any other details needed let me know.

    Thanks!

    Hi Fulvio,

    Same here. I did the update and cleared cache but the problem is still there. You can see it in action here. I can give you access if you want.

    The way I see it, it’s a compatibility issue with other language plugins like WPML and Qtranslate. I am thinking how does the calendar know the current language “after” it makes the AJAX call to switch months? Because I am using Qtranslate and the current language slug is “fr”, but the problem is it won’t be same for all other plugins…it could be something like “Fr” or “French”. So I see this as a compatibility issue with other plugins.

    Thanks for the update. If I find out anything I will post here.

    P.S. thanks @simplemediaca

    Hi all,

    I can confirm that this is indeed a plugin compatibility issue. I am migrating from Qtranslate to Polylang, finally, and with Polylang the French version of the calendar works fine. You can see here

    There is an option in Polylang to enable/disable translation of Google Calendar Events. I have it enabled in my settings.

    Thread Starter simplemediaca

    (@simplemediaca)

    Nice find ashpriom! Sadly moving to Polylang (which I know works well for bilingual site) is not an option as we have to stick with WPML.

    I might have to get one of my team to custom tweak the calendar code.

    Cheers

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Language files’ is closed to new replies.