Commit 87b6e60c9dd9f2dec4ede89e48b182c67409cd6c
Committed by
Antonio Terceiro
1 parent
d084befd
Exists in
master
and in
23 other branches
Fix: terminology and ngettext works fine together
(ActionItem1762)
Showing
2 changed files
with
13 additions
and
1 deletions
Show diff stats
lib/noosfero/core_ext/object.rb
test/unit/noosfero_test.rb
| ... | ... | @@ -56,4 +56,16 @@ class NoosferoTest < Test::Unit::TestCase |
| 56 | 56 | assert_equal 'en', FastGettext.locale |
| 57 | 57 | end |
| 58 | 58 | |
| 59 | + should 'use terminology with ngettext' do | |
| 60 | + Noosfero.terminology = UnifreireTerminology.instance | |
| 61 | + | |
| 62 | + Noosfero.with_locale('en') do | |
| 63 | + assert_equal 'One institution', n__('One enterprise', '%{num} enterprises', 1) | |
| 64 | + end | |
| 65 | + | |
| 66 | + Noosfero.with_locale('pt') do | |
| 67 | + assert_equal 'Uma instituição', n__('One enterprise', '%{num} enterprises', 1) | |
| 68 | + end | |
| 69 | + end | |
| 70 | + | |
| 59 | 71 | end | ... | ... |