Well I was working on the same port that you are have created here, although I can see I'm a week too late.

The only suggestion I have is, instead of hard-coding the warning strings in the js, put them in the module file (inside the function where you are already adding the js) and use the identical code from the Drupal 6 version to add the code (I think using drupal_to_js('blah', 'settings') or something similar), but wrap the strings in the t() function.

Does this make sense? This way other developers can use the translation system to translate those strings easily in Drupal 5.x.

Good work, nifty module.

Dave

Comments

jrbeeman’s picture

Good idea - I'll take a look at this.

jrbeeman’s picture

Status: Active » Fixed

I guess you learn something new every day! I didn't realize Drupal 5 had the widely-used-in-Drupal 6 capability of adding settings via drupal_add_js. This is pretty slick. I've committed the changes to the 5.x-dev branch.

jrbeeman’s picture

Status: Fixed » Closed (fixed)

Fixed in 5.x-1.0 release