Move to maketext: sample templates
Teemu Mannermaa
tm at sci.fi
Mon Jan 19 10:43:31 UTC 2009
On 18.1.2009 2:48, Vitaly Fedrushkov wrote:
> <a href="editusers.cgi?action=edit&userid=
> [%- otheruser.id FILTER url_quote %]"
> title="Edit user '[% otheruser.login FILTER html %]'">Edit this user</a>
From all the examples you show, I don't understand why you want to
translate the HTML link tag. Somebody really wants to translate the HTML
code and not just the english strings that are actually visible to user?
I would like to see something simple like this:
<a href="editusers.cgi?action=edit&userid=
[%- otheruser.id FILTER url_quote %]"
title="[% l("Edit user '$1'", filter($otheruser.login, "html")) %]">[%
l("Edit this user") %]</a>
Could something like that work? It's similar to your variant 1.2 but
much more simplified. Also our filter test still needs to protect us
from unfiltered variables.
I'd think this syntax actually improves readability of templates.
Especially parameterized texts would be clearly visible. As are
translated text. Correct usage should also be simple to verify during a
review.
> [% |l("<a href=\"editusers.cgi?action=edit&userid=" _
These quoted quotation marks are not a good idea in any case. I do hope
one can use apostrophes for the outermost quoting to get rid of these..
Otherwise I could pretty much echo what LpSolit said. :)
--
"Anything is possible but probabilities vary."
"Whatever. Life goes on." -Dark Angel
More information about the developers
mailing list