messageformat / Jed

Gettext Style i18n for Modern JavaScript Apps
http://messageformat.github.io/Jed
MIT License
873 stars 68 forks source link

make test: Fix mocha timeout @ 'Plural Forms Parsing should have the sam... #28

Closed psilva261 closed 10 years ago

psilva261 commented 10 years ago

Hey,

With this fix make test is error free! My Mac needs 6 seconds with the current HEAD, Travis CI needs 3 seconds. This patched version is a bit less than 1 second on my Mac, so it should be half a second on Travis CI which is way less than mocha's default timeout of 2 seconds...

expect.js's be and to functions aren't really complex but heavy enough to be more than 6x slower than a simple !== + throw.

Cheers, Philip

SlexAxton commented 10 years ago

So nice. Thank you.

psilva261 commented 10 years ago

Thank you, it's a really cool project.

SlexAxton commented 10 years ago

I always have to make sure you know about https://github.com/SlexAxton/messageformat.js -- which is what I generally suggest to people unless they're already using gettext in other systems.

psilva261 commented 10 years ago

Yeah I see, it uses PluralFormat/SelectFormat. I think for my current project it's a priority that there are tools for OS X and Windows that non-technical folks can easily use. A friend told me that there are even web apps for that, but I guess that's all gettext/.po editors.

SlexAxton commented 10 years ago

Yep, makes sense. Hopefully we can fix the tooling problem in the next few years, because it's a really nice upgrade.