xwp / wp-settings-revisions

Settings Revisions plugin for WordPress
http://wordpress.org/plugins/settings-revisions/
Other
25 stars 7 forks source link

Replace constants with literal strings for i18n functions #18

Closed westonruter closed 11 years ago

westonruter commented 11 years ago

I had read that variables were discouraged from being used in the i18n functions. I assumed this was just to discourage them from being changed. Well, it's actually because some automated i18n tools will tokenize the PHP files to extract the textdomain from PHP without actually evaluating the file. See @markjaquith's blog post Translating WordPress Plugins and Themes: Don’t Get Clever.

Props @kucrut

kucrut commented 11 years ago

Yay!

westonruter commented 11 years ago

Also created WordPress-Coding-Standards/WordPress-Coding-Standards#50 to add a sniff for this.

westonruter commented 11 years ago

Fixed by @fjarrett in 84fb015158caff96eb76d84479bd8d156dbc4baa