Answer some questions to find which federal programs can help you https://covid-benefits.alpha.canada.ca/. - Répondez à quelques questions pour trouver quels programmes d’aide financière fédéraux s’offrent à vous https://covid-prestations.alpha.canada.ca/.
Snyk has created this PR to upgrade i18n from 0.9.1 to 0.10.0.
✨What is Merge Advice?
We check thousands of dependency upgrade pull requests and CI tests every day to see which upgrades were successfully merged. After crunching this data, we give a recommendation on how safe we think the change is for you to merge without causing issues. Learn more, and share your feedback to help improve this feature. 🙏
As this is a private repository, Snyk-bot does not have access. Therefore, this PR has been created automatically, but appears to have been created by a real user.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 1 version ahead of your current version.
The recommended version was released 21 days ago, on 2020-05-24.
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'})
Snyk has created this PR to upgrade i18n from 0.9.1 to 0.10.0.
✨What is Merge Advice?
We check thousands of dependency upgrade pull requests and CI tests every day to see which upgrades were successfully merged. After crunching this data, we give a recommendation on how safe we think the change is for you to merge without causing issues. Learn more, and share your feedback to help improve this feature. 🙏As this is a private repository, Snyk-bot does not have access. Therefore, this PR has been created automatically, but appears to have been created by a real user. :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: i18n
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?
Fixed
url
Commit messages
Package name: i18n
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs