diff options
author | David Cabo <david@calibea.com> | 2011-10-05 02:21:41 +0200 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2011-10-05 02:21:41 +0200 |
commit | 28f031322c035334954be209b3354b8d392ef87c (patch) | |
tree | 509088fea086d5c8f23f7b5eca95ce5e85eaeeb3 | |
parent | 3349de0bda18061311ebb74d264a51305bf1c892 (diff) |
Patch FastGettext to handle plural forms correctly. Fixes #248
-rw-r--r-- | vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb b/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb index a6508b05d..3829e511b 100644 --- a/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb +++ b/vendor/gems/fast_gettext-0.5.10/lib/fast_gettext/mo_file.rb @@ -22,8 +22,12 @@ module FastGettext #returns the plural forms or all singular translations that where found def plural(*msgids) translations = plural_translations(msgids) - return translations unless translations.empty? - msgids.map{|msgid| self[msgid] || msgid} #try to translate each id + return translations + # XXX: 20111004 - Temporary patch for release/0.4 until we upgrade the fast_gettext gem + # to 0.60. The code used to say 'unless translations.empty?', but that's wrong: + # we must return [] if not found - otherwise chained repositories won't work. + # Also removed: + # msgids.map{|msgid| self[msgid] || msgid} #try to translate each id end def pluralisation_rule |