From 73eb979635fcb7ed8863b4fa7b1ad5fc595f895f Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 2 Oct 2008 00:30:34 +0000 Subject: [PATCH] - the optim option conf['compiled_template_cache_language'] works better git-svn-id: http://piwigo.org/svn/trunk@2636 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/template.class.php | 3 +++ template/yoga/menubar_identification.tpl | 6 +++--- template/yoga/menubar_links.tpl | 2 +- template/yoga/menubar_specials.tpl | 2 +- template/yoga/menubar_tags.tpl | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/template.class.php b/include/template.class.php index 382071e7a..8ed354f7f 100644 --- a/include/template.class.php +++ b/include/template.class.php @@ -405,6 +405,9 @@ class Template { $regex = "~$ldq *\'([^'$]+)\'\|@translate\|~"; $source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? \'{\'.var_export($lang[\'$1\'],true).\'|\' : \'$0\'', $source); + $regex = "~($ldq *assign +var=.+ +value=)\'([^'$]+)\'\|@translate~e"; + $source = preg_replace( $regex, 'isset($lang[\'$2\']) ? \'$1\'.var_export($lang[\'$2\'],true) : \'$0\'', $source); + return $source; } } diff --git a/template/yoga/menubar_identification.tpl b/template/yoga/menubar_identification.tpl index 49d2732a9..1cb219cd4 100644 --- a/template/yoga/menubar_identification.tpl +++ b/template/yoga/menubar_identification.tpl @@ -1,4 +1,4 @@ -
{$block->get_title()|@translate}
+
{'identification'|@translate}
{if isset($USERNAME)}

{'hello'|@translate} {$USERNAME} !

@@ -41,9 +41,9 @@ {if $AUTHORIZE_REMEMBERING} -
{$block->get_title()|@translate}
+
{'Links'|@translate}