Bugzilla – Attachment 76934 Details for
Bug 20988
[OMNIBUS] Internationalization: wrap all translatable text inside t() calls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20988: Add template macros to ease template rewriting
Bug-20988-Add-template-macros-to-ease-template-rew.patch (text/plain), 3.02 KB, created by
Julian Maurice
on 2018-07-13 08:29:36 UTC
(
hide
)
Description:
Bug 20988: Add template macros to ease template rewriting
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-07-13 08:29:36 UTC
Size:
3.02 KB
patch
obsolete
>From 18d34956e3104f391d2560064bb5fcd984edfe7d Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 13 Jul 2018 01:20:30 +0200 >Subject: [PATCH] Bug 20988: Add template macros to ease template rewriting > >--- > .../intranet-tmpl/prog/en/includes/i18n.inc | 66 +++++++++++++++++++ > .../opac-tmpl/bootstrap/en/includes/i18n.inc | 66 +++++++++++++++++++ > 2 files changed, 132 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/i18n.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/i18n.inc >index 4b5da9231b..b9fdf1b03c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/i18n.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/i18n.inc >@@ -37,3 +37,69 @@ > I18N.tnpx(msgctxt, msgid, msgid_plural, count, vars); > END; > %] >+ >+[% >+ MACRO html(s) BLOCK; >+ FILTER html; >+ s; >+ END; >+ END; >+ >+ MACRO html_entity(s) BLOCK; >+ FILTER html_entity; >+ s; >+ END; >+ END; >+ >+ MACRO html_line_break(s) BLOCK; >+ FILTER html_line_break; >+ s; >+ END; >+ END; >+ >+ MACRO url(s) BLOCK; >+ FILTER url; >+ s; >+ END; >+ END; >+ >+ MACRO collapse(s) BLOCK; >+ FILTER collapse; >+ s; >+ END; >+ END; >+ >+ MACRO format(s, fmt) BLOCK; >+ FILTER format(fmt); >+ s; >+ END; >+ END; >+ >+ MACRO HtmlTags(s) BLOCK; >+ USE HtmlTags; >+ FILTER $HtmlTags tag=tag attributes=attributes; >+ s; >+ END; >+ END; >+ >+ MACRO Price(s) BLOCK; >+ USE Price; >+ FILTER $Price; >+ s; >+ END; >+ END; >+ >+ MACRO KohaDates(s) BLOCK; >+ USE KohaDates; >+ FILTER $KohaDates with_hours=with_hours as_due_date=as_due_date; >+ s; >+ END; >+ END; >+ >+ MACRO KohaSpan(s) BLOCK; >+ USE KohaSpan; >+ FILTER $KohaSpan class=class; >+ s; >+ END; >+ END; >+%] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/i18n.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/i18n.inc >index 4b5da9231b..b9fdf1b03c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/i18n.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/i18n.inc >@@ -37,3 +37,69 @@ > I18N.tnpx(msgctxt, msgid, msgid_plural, count, vars); > END; > %] >+ >+[% >+ MACRO html(s) BLOCK; >+ FILTER html; >+ s; >+ END; >+ END; >+ >+ MACRO html_entity(s) BLOCK; >+ FILTER html_entity; >+ s; >+ END; >+ END; >+ >+ MACRO html_line_break(s) BLOCK; >+ FILTER html_line_break; >+ s; >+ END; >+ END; >+ >+ MACRO url(s) BLOCK; >+ FILTER url; >+ s; >+ END; >+ END; >+ >+ MACRO collapse(s) BLOCK; >+ FILTER collapse; >+ s; >+ END; >+ END; >+ >+ MACRO format(s, fmt) BLOCK; >+ FILTER format(fmt); >+ s; >+ END; >+ END; >+ >+ MACRO HtmlTags(s) BLOCK; >+ USE HtmlTags; >+ FILTER $HtmlTags tag=tag attributes=attributes; >+ s; >+ END; >+ END; >+ >+ MACRO Price(s) BLOCK; >+ USE Price; >+ FILTER $Price; >+ s; >+ END; >+ END; >+ >+ MACRO KohaDates(s) BLOCK; >+ USE KohaDates; >+ FILTER $KohaDates with_hours=with_hours as_due_date=as_due_date; >+ s; >+ END; >+ END; >+ >+ MACRO KohaSpan(s) BLOCK; >+ USE KohaSpan; >+ FILTER $KohaSpan class=class; >+ s; >+ END; >+ END; >+%] >-- >2.17.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20988
:
76333
|
76334
|
76335
|
76336
|
76337
|
76338
|
76339
|
76340
|
76341
|
76342
|
76343
|
76344
|
76345
|
76346
|
76347
|
76348
|
76349
|
76350
|
76351
|
76352
|
76353
|
76354
|
76355
|
76356
|
76357
|
76358
|
76359
|
76360
|
76361
|
76362
|
76363
|
76364
|
76365
|
76934
|
76935