From d083ea15078e5be43d2dc7d736d8880ce99b648c Mon Sep 17 00:00:00 2001 From: Kenneth Newwood Date: Sun, 27 Mar 2016 21:01:23 +0200 Subject: [PATCH] Fixed translation and updated tags plugin Instead of the default string $Language->get($string) previously returned an empty string, breaking the default translation behaviour of all default plugins except the tags plugin (which was fixed in the course of the change). --- bl-kernel/dblanguage.class.php | 2 +- bl-plugins/tags/languages/de_DE.json | 6 +++++- bl-plugins/tags/languages/en_US.json | 6 +----- bl-plugins/tags/plugin.php | 6 ++++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/bl-kernel/dblanguage.class.php b/bl-kernel/dblanguage.class.php index bc56f866..7b219e7b 100644 --- a/bl-kernel/dblanguage.class.php +++ b/bl-kernel/dblanguage.class.php @@ -48,7 +48,7 @@ class dbLanguage extends dbJSON return $this->db[$key]; } - return ''; + return $string; } // Returns translation. diff --git a/bl-plugins/tags/languages/de_DE.json b/bl-plugins/tags/languages/de_DE.json index 86bcf65d..47f11970 100644 --- a/bl-plugins/tags/languages/de_DE.json +++ b/bl-plugins/tags/languages/de_DE.json @@ -3,5 +3,9 @@ { "name": "Anzeige aller Schlagwörter", "description": "Anzeige aller Schlagwörter in der Seitenleiste (bei Themes mit Seitenleiste)." - } + }, + "sort-the-tag-list-by": "Sortierung der Schlagwörter nach", + "alphabetical-order": "Alphabetische Reihenfolge", + "number-of-times-each-tag-has-been-used": "Anzahl der Verwendung", + "date-each-tag-was-first-used": "Datum der ersten Verwendung" } \ No newline at end of file diff --git a/bl-plugins/tags/languages/en_US.json b/bl-plugins/tags/languages/en_US.json index f9bedee0..292368be 100644 --- a/bl-plugins/tags/languages/en_US.json +++ b/bl-plugins/tags/languages/en_US.json @@ -3,9 +3,5 @@ { "name": "Tags list", "description": "Shows all tags." - }, - "tag-sort-order": "Sort the tag list by", - "tag-sort-alphabetical": "Alphabetical order", - "tag-sort-count": "Number of times each tag has been used", - "tag-sort-date": "Date each tag was first used" + } } diff --git a/bl-plugins/tags/plugin.php b/bl-plugins/tags/plugin.php index 41281fd9..978fbd64 100644 --- a/bl-plugins/tags/plugin.php +++ b/bl-plugins/tags/plugin.php @@ -20,9 +20,11 @@ class pluginTags extends Plugin { $html .= ''; $html .= '
'; - $html .= $Language->get('tag-sort-order').': '; - foreach(array('alpha'=>'tag-sort-alphabetical', 'count'=>'tag-sort-count', 'date'=>'tag-sort-date') as $key=>$value) { + foreach(array('alpha' => 'Alphabetical order', + 'count' => 'Number of times each tag has been used', + 'date' => 'Date each tag was first used') as $key=>$value) { if ($key == $this->getDbField('sort')) { $html .= ''; } else {