diff --git a/crouton.php b/crouton.php index 452d9d0..aaaa628 100644 --- a/crouton.php +++ b/crouton.php @@ -5,7 +5,7 @@ Description: A tabbed based display for showing meeting information. Author: bmlt-enabled Author URI: https://bmlt.app -Version: 3.18.5 +Version: 3.18.6 */ /* Disallow direct access to the plugin file */ if (basename($_SERVER['PHP_SELF']) == basename(__FILE__)) { @@ -1162,7 +1162,11 @@ private function getCroutonJsConfig($atts, $croutonMap = false) $params['extra_meetings'] = $extra_meetings_array; if (empty($params['meeting_details_href'])) { - $params['meeting_details_href'] = strtok($_SERVER["REQUEST_URI"], '?'); + if (empty(get_option('permalink_structure'))) { + $params['meeting_details_href'] = $_SERVER["REQUEST_URI"]; + } else { + $params['meeting_details_href'] = strtok($_SERVER["REQUEST_URI"], '?'); + } } $this->options['meeting_details_href'] = $params['meeting_details_href']; diff --git a/croutonjs/src/js/crouton-core.js b/croutonjs/src/js/crouton-core.js index 38ae4d1..ccb2fec 100644 --- a/croutonjs/src/js/crouton-core.js +++ b/croutonjs/src/js/crouton-core.js @@ -732,6 +732,10 @@ function Crouton(config) { crouton_Handlebars.registerPartial("meetingLink", self.config['meeting_link_template']); crouton_Handlebars.registerPartial("meetingModal", self.config['meeting_modal_template']); + let queryStringChar = '?'; + if (self.config.meeting_details_href) { + if (self.config.meeting_details_href.indexOf('?') >= 0) queryStringChar = '&'; + } for (var m = 0; m < meetingData.length; m++) { meetingData[m]['formatted_comments'] = meetingData[m]['comments']; var duration = meetingData[m]['duration_time'].split(":"); @@ -826,7 +830,7 @@ function Crouton(config) { if (meetingData[m]['venue_type'] === 2 && self.config.virtual_meeting_details_href ) { meetingData[m]['meeting_details_url'] = self.config.virtual_meeting_details_href; } - meetingData[m]['meeting_details_url'] += ('?meeting-id=' + meetingData[m]['id_bigint'] + meetingData[m]['meeting_details_url'] += queryStringChar + ('meeting-id=' + meetingData[m]['id_bigint'] + '&language=' + self.config.language + '&time_format=' + encodeURIComponent(self.config.time_format) + (self.config.force_rootserver_in_querystring ? '&root_server=' + encodeURIComponent(self.config.root_server) : '') diff --git a/croutonjs/src/js/crouton-localization.js b/croutonjs/src/js/crouton-localization.js index 4726c5b..56a9e9b 100644 --- a/croutonjs/src/js/crouton-localization.js +++ b/croutonjs/src/js/crouton-localization.js @@ -104,7 +104,7 @@ function CroutonLocalization(language) { 'toggle fullscreen mode': 'Umschalten Vollbildmodus', 'close': "Schliessen", 'meeting page': "Meeting Seite", - 'meeting details': "Genaueres zu Meeting" + 'meeting details': "Genaueres zum Meeting" }, "en-AU": { "days_of_the_week" : ["", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], @@ -482,7 +482,7 @@ function CroutonLocalization(language) { "city" : "Ville", "cities" : "Villes", "groups" : "Groupes", - "areas" : "CSL", + "areas" : "ASL", "regions": "Regions", "locations" : "Emplacements", "counties" : "Régions", @@ -490,18 +490,18 @@ function CroutonLocalization(language) { "postal_codes" : "Codes postaux", "formats" : "Formats", "map" : "Carte", - "neighborhood": "Neighborhood", - "near_me": "Near Me", - "text_search": "Text Search", - "click_search": "Click Search", - "pan_and_zoom": "Pan + Zoom", - "languages": "Languages", - "common_needs": "Common Needs", - "meeting_count": "Weekly Meetings:", - "venue_types": "Venue Types", + "neighborhood": "Quartier", + "near_me": "À côté de moi", + "text_search": "Recherche textuelle", + "click_search": "Recherche au clic", + "pan_and_zoom": "Panoramique + Zoom", + "languages": "Langages", + "common_needs": "Besoins", + "meeting_count": "Nombre de réunions par semaine", + "venue_types": "Types de lieux", "venue_type_choices": { - IN_PERSON: "In Person", - VIRTUAL: "Virtual", + IN_PERSON: "Physique", + VIRTUAL: "Virtuel", }, "service_body_types": { AS: "Area Service Committee", @@ -511,23 +511,23 @@ function CroutonLocalization(language) { LS: "Local Service Forum", GS: "Group Support Forum" }, - "share": "share", - 'tabular': "As table", - 'google_directions': 'Google directions to meeting', - "no_meetings_for_this_day": "No meetings for this day.", - 'css-textalign': '', - 'css-floatdirection': '', - 'all': 'All', - 'menu': "Menu", - 'search for meetings': 'Search for meetings', - 'show meetings near...': 'Show meetings near...', - 'filter meetings': 'Filter meetings', - 'visible meeting list': 'Visible meetings as list', - 'enter a city or zip code': 'Enter a city or zip code', - 'toggle fullscreen mode': 'Toggle fullscreen mode', - 'close': "Close", - 'meeting page': "Meeting Page", - 'meeting details': "Meeting Details" + "share": "Partager", + "tabular": "Liste", + "google_directions": "Itinéraire sur Google Maps", + "no_meetings_for_this_day": "Pas de réunion aujourd'hui.", + "css-textalign": "css-textalign", + "css-floatdirection": "css-floatdirection", + "all": "Tout", + "menu": "Menu", + "search for meetings": "Rechercher des réunions", + "show meetings near...": "Afficher les réunions près de...", + "filter meetings": "Filtrer les réunions", + "visible meeting list": "Liste des réunions visibles", + "enter a city or zip code": "Entrer une ville ou un code postal", + "toggle fullscreen mode": "Basculer en mode plein écran", + "close": "Fermer", + "meeting page": "Page de la réunion", + "meeting details": "Détails de la réunion" }, "it-IT": { "days_of_the_week" : ["", "Domenica", " Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], diff --git a/readme.txt b/readme.txt index d1f39be..b0e197e 100644 --- a/readme.txt +++ b/readme.txt @@ -5,7 +5,7 @@ Tags: na, meeting list, meeting finder, maps, recovery, addiction, webservant, b Requires at least: 4.0 Required PHP: 8.0 Tested up to: 6.4.2 -Stable tag: 3.18.5 +Stable tag: 3.18.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html crouton implements a Tabbed UI for BMLT. @@ -36,6 +36,10 @@ https://demo.bmlt.app/crouton == Changelog == += 3.18.6 = +* French translation. +* Correctly handle links when default permalinks are used. + = 3.18.5 = * Assure croutonMap object created. * Add meetingCount and groupCount methods for backwards compatibility in non-wordpress cases.