Numbro - include the language.js in the release

Tags: #<Tag:0x00007fa99b85ebb0>

Hello,

We are using version 1.5.1 PRO which include the new dependency to Numbro for formatting numbers. We are getting the Handsontable library through bower.

We want to use the formatting with another locale the en-US but when we do so, Numbro throw an error stating that the locale is unknown. As per Numbro’s documentation the locales are supported in a separate file language.js.

However while the release includes Numbro inside the main handsontable.js file it does not include the language.js. And said file is not part of “main” files declared in the bower.js.

Since we are automating our build process with gulp in combination with the main-bower-files, the language.js does not get picked up and we are now forced to add it manually in our build process…

So we would like that the language.js embedded in the main file. As a matter of fact, why is Numbro embeded in the main file rather than being a bower dependency?

Thanks and regards,
Eric Gaspard.

hi @eric.gaspard
sorry for the (maybe) trivial question: which scripts you’re loading to your website?

The bower.json file of the PRO package lists as it main files: ["./dist/handsontable.full.js", “./dist/handsontable.full.css”] so these are the two files that get to be included in out project.

Hi @eric.gaspard
yes, in this case you would need to load the language file as well. It can’t be added via main script as we are trying to deliver a lightweight solution

Hello @aleksandra_budnik.
Well ok, I was able to sort this out by adding an “overrides” on my application bower file to override the main property of Handsontable-Pro to include said languages.js file. Not very pretty but it works.

Still, I think that you should include the Numbro.js as a bower dependency (like pikaday, moment and zeroclipboard) rather than embedding it.

thank you for your suggestion Eric. I’ve just reported it to our dev team.
They agree that this should be added as a dependency.

(I’m changing the label for this issue - for a ‘bug’)

Already added. Thank you again for spotting that.