If many widgets are on the site, the theme_ function pollutes the end of the page with variable declarations.

Comments

bartk’s picture

Title: use Drupal.t() Javascript function instead of global variable to translate nothing selected » If many widgets are on the site, the theme_ function pollutes the end of the page with variable declarations.
Status: Needs review » Closed (fixed)

Failture to use the t() javascript function isn't the issue here. The patch as written breaks theming of '[nothing selected]'. Instead, I've changed the declaration of the text to a static variable and I'm only printing the javascript the first time the theme function is called.

Fixed in 7.x-1.x-dev.