1.4.3 • Published 4 years ago

translations-generator v1.4.3

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

Installation

  1. Install package using npm or yarn.

    npm install translations-generator --save-dev

    or

    yarn add translations-generator -D
  2. Add translations.config.json file to root of your directory.

        {
            ext: "js", // "ts", "js" or "json" (extention of translations),
            path: "src/translations", // path to folder with translations
            pattern: "translatations_", // (optional) specify pattern to use "en" instead of "translatations_en"
            alias: {
                "en": "translatations_en", // (optional) you can use "en" to specify translation
            }
        }

Usage

Run command for adding translation to files

translations-generator

Run command for removing translation from files

translations-generator --remove-label

Example

.
├── src
│   ├──translations
│       ├── translation_en.js
│       ├── translation_de.js
│       ├── translation_nl.js
│       │...
│   ├──components
│   ├──....
├── README.md
├── translations.config.json
│...
   // translation_en.js

    export default {
        "title": "Title",
    };

Run translations-generator

You'll see

Enter translations you want to use: (empty is all)

Enter a label: description

Enter a text: Description

Output

   // translation_en.js

    export default {
        "title": "Title",
        "description": "Description",
    };

Generated files are ready! 🎉

CONTRIBUTING

Feel free contribute to the project. More information you can find in CONTRIBUTING file.

License

MIT – See LICENSE file.

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.4

4 years ago

1.2.3

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago