DEV Community

jy95
jy95

Posted on • Updated on

@jy95/i18n-tools - CLI to make common operations around i18n files simpler

Summary

To keep Angular applications translations up to date, I had to constantly exchange and compare files (i18n, xlsx) between business & devs.

With a growing number of labels, this increasingly time-consuming task involves two challenges :

  • How to quickly see if some values have changed (and which ones) ?
  • How to convert the different file types to i18n files (and vice versa) for the available locale(s) ?

So I decided to create a CLI with the following features :

  • πŸ‘©β€πŸ’» Export i18n files into something else (xlsx, csv, ...)
  • ✨ Turn a file (xlsx, csv, ...) to i18n file(s)
  • πŸ“œ Compare at least two i18n files and generate a report
  • ... (🚧 More in the future)

Demo :

Examples

Read more on https://jy95.github.io/i18n-tools/
Source code : https://github.com/jy95/i18n-tools

Remember to leave a ⭐ if you like it!

Top comments (1)

Collapse
 
jy95 profile image
jy95

I thought about it: since each subcommand has its own list of options, it's hard to do something similar.
What I would like to do is to add a "Usage" section after the examples on commands pages : as I use yargs, it would be nice to have a plugin that automatically puts the output of the suggested command with help in the docusaurus documentation. This way it will be updated when I add a new option for example. I am still looking for a solution ...