Hi,
CivicActions is reviewing and upgrading modules for use on client sites. Part of this process is an internationalization review. Only 2 potential problems were found. Both involve the use of t() on $variables, though not directly. :)
As you know the menu API in D6 changed so calling t() on menu item titles/descriptions is no longer required. Likewise, it's no longer necessary to call t() on messages passed to watchdog().
The attached patch fixes both of the issues found. The first passes a $variable in as the menu title. I've modified it so it's passed in as a placeholder instead. It may be that you want t() to be run on this variable as you need it translated. Really t() wasn't intended for this, however there's no good solution in core, which is why the i18nstrings module introduces the tt() function. See http://groups.drupal.org/node/15177 for a discussion on this.
The other change was to the variable passed into a watchdog() function. As I mentioned above, watchdog() calls t() on the message string passed in. However, the current variable being passed in has already been translated in the _imageapi_imagemagick_check_path() function, and t() should not be called twice on the same string. Again, I've overcome it by using a t() placeholder.
I hope the patch helps.
Cheers,
Stella
Comment | File | Size | Author |
---|---|---|---|
imageapi_i18n.patch | 1.72 KB | stella |
Comments
Comment #1
drewish CreditAttribution: drewish commentedthanks, committed to HEAD.
Comment #2
stella CreditAttribution: stella commentedWow! That's fast, thanks!
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.