toretore / babilu

ABANDONED - Use i18n-js instead
MIT License
65 stars 11 forks source link

rails 3 compatibility #4

Closed basvk closed 13 years ago

basvk commented 13 years ago

To make babilu compatible with rails 3 I18n interpolation syntax (e.g. ' you have %{amount} unread messages' (rather than the {{amount}} syntax)) I've changed the interpolatePattern in the top of babilu.js to: var interpolatePattern = /%{([^}]+)}/g;

Maybe the interpolate regexp can be adjusted when generating locales.js based on the existence/value of RAILS_GEM_VERSION ?

toretore commented 13 years ago

Changed. There's a v.0.1.0 tag for the previous version for R2.