formatjs / handlebars-intl

Handlebars helpers for internationalization.
http://formatjs.io/handlebars/
Other
265 stars 28 forks source link

Handlebars-helper-intl test failures #31

Closed triptych closed 9 years ago

triptych commented 10 years ago

Looks like there are some stable test failures which may be in the higher level intl-messageformat since there's not been a code change in handlebars-helper-intl.

Investigating:

31 passing (124ms)
  3 failing
  1) Helper `intlMessage` should return a formatted string with formatted numbers and dates:
      + expected - actual
      +"Atlanta has a population of 5,475,213 as of Jan 1, 2010."
      -"Atlanta has a population of 5,475,213 as of January 1, 2010."

  2) Helper `intlMessage` should return a formatted string with formatted numbers and dates in a different locale:
      + expected - actual
      +"Atlanta has a population of 5.475.213 as of 1. Jan. 2010."
      -"Atlanta has a population of 5.475.213 as of 1. Januar 2010."

  3) Helper `intl` should provide formats for intlMessage:
      + expected - actual
      +"oranges cost $40,000.00 (or €40,000.00) if ordered by Jan 23, 2014"
      -"oranges cost $40,000.00 (or €40,000.00) if ordered by January 23, 2014"
triptych commented 10 years ago

Caridy mentioned yesterday that Intl.js changed a default for months. Seeing how that may be playing into this. https://github.com/andyearnshaw/Intl.js/commit/4062035981fac8b1087578311ac39de1ffc24875

ericf commented 10 years ago

@triptych can you verify what should be the correct output (this is easily done in any modern browser, minus Safari)?

It's likely that the tests have expected results which are incorrect, and now Intl.js is returning the correct result, causing the test to fail. If this is the case, can you update these tests to reflect this — assuming it's verified by using a non-polyfilled runtime.

triptych commented 10 years ago

yeah, will do.

triptych commented 10 years ago

It's a real issue and it's in Intl.js. Issue has been reported : https://github.com/andyearnshaw/Intl.js/issues/68

ericf commented 9 years ago

Closing this since it's an issue with the Polyfill.