- Deps bump.
- Project cleanup.
- Maintenance release.
- Dev deps bump.
- Reorganize files.
- Rework build scripts.
- Allow empty prefix when adding phrases via nested objects.
- Fixed doc for
.load()
method. .addPhrase()
,.setLocale()
&.load()
now returnthis
.
- Added
.getLocale()
method, to check real locale of requested phrase.
- Moved pluralizer to external package
plurals-cldr
. - Fixed fallbacks serialize/load.
- Allow
|
escaping. - Recompiled REG parser with speed optimization.
- Reorganized tests:
- moved as much as possible to fixtures
- 100% coverage
- coveralls reports
- Fixed pluralizer for locale names with low dash separator ("en_US").
- Fixed partials locale for generated cache.
hasPhrase()
fix fornoFallback = true
.
- Big rewrite with api change. Internal data simplified. Phrases are now
compiled in lazy way on
translate()
call. - Deprecated
getCompiledData()
,create()
. - Constructor function can be called as factory (without
new
). - Added
load()
method in pair tostringify()
. stringify()
now save fallback info too.hasPhrase()
optionnoFallback
to disable phrase search in fallbacks.
- Coerce plain strings & numbers params to
count
&value
intranslate()
. - Added bower support.
- Added variables support in plurals.
- Added zero-form and other strict numbers forms for plurals.
- Coerce number XXX to { count: XXX } in
translate()
;
- Added objects support. Now
addPhrase()
can also acceptNumber
,Array
,Boolean
andObject
. That allows to store i18n data for external libs (calendars, time/date generators, ...), when flattened keys format is not ok.
- Added
stringify
method. - Drop browser build. Use browserify and other tools.
- Changed internal storage format to generate more compact dumps.
- Some speed opts.
- Drop
defaultLocale
public property.
- Migrated tests to mocha.
- Fixed docs errors.
- Added params check to
getCompiledData()
. - Drop
underscore
dependency. - Change browserifier to
webmake
.
- Fixed handling 0 in #{variables}, thanks to @elmigranto.
- Updated README samples.
- Refactor internal storage.
- Fix flattenParams().
- Improved error reporting on missing params.
- Add hasPhrase().
- Initial release.