All Versions
22
Latest Version
Avg Release Cycle
129 days
Latest Release
425 days ago

Changelog History
Page 1

  • v0.13.2 Changes

    August 21, 2020

    ๐Ÿ›  Fixed

    • ๐Ÿšš moved devDeps from dependencies to devDependencies #446
    • โœ‚ removed unused packages from all dependencies
  • v0.13.1 Changes

    August 20, 2020

    ๐Ÿ›  Fixed

    • npx npm-force-resolutions failed #445

    Details

    ๐Ÿ“ฆ A preinstall script was added to force resolving specific versions of lodash and ajv. Those are sub-dependencies of zombie and its packages. Zombie is devDependency of i18n. But zombie still refers to older versions reported to vulnerable - so I decided to force fixed versions.

    ๐Ÿ‘ Of course that preinstall should count on any npm install i18n, it's renamed to force-resolutions so I can still resolve audit issues in dev while also supporting clean installs.

    "scripts": { "preinstall": "npx npm-force-resolutions"}
    

    now reads as

    "scripts": { "force-resolutions": "npx npm-force-resolutions"}
    

    And doesn't get triggered by npm install.

  • v0.13.0 Changes

    August 20, 2020

    โž• Added

    • ๐Ÿ†• new option retryInDefaultLocale as proposed by PR #206
    • ๐Ÿ†• new option header as proposed by PRs #390 and #407
    • ๐Ÿ’… pre-commit hooks to ensure code-style (even on contributions)

    ๐Ÿ›  Fixed

    • โœ๏ธ typos in README

    ๐Ÿ”„ Changed

    • ๐Ÿ‘• tooling: eslint with standard.js & prettier presets replaces jshint
  • v0.12.0 Changes

    August 16, 2020

    โž• Added

    • 0๏ธโƒฃ backward compatible default to singleton with const i18n = require('i18n')
    • create an instance if i18n by const i18n = new I18n()

    example

    /\*\* \* require I18n with capital I as constructor \*/const { I18n } = require("i18n");/\*\* \* create a new instance with it's configuration \*/const i18n = new I18n({locales:['en', 'de'],directory: \_\_dirname + '/locales'});
    
  • v0.11.1

    August 04, 2020
  • v0.11.0 Changes

    August 03, 2020

    โž• Added

    • Fallbacks can use wildcards (#361) by PR #362
    • ๐Ÿ†• New mustache options to tweak tags and/or disable mustache parsing (#436)

    ๐Ÿ›  Fixed

    • ๐Ÿ‘ป Mitigated Uncaught Exception on malformed query param (#356, #422) by PR #442
    • ๐Ÿ›  Use of single pipe character should not be interpreted as range (#274, #388). Fixed by PR #435
  • v0.10.0 Changes

    May 24, 2020

    ๐ŸŒ 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 ownconst yaml = require('js-yaml');const fs= 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'})
    
  • v0.9.1 Changes

    May 03, 2020

    ๐Ÿ›  Fixed

    • Catch race condition in parallel fs tasks (PR #431)
    • โšก๏ธ Update packages, remove unused url
  • v0.9.0 Changes

    April 17, 2020

    โž• Added

    • ๐Ÿ‘Œ Support for floats (as number or string) in __n() (#305 )
  • v0.8.6

    March 17, 2020