[debian-edu-commits] debian-edu/pkg-team/ 01/01: debian/patches: Add 1013_fix-smarty-gettext-tags-recognition.patch. Fix rendering of .tpl files that contain parameterized {t} blocks.

Mike Gabriel sunweaver at debian.org
Tue Sep 1 11:49:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

sunweaver pushed a commit to branch master
in repository gosa.

commit 2f28452613aa254eae65681c034882cccb43c20c
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Sep 1 13:48:30 2015 +0200

    debian/patches: Add 1013_fix-smarty-gettext-tags-recognition.patch. Fix rendering of .tpl files that contain parameterized {t} blocks.
---
 .../1013_fix-smarty-gettext-tags-recognition.patch      | 17 +++++++++++++++++
 debian/patches/series                                   |  1 +
 2 files changed, 18 insertions(+)

diff --git a/debian/patches/1013_fix-smarty-gettext-tags-recognition.patch b/debian/patches/1013_fix-smarty-gettext-tags-recognition.patch
new file mode 100644
index 0000000..1a9fdb1
--- /dev/null
+++ b/debian/patches/1013_fix-smarty-gettext-tags-recognition.patch
@@ -0,0 +1,17 @@
+Description: Correctly recognize smarty-gettext parameters in {t} blocks
+Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+Abstract:
+ Also make {t} blocks translatable that contain parameters, e.g.
+ {t escape=no}{/t}, {t 1=<phpcode>}Translate %1{/t}, etc.
+
+--- a/gosa-core/update-locale
++++ b/gosa-core/update-locale
+@@ -19,7 +19,7 @@
+ 
+   for template in $(find . -name '*.tpl'); do
+     echo "* converting .tpl files: $(basename $template)"
+-    sed -e 's/{t}/<?php $t= _("/g;s!{/t}!");?>!g' $template > $template.new
++    sed -re 's!\{t(|\ [a-z0-9]+=.*)\}(.*)\{/t\}!<?php $t=_("\2{/t}!g;s!\{/t\}!");?>!g' $template > $template.new
+     mv $template.new $template
+   done
+ 
diff --git a/debian/patches/series b/debian/patches/series
index a9e8c56..1ebcc0f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -20,3 +20,4 @@
 2003_fix-class-mapping.patch
 2004_fix-locale-location.patch
 2005_allow-Debian-blends-to-override-gosa-conf.patch
+1013_fix-smarty-gettext-tags-recognition.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/pkg-team/gosa.git



More information about the debian-edu-commits mailing list