Right now, the string-loader supports setting .text() (via .string[data-string]) and .html() (via .string-html[data-string-html]) and .attr('title') (via .string-title[data-string-title]).
For #94, I want to add a localized placeholder attribute to the search bar.
Instead of adding a new special .string-placeholder class here, it would be better to normalize this as follows:
All .string elements get the same treatment.
If there is a data-string attribute, the corresponding string becomes their inner text.
For every data-string-(.*) attribute, the corresponding string becomes their $1 attribute.
.string-html is still a special case, but the data attribute is renamed to data-string to keep the attribute namespace compact.
Right now, the string-loader supports setting
.text()
(via.string[data-string]
) and.html()
(via.string-html[data-string-html]
) and.attr('title')
(via.string-title[data-string-title]
).For #94, I want to add a localized
placeholder
attribute to the search bar.Instead of adding a new special
.string-placeholder
class here, it would be better to normalize this as follows:.string
elements get the same treatment.data-string
attribute, the corresponding string becomes their inner text.data-string-(.*)
attribute, the corresponding string becomes their$1
attribute..string-html
is still a special case, but the data attribute is renamed todata-string
to keep the attribute namespace compact.