The dependency i18n was updated from 0.9.1 to 0.10.0.
This version is not covered by your current version range.
If you donβt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Thanks to @einfallstoll i18n got much more developer friendly by adding two extra configuration options for working with translation files catalogs.
Added
Adds support for priming i18n with static catalogs (PR #432)
Adds support for custom callback/hook on missing translations thru missingKeyFn option β #433 )
Examples
staticCatalog
Instead of letting i18n load translations from a given directory you may now pass your js object right on configuration, ie:
// DEMO: quick add yaml support on your ownconstyaml=require('js-yaml');constfs=require('fs');// configure and load translations from different locationsi18n.configure({staticCatalog: {de: require('../../locales/de.json'),en: require('../../locales/wired-en-filename.js'),fr: yaml.safeLoad(fs.readFileSync('../../locales/yaml/fr/server.yml','utf8'));},defaultLocale: 'de'})
This opens up for a ton of possible ways to handle translations in your very own desired way. But be warned: "Great power comes with great responsibility".
missingKeyFn
Want to get a warning on missing translations? Add missing translations with an indicator? Or even want to try an external service (like deepl.com) to provide an automated translated proposal of a missing phrase?
i18n.configure({missingKeyFn(locale,value){console.warn(`missing translation of "${value}" in [${locale}]!`)return`${value}-[${locale}]`;},defaultLocale: 'de'})
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donβt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
π¨ Reminder! Less than one month left to migrate your repositories over to Snyk before Greenkeeper says goodbye on June 3rd! π ππ¨ π
Find out how to migrate to Snyk at greenkeeper.io
The dependency i18n was updated from
0.9.1
to0.10.0
.This version is not covered by your current version range.
If you donβt accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
Publisher: mashpie License: MIT
Release Notes for 0.10.0 - Feature Release
Thanks to @einfallstoll i18n got much more developer friendly by adding two extra configuration options for working with translation
filescatalogs.Added
missingKeyFn
option β #433 )Examples
staticCatalog
Instead of letting i18n load translations from a given directory you may now pass your js object right on configuration, ie:
This opens up for a ton of possible ways to handle translations in your very own desired way. But be warned: "Great power comes with great responsibility".
missingKeyFn
Want to get a warning on missing translations? Add missing translations with an indicator? Or even want to try an external service (like deepl.com) to provide an automated translated proposal of a missing phrase?
Commits
The new version differs by 12 commits.
3486c89
Merge branch 'release/0.10.0' into npm
36e858e
version bumb
4339ad3
Added example to README
1fa3689
Merge pull request #433 from einfallstoll/on-missing-key
b5cc7a8
Merge branch 'master' into on-missing-key
8b80a3e
prevent filesystem updates, etc. when using staticCatalog (#432)
612bb5b
add support for missing key function (fixes #333)
8aa57b8
Merge pull request #432 from einfallstoll/static-catalog
be237b5
Update FUNDING.yml
0e07333
add support for static catalog (fixes #262)
a1fa83b
#376 - add notes & tests mustache with markup
4fb18b6
Merge tag '0.9.1'
See the full diff
FAQ and help
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those donβt help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).Your Greenkeeper bot :palm_tree: