From 6ae0339352c9013eac9cd38d36164fb6353c8a65 Mon Sep 17 00:00:00 2001 From: pjaudiomv Date: Sat, 6 Apr 2019 10:36:39 -0400 Subject: [PATCH] adding danish support --- bmlt-meeting-list.php | 38 +++++++++++++++++++++++++----------- partials/_meetings_setup.php | 5 +++-- readme.txt | 7 +++++-- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/bmlt-meeting-list.php b/bmlt-meeting-list.php index 49d86e2..0f9f65d 100644 --- a/bmlt-meeting-list.php +++ b/bmlt-meeting-list.php @@ -4,7 +4,7 @@ Plugin URI: http://wordpress.org/extend/plugins/bread/ Description: Maintains and generates a PDF Meeting List from BMLT. Author: odathp, radius314, pjaudiomv, klgrimley, jbraswell -Version: 1.9.5 +Version: 1.9.6 */ /* Disallow direct access to the plugin file */ use Mpdf\Mpdf; @@ -206,7 +206,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Dim / Sun' : "Dimanche / Sunday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Sön" : "Söndag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "Sø" : "Søndag"); + } } elseif ( $day == 2 ) { if ( $language == 'en' || $language == 'en' ) { $data = ($abbreviate ? 'Mon' : "Monday"); @@ -224,7 +226,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Lun / Mon' : "Lundi / Monday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Mån" : "Måndag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "Ma" : "Mandag"); + } } elseif ( $day == 3 ) { if ( $language == 'en' || $language == 'en' ) { $data = ($abbreviate ? 'Tue' : "Tuesday"); @@ -242,7 +246,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Mar / Tues' : "Mardi / Tuesday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Tis" : "Tisdag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "Ti" : "Tirsdag"); + } } elseif ( $day == 4 ) { if ( $language == 'en' || $language == 'en' ) { $data = ($abbreviate ? 'Wed' : "Wednesday"); @@ -260,7 +266,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Mer / Wed' : "Mercredi / Wednesday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Ons" : "Onsdag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "On" : "Onsdag"); + } } elseif ( $day == 5 ) { if ( $language == 'en' || $language == 'en' ) { $data = ($abbreviate ? 'Thu' : "Thursday"); @@ -278,7 +286,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Jeu / Thu' : "Jeudi / Thursday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Tors" : "Torsdag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "To" : "Torsdag"); + } } elseif ( $day == 6 ) { if ( $language == 'en' || $language == 'en' ) { $data = ($abbreviate ? 'Fri' : "Friday"); @@ -296,7 +306,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Ven / Fri' : "Vendredi / Friday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Fre" : "Fredag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "Fr" : "Fredag"); + } } elseif ( $day == 7 ) { if ( $language == 'en' || $language == 'en' ) { $data = ($abbreviate ? 'Sat' : "Saturday"); @@ -314,7 +326,9 @@ function getday( $day, $abbreviate = false, $language = '') { $data = ($abbreviate ? 'Sam / Sat' : "Samedi / Saturday"); } elseif ( $language == 'se') { $data = ($abbreviate ? "Lör" : "Lördag"); - } + } elseif ( $language == 'dk') { + $data = ($abbreviate ? "Lø" : "Lørdag"); + } } Return utf8_encode($data); @@ -1000,9 +1014,11 @@ function bmlt_meeting_list($atts = null, $content = null) { if ( $this->options['weekday_language'] === 'fr' ) { $cont = '(suite)'; } else if ( $this->options['weekday_language'] === 'se' ) { - $cont = '(forts)'; - } else { - $cont = '(cont)'; + $cont = '(forts)'; + } else if ( $this->options['weekday_language'] === 'dk' ) { + $cont = '(forts)'; + } else { + $cont = '(cont)'; } if ( $this->options['page_fold'] !== 'full' ) { diff --git a/partials/_meetings_setup.php b/partials/_meetings_setup.php index 88a5ef9..72768db 100644 --- a/partials/_meetings_setup.php +++ b/partials/_meetings_setup.php @@ -97,14 +97,15 @@

"English", "fr" => "French", "po" => "Portuguese", "both" => "English/Spanish", "both_po" => "English/Spanish/Portuguese", "fr_en" => "French/English", - "se" => "Swedish" + "se" => "Swedish", + "dk" => "Danish" ]; ?>
diff --git a/readme.txt b/readme.txt index 09e10c8..45b47b1 100644 --- a/readme.txt +++ b/readme.txt @@ -4,8 +4,8 @@ Contributors: odathp, radius314, pjaudiomv, klgrimley, jbraswell Tags: meeting list, bmlt, narcotics anonymous, na Requires at least: 4.0 Requires PHP: 5.6 -Tested up to: 5.1 -Stable tag: 1.9.5 +Tested up to: 5.1.1 +Stable tag: 1.9.6 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html A web-based tool that creates, maintains and generates a PDF meeting list from BMLT. @@ -54,6 +54,9 @@ Follow all these steps, keep in mind that once you start using bread, it's not g == Changelog == += 1.9.6 = +* Added support for Danish. + = 1.9.5 = * Removed most TrueType Fonts to cut down size considerably.