Skip to content

Instantly share code, notes, and snippets.

@kares
Created August 4, 2009 16:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kares/161328 to your computer and use it in GitHub Desktop.
Save kares/161328 to your computer and use it in GitHub Desktop.
globalize2 bug tracking
#test "makes sure interpolation does not break even with False as string" do
# assert_equal "translation missing: en, support, array, skip_last_comma", I18n.translate(:"support.array.skip_last_comma")
#end
test "returns missing translation string for missing key" do
assert_equal "translation missing: hu, foo, bar, huu", I18n.translate(:"foo.bar.huu", :locale => :hu)
end
test "returns false translation" do
I18n.backend.store_translations :hu, { :support => { :array => { :skip_last_comma => false } } }
assert_equal false, I18n.translate(:"support.array.skip_last_comma", :locale => :hu)
end
test "returns true translation" do
I18n.backend.store_translations :hu, { :support => { :array => { :skip_last_comma => true } } }
assert_equal true, I18n.translate(:'support.array.skip_last_comma', :locale => :hu)
end
test "returns an array of symbols as string" do
# used in DateHelper.translated_date_order (action_pack/lib/action_view/helpers/date_helper.rb)
date_order = I18n.translate(:'date.order') # [:year, :month, :day]
assert_instance_of Array, date_order
date_order.each { |elem| assert_instance_of Symbol, elem }
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment