From 4a778400790148873f7f17dd7df42ca018b60e36 Mon Sep 17 00:00:00 2001 From: Esther Brunner Date: Wed, 22 Mar 2006 15:05:25 +0100 Subject: changes to config plugin needed for template and plugin configuration darcs-hash:20060322140525-283c4-54953a1954beba0e78c896610b33a6f3c953cbb6.gz --- lib/plugins/config/admin.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'lib/plugins/config/admin.php') diff --git a/lib/plugins/config/admin.php b/lib/plugins/config/admin.php index 05e4a8029..5b44dece5 100644 --- a/lib/plugins/config/admin.php +++ b/lib/plugins/config/admin.php @@ -184,14 +184,12 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { } - function _setup_localised_plugin_prompts() { + function _setup_localised_plugintpl_prompts() { global $conf; $langfile = '/lang/'.$conf[lang].'/settings.php'; $enlangfile = '/lang/en/settings.php'; - $lang = array(); - if ($dh = opendir(DOKU_PLUGIN)) { while (false !== ($plugin = readdir($dh))) { if ($plugin == '.' || $plugin == '..' || $plugin == 'tmp' || $plugin == 'config') continue; @@ -208,7 +206,19 @@ class admin_plugin_config extends DokuWiki_Admin_Plugin { } closedir($dh); } - + + // the same for the active template + $tpl = $conf['template']; + + if (@file_exists(DOKU_TPLINC.$enlangfile)){ + $lang = array(); + @include(DOKU_TPLINC.$enlangfile); + if ($conf['lang'] != 'en') @include(DOKU_TPLINC.$langfile); + foreach ($lang as $key => $value){ + $this->lang['tpl'.CM_KEYMARKER.$tpl.CM_KEYMARKER.$key] = $value; + } + } + return true; } -- cgit v1.2.3