When your module is used within a multi-language installation, and the keyword "header" or "footer" is translated, it breaks. This is because of the scrope-parameter of drupal_add_js.

This parameter only accepts "footer" or "header", however in respondjs.admin.inc the module don't support this two options, but the translations. A simple fix would be dont translate the option-values on line 20.

CommentFileSizeAuthor
#1 1828318-1-dont-translate-scope.patch810 bytesrupl
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rupl’s picture

Title: Problem with multilanguage » Multilingual: translated scope values break drupal_add_js()
Status: Active » Needs review
FileSize
810 bytes

Nice catch! I don't have an environment set up to translate Drupal, so could you try this patch against the latest dev and give me an RTBC before I commit?

killerpoke’s picture

Status: Needs review » Reviewed & tested by the community

It work's like a charm!

Labels are translated, values not. Thank you for your very quick response.

rupl’s picture

Status: Reviewed & tested by the community » Fixed

Awesome! Committed #1 to dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.