"rake gettext:findpo" running forever

Under certain circumstances gettext_i18n_rails will hit a near-infinite loop. This occured in Rails 2.3.5 with Haml 3.0.18 and fast_gettext 0.5.10.

gettext_i18n_rails's Haml-Parser compiles the Haml code and delegates the parsing to ruby_parser. Unfortunately, ruby_parser appears to be confused when a string contains both escaped chars (that is, any unicode characters as ndash, umlauts etc.) and #{} blocks, which makes it extremely slow.

The easiest "solution" we came up with was to replace all occurrences of UTF-8 chars with their HTML entities (so "ü" instead of "ü" etc).

Dominik Schöler