T8 Filter für Templates und Anwendungsbeispiel _payments
[kivitendo-erp.git] / scripts / templ2t8.pl
diff --git a/scripts/templ2t8.pl b/scripts/templ2t8.pl
new file mode 100755 (executable)
index 0000000..f1e5bf6
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/perl -pli.orig
+
+#
+# template converter -> T8 converter
+#
+# wanna get rid of those <translate> tags?
+# no problem. use this script to fix most it.
+#
+# use: perl tmpl2t8.pl <file>
+#
+# will save the original file as file.orig
+#
+s/$/[% USE T8 %]/ if $. == 1;
+s/<translate>([^<]+)<\/translate>/[%- '$1' | \$T8 %]/xg;