﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc
517,i18n filter works on attributes it doesn't need to,craig@…,cmlenz,"The i18n filter is currently set to run over the following attributes:
{{{
INCLUDE_ATTRS = frozenset([
        'abbr', 'alt', 'label', 'prompt', 'standby', 'summary', 'title'
    ])
}}}

The current code in place checks to see if the keys of BaseString based values are in the set, however ignores this set when there is dynamic content in the value.  I have a suggested patch:
http://paste.pocoo.org/show/568848/

The two main changes are as follows:
1.  Pay attention to the variable {{{translate_attrs}}} passed into the {{{__call__}}} function.
2.  Always check to ensure that the attribute name is one that should be worked on regardless of the type of the value.  This in our load of 

For example the following currently is true:

This would only attempt to translate title.  href and rel are ignored.  This is correct.
{{{<a href=""http://www.google.com"" title=""Hello"" rel=""external"">Googs</a>}}}

If the values are dynamic, href, title and rel are all checked (recursively, even though the i18n filter never does anything with them.
{{{<a href=""${google_url}"" title=""Hello"" rel=""${'external'}"">Googs</a>}}}

In this example I am running our web page hit 10 times:
http://paste.pocoo.org/show/568849/

Again the more dynamic valued attributes you have the more performance penalty you pay.

I plan to submit a benchmark example that shows this in more detail. ",defect,new,minor,0.9,Internationalization,0.6,,i18n,
