Skip to content

Parse translations in Angular projects with options to prune.

Notifications You must be signed in to change notification settings

SpellChucker/ngx-translation-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOTE: This will not work for dynamic translations as of now. For example:

...
{{ 'dynamic.translation.' + someVar | translate }}
...

Angular Translation CLI

A CLI application to manage translations in Angular projects.

$ ngx-translation-cli <command> <options>

Installation

This package is meant to be installed globally. Install it using the following command:

$ npm i -g ngx-translation-cli

Commands

keys

This command allows you to export all keys within a translation file to stdout or an output file specified.

The -t option is required, -o is optional.

$ ngx-translation-cli keys -t <translation-file> -o <output-file>

prune

This command will create a new translation file with only the used translations--essentially pruning all unused translations. This will print to stdout or you can specify an output file.

The -t and -d options are required, -o is optional.

$ ngx-translation-cli prune -t <translation-file> -d <project-directory> -o <output-file>

help

This command will help you with understanding the commands available.

version

This command will output the current version of the CLI tool.

About

Parse translations in Angular projects with options to prune.

Resources

Stars

Watchers

Forks

Packages

No packages published