Skip to content

A Golang implementation to insert locales in an specified directory

License

Notifications You must be signed in to change notification settings

AlejandroSuero/go-insert-locale

Repository files navigation

Stargazers Issues

Go Insert Locale

Insert locale data into your locales directory.

Report an issue · Suggest a feature

Remember to always follow the code of conduct


Warning

This project is still in development, so it may not be stable.

Installation

You can use Homebrew or go to the Releases page and download the latest version for your OS.

brew tap AlejandroSuero/aome
brew install AlejandroSuero/aome/gil

Usage

go-insert-locale -input <input-file> -output <output-dir>

This will read the JSON file provided in <input-file> and insert it into the directory provided in <output-dir>.

{
  "hello": {
    "en": "Hello",
    "es": "Hola"
  }
}

This will create the following files in <output-dir>:

  • en.json
{
  "hello": "Hello"
}
  • es.json
{
  "hello": "Hola"
}

Example

go-insert-locale -input locales.json -output locales

Contributing

Thank you to everyone that is contributing and to those who want to contribute. Any contribution is welcomed!

Quick guide:

  1. Fork this project.
  2. Clone your fork (git clone <fork-URL>).
  3. Add main repo as remote (git remote add upstream <main-repo-URL>).
  4. Create a branch for your changes (git switch -c feature/your-feature or git switch -c fix/your-fix).
  5. Commit your changes (git commit -m "feat(...): ...").
  6. Push to your fork (git push origin <branch-name>).
  7. Open a PR.

For more information, check CONTRIBUTING.md.

Contributors

Thanks goes to these wonderful people that have contributed to this project:

contributors

About

A Golang implementation to insert locales in an specified directory

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published