All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Breaking Change Catch and log errors during message compilation and
interpolation by default (#47, #97, #102): provide
throwOnError: true
to restore the previous behaviour - Allow for transitional period by assuming that messages that start with the
provided
fallbackPrefix
use ngx-translate default syntax (#30)
- Avoid unnecessarily slow processing of (lots of) translations in
compileTranslations
(#110)
- Support configuring messageformat's
strictPluralKeys
option
- Support for ngx-translate v15 (#106)
- Support for Angular 16+ (#103)
- Support for Angular 15 (#99)
- Support for configuring the default currency (#33)
- Messageformat's integrated formatters like
number
anddate
now also work when no custom formatters are configured.
- Support for messageformat v3 (#74, #90), check breaking changes
- Dropped support for messageformat v2
- Passing
locales
anddisablePluralKeyChecks
no longer has any effect (due to changes in messageformat v3)
- Support for Angular v14 (#86)
- Change critical error by changing default import syntax for messageformat
- Drop support for Angular versions before v13
- Drop support for ngx-translate versions before v14
- Support for Angular v13
- Support for Angular v12 (#72)
- Support for Angular v11 (#67)
- Support for Angular v10 and ngx-translate v13 (#62)
- Option to disable plural key checks (#39)
- Support for Angular 9 (#49, #53)
- Support for ngx-translate 12 (#56)
- Updated dependecy explanation in README
- Added link to app test repos
- Support for Angular 8 (#46)
- Requiring at least messageformat v2.0.5 fixes the issue with composed locales when messageformat is not initialized explicit locales
- Support for Angular 7 (#38)
- Support for ngx-translate 11
- Option to use MessageFormat with custom formatters (#31)
- Script to (somewhat) automate publishing and avoid the frequent mistakes
- Option to initialize MessageFormat with the required locales (recommended)
- Using composed locales (de-CH) without initializing them leads to an error (upstream issue). Now, there's a workaround at least. (#27)
- Can I finally get the publishing step right?!
- 4.1.1 was missing README in published package
- 4.1.0 was incorrectly published :-/
TranslateMessageFormatDebugCompiler
is a drop-in replacement for the regular compiler with added console logging to help debug problems
- Support for @ngrx-translate/core v10
- Support for messageformat v2
- Support for Angular v6
- Dropped support for @ngrx-translate/core v8 and v9
- Dropped support for messageformat v1
- Dropped support for
intlSupport
config option (because messageformat now always expectsIntl
to exist) - Dropped support for Angular v3 and v4
- Compiling the library with Angular v4 instead of Angular v5 ensures the generated metadata is usable for AOT compilation in both Angular v4 and Angular v5 projects. (#23)
- The messageformat configuration object is now provided by using an injection token (MESSAGE_FORMAT_CONFIG) rather than by passing the configuration to the compiler's constructor using a factory function.
- Using the compiler without a configuration object for messageformat remains unchanged and continues working as before.
- The use of InjectionToken requires at least Angular 4, so support for Angular v2 and ngx-translate <v8 has been dropped.
Note: this version was unpublished from the NPM registry because it broke AOT compilation when not using a factory to pass in a configuration object, which would have been the case for 100% of usages prior to this version.
- Support some configuration of the messageformat instance that's
created by the compiler on instantiation. Passing an object with
optional boolean values for
biDiSupport
,intlSupport
andstrictNumberSign
will call the corresponding methods of the messageformat instance. They all default to false.
- Improved
compile
signature to indicate that the return value is always a function.
- Support use with ngx-translate v9
- Clarify usage section of README
- Typo in example syntax
- New section in README: Usage (incl. example)
- This CHANGELOG file.
- The compiler creates its own MessageFormat instance instead of relying on the user to pass one via the constructor.
- Allow Angular up to v5 and ngx-translate up to v8 as peer dependencies. (#6)
- Use GitHub template for MIT license.
- The
TranslateMessageFormatCompiler
constructor no longer takes a MessageFormat instance as a parameter. This simplifies the setup. Also,messageformat
unfortunately does not provide Typescript types and therefore requires a minimal type declaration. Not exposing this to cosumers of the library saves potential headaches. This is obviously a breaking change. (#2) TranslateMessageFormatCompiler
is no longer injectable. The@Injectable
annotation isn't needed when used as recommended and the class was probably never injected, but it's still technically a breaking change.
- Typo in package.json's repo url. (#1)
- Improved some words in README.
- Check to see if (something that looks like) a MessageFormat instance
was passed to
TranslateMessageFormatCompiler
's constructor and throw aTypeError
otherwise.
- Fix npm release package by making sure the right files are included
(and excluded) with
.npmignore
.
- Initial release.