- [Fixed] Load plugins when running
i18n lint:*
commands.
- [Changed] Do not re-export files whose contents haven't changed.
- [Changed] Translations will always be deep sorted.
- [Fixed] Remove procs from translations before exporting files.
- [Changed] Change plugin api to be based on instance methods. This avoids having to pass in the config for each and every method. It also allows us adding helper methods to the base class.
- [Fixed] Fix performance issues with embed fallback translations' initial implementation.
- [Added] Add
I18nJS::Plugin.after_export(files:, config:)
method, that's called whenever whenever I18nJS finishes exporting files. You can use it to further process files, or generate new files based on the exported files. - [Added] Bult-in plugin
I18nJS::ExportFilesPlugin
, which allows exporting files out of the translations file by using a custom template.
- [Added] Parse configuration files as erb.
- [Changed]
I18n.listen(run_on_start:)
was added to control if files should be exported duringI18n.listen
's boot. The default value istrue
. - [Added] Now it's possible to transform translations before exporting them using a stable plugin api.
- [Added] Built-in plugin
I18nJS::EmbedFallbackTranslationsPlugin
, which allows embedding missing translations on exported files. - [Deprecated] The
i18n check
has been deprecated. Usei18n lint:translations
instead. - [Added] Use
i18n lint:scripts
to lint JavaScript/TypeScript. - [Fixed] Expand paths passed to
I18nJS.listen(locales_dir:)
.
- [Fixed] Shell out export to avoid handling I18n reloading heuristics.
- [Changed]
I18nJS.listen
now accepts a directories list to watch. - [Changed]
I18nJS.listen
now accepts listen options via:options
.
- Official release of i18n-js v4.0.0.