Skip to content

Releases: i18next/i18next-scanner

v1.8.0

12 Jun 11:07
Compare
Choose a tag to compare

v1.7.0

15 Mar 06:09
Compare
Choose a tag to compare

New options for handling context and plural form keys (ee05a40, resolves #38)

Default Options

context

Type: Boolean Default: true

Whether to add context form key.

contextFallback

Type: Boolean Default: true

Whether to add a fallback key as well as the context form key.

contextSeparator

Type: String Default: '_'

The character to split context from key.

plural

Type: Boolean Default: true

Whether to add plural form key.

pluralFallback

Type: Boolean Default: true

Whether to add a fallback key as well as the plural form key.

pluralSeparator

Type: String Default: '_'

The character to split plural from key.

v1.6.0

11 Mar 06:38
Compare
Choose a tag to compare

Adds support for single character, hexadecimal, and unicode escapes (5a6f29c, resolves #39)

v1.5.1

28 Nov 08:14
Compare
Choose a tag to compare

Update dependencies

v1.5.0

04 Aug 02:48
Compare
Choose a tag to compare

Adds the ability to parse ns from i18next translation function (PR #37 by @p-j, resolves #36).

i18n.t('key', { ns: 'my-namespace' });

v1.4.1

14 Jun 07:58
Compare
Choose a tag to compare

Fixes an issue that escaped quotes will produce unwanted backslash characters within JSON strings (909e6e7, closes #32)

v1.4.0

13 Jun 10:22
Compare
Choose a tag to compare
  • Adds nsSeparator and keySeparator options to parser.set() that provides the ability to override global options (74a0773)
const parser = new Parser({
  defaultValue: '__NOT_TRANSLATED__',
  nsSeparator: ':',
  keySeparator: '.'
});

parser.set('translation:key1.key2', { keySeparator: false });
console.log(parser.get());
// {
//   en: {
//     translation: {
//        "key1.key2": "__NOT_TRANSLATED__"
//     }
// }

v1.3.1

20 May 02:38
Compare
Choose a tag to compare

v1.3.0

19 May 12:00
Compare
Choose a tag to compare

Features

  • Add removeUnusedKeys option that allows to remove unused translation keys from code (4c34f6c, closes #30)

v1.2.1

03 May 03:39
Compare
Choose a tag to compare

Fixing an issue of plural with variables