@xiaotaozi1127/my-i18n-format v0.3.0
i18n Format
Background
Different markets or languages have different formal conventions, including changes in the following aspects: telephone number format, postal address format, currency, price, etc. In particular, we have identified in OTR that the following content needs to be converted: currency, number (price and non-price), date and phone number.
Instead of reference multiple i18n libraries across all the services, we decided to implement an otr i18n format library which include the format function for all the aspects. So, we only need to reference this library to simplify the development and maintenance.
Usage
Install
$ yarn add @otr/i18n-format
Test
To run the unit test suite for all modules use
$ yarn test
Lint
To lint all the modules
$ yarn lint
To format codebase with prettier
$ yarn format
Publishing a package
Publishing a package happens directly in the pipeline.
At the moment when you want to publish a module you need to explicitly bumping up the version in package.json
and add a new release description in changelog.json
. Make sure put the latest version is at the top in changelog.json
.