cds-snc / c19-benefits-node

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/.
MIT License
2 stars 4 forks source link

[Snyk] Upgrade i18n from 0.9.1 to 0.10.0 #530

Closed snyk-bot closed 4 years ago

snyk-bot commented 4 years ago

Snyk has created this PR to upgrade i18n from 0.9.1 to 0.10.0.

merge advice

✨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
  • 0.10.0 - 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 own
    const yaml = require('js-yaml');
    const fs   = require('fs');
    
    // configure and load translations from different locations
    i18n.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'
    })
  • 0.9.1 - 2020-05-03

    Fixed

    • Catch race condition in parallel fs tasks (PR #431)
    • Update packages, remove unused url
from i18n GitHub release notes
Commit messages
Package name: i18n
  • 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'
Compare

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