Skip to content

Releases

v2.1.4

Choose a tag to compare

@mikhaelesa mikhaelesa released this 12 Jun 18:09
3c36b5f
  • Integrated rollup for bundling and reduces bundle size and package size
  • Set tsconfig.json declaration property to false and let rollup generates the .d.ts files

Feat

  • react-i18n: Created adapter for React

Packages

v2.1.3

Choose a tag to compare

@mikhaelesa mikhaelesa released this 12 Jun 16:45
2d34a22

This is the stable version for v2.

  • Removed escapeHTMLTags and interpolate utils and move them to TranslationManager as private methods.
  • Removed appendQueryParams util and move it to LanguageManager as private method
  • Removed mocks in tests for simpler testing
  • Removed test cases for escapeHTMLTags and interpolate

v2.1.2

Choose a tag to compare

@mikhaelesa mikhaelesa released this 11 Jun 18:00
933771e
  • Refactored codebase into single responsibility classes.
    • Created TranslationManager, and LanguageManager.
    • i18n is now more manageable.
  • Added new type TEvents for type safety and better DX
  • Created test cases for LanguageManager, and TranslationManager
  • Removed ILooseObject from export
  • Added TEvents to export

v2.1.1

Choose a tag to compare

@mikhaelesa mikhaelesa released this 11 Jun 15:48
e37d5a2
  • Removed throw new Error when user is not in browser environment.
    • Will support node environment in future version as node also has URL object
  • Wrote test cases for i18n.

v2.1.0

Choose a tag to compare

@mikhaelesa mikhaelesa released this 10 Jun 15:11
ff8ac9f
  • Removed localStorage to persist data by default and will add it as an optional feature that can be enabled by setting a flag.
  • Store currentLanguage locally and only provide one option to persist currentLanguage which is through queryParam by setting enableQueryparams to true.
  • Set tsconfig module to esnext.

v2.0.0

Choose a tag to compare

@mikhaelesa mikhaelesa released this 10 Jun 14:54
fdb3755
  • Added interpolation feature
    • String wrapped with [] can be interpolated
    • Added escape HTML feature to prevent XSS. true by default
  • Create move query params logic to appendQueryParams function in utils
  • Fixed some typos in documentation.
  • Bump package.json version to 2.0.0
  • Update documentation for interpolation.

v1.0.0

Choose a tag to compare

@mikhaelesa mikhaelesa released this 09 Jun 06:25
a186417

We are beyond happy to release @jupri-lab/i18n-core. In this first release we focused on making the core functionality which is translating texts. We have achieved that functionality and released the package as v1:

  • Created i18n class as an entry point for translation
    • Added change language feature with getChangeLanguageHandler
    • Added translate feature with translate
    • Added get current language feature with getCurrentLanguage
    • Added event listener to subscribe and get notified when language is changed with on("language_changed")
  • Created EventManager class to manage event sub and pub
  • Created documentation in README.md