Sha256: 84f18f64de665574f87730c3fd1e1853c3ac5660bc08be43924c6c577fe73e84

Contents?: true

Size: 1.2 KB

Versions: 5

Compression:

Stored size: 1.2 KB

Contents

# BabelDiff

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'babel_diff'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install babel_diff

## Usage

```ruby
BabelDiff.run
```

Running the above command from the Rails console will create two files, "phrases.en.additions.yml" and "phrases.en.updates.yml", in your locales directory.

These files will contain all added and updated translation keys, respectively. If this is your first time running BabelDiff, the additions file will contain all of your translation keys.

The file "phrases.en.previous_version.yml" will also be created to serve as the benchmark against which future diffs will be compared.

If you want to run BabelDiff on a different locale file, you can pass it to the "#run" method. The default file path is "config/locales/phrases.en.yml".

The following code:

```ruby
BabelDiff.run("config/locales/random_folder/phrases.fr.yml")
```

would produce the following files:

Additions        => config/locales/random_folder/phrases.additions.fr.yml 
Updates          => config/locales/random_folder/phrases.updates.fr.yml 
Previous Version => config/locales/random_folder/phrases.previous_version.fr.yml 

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
babel_diff-1.1.0 README.md
babel_diff-1.0.3 README.md
babel_diff-1.0.2 README.md
babel_diff-1.0.1 README.md
babel_diff-1.0.0 README.md