From 82f9aff6a65b1acaeec6cfde9a2848cb9cb92e03 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 17 May 2015 11:16:17 +0200 Subject: started to localize the styler plugin --- lib/plugins/styler/admin.php | 37 ++++++++++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 9 deletions(-) (limited to 'lib/plugins/styler/admin.php') diff --git a/lib/plugins/styler/admin.php b/lib/plugins/styler/admin.php index bb9426e12..bfc6cd32b 100644 --- a/lib/plugins/styler/admin.php +++ b/lib/plugins/styler/admin.php @@ -25,6 +25,15 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { return true; } + /** + * @param string $language + * @return string + */ + public function getMenuText($language) { + $js = $this->getLang('js'); + return $js['menu']; + } + /** * handle the different actions (also called from ajax) */ @@ -41,6 +50,7 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { */ public function html() { echo '
'; + ptln('

'.$this->getMenuText('').'

'); $this->form(false); echo '
'; } @@ -63,15 +73,13 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { $target = wl($ID, array('do' => 'admin', 'page' => 'styler')); } - ptln('

'.$this->getLang('menu').'

'); - if(empty($replacements)) { - echo '

Sorry, this template does not support this functionality.

'; + echo '

'.$this->getLang('error').'

'; } else { - echo '

Intro blah... for the currently active template ("'.$tpl.'")... not all variables preview...

'; + echo $this->locale_xhtml('intro'); echo '
'; - echo '

Template variables

'; + echo ''; foreach($replacements as $key => $value) { echo ''; @@ -80,11 +88,22 @@ class admin_plugin_styler extends DokuWiki_Admin_Plugin { echo ''; } echo '
'; - echo ''; - echo ''; #FIXME only if preview.ini exists - echo ''; #FIXME only if local.ini exists - echo ''; + + echo '

'; + echo ''; + echo ''; #FIXME only if preview.ini exists + echo '

'; + + echo '

'; + echo ''; + echo '

'; + + echo '

'; + echo ''; #FIXME only if local.ini exists + echo '

'; + echo '
'; + } } -- cgit v1.2.3