Fix translation of data- attributes

Attributes prefixed by 'data-' can't be accessed the same way as others, so here's a fix that may fix this issue.