I am trying to use custom rules but I get lost.
I tried the README examples (w script/console)
1- fine -
>> lwr(:man_count, 1)
=> "Il y a 1 homme."
2- Oops
lwr_(:custom, :man_count, 0)
LocalJumpError: unexpected return
from (eval):1:in `_add_localized_strings'
..plugins/gloc-1.2/lib/gloc.rb:59:in `call'
../gloc-1.2/lib/gloc.rb:59:in `lwr_'
seems it doesn't like the proc
_gloc_rule_custom: ' |n| return "_none" if n==0; return "_heaps" if n>200; n==1 ? "_single" : "_plural" '
what's wrong ?
thanks fyh !
|