Skip to content

@signavio/i18n@5.0.0

Compare
Choose a tag to compare
@Matwog Matwog released this 13 Sep 11:50
· 50 commits to master since this release

Summary

  • Adds replacements feature
  • Fixes the issue where the replacement feature does not work correctly with the translation context.
  • Contains security fixes.

Breaking changes:

  • The replacement configuration now expects a slightly different format.
    Previously, the replacement json looked like
{
    "Old translation": "New translation",
    "Old translation2": "New translation2"
}

But now through this release, it is expected that the replacement json configs contain the context as a key.

{
  "" : {
    "Old translation": "New translation without context",
  },
  "some context": {
    "Old translation": "New translation with some context",
  }
}

This is also documented in the Read me.
Related PR: