Broccoli's I18n Lazy Lookup

Summary
Broccoli's I18n Lazy Lookup is made to add support for lazy lookup in Ember I18n. This Broccoli filter is best used with ember-cli-i18n-lazy-lookup.
The concept is to automatically prefix your I18n key using the current file path.
To do so, start your translation key by a .
and it will replaced by the current file path.
Examples
In controllers and components
within app/controllers/posts/edit.js
nameTranslation: '.name'
it will get converted to:
nameTranslation: 'posts.edit.name'
In templates
within app/templates/posts/edit.hbs
{{t '.save'}}
will get converted to:
{{t 'posts.edit.save'}}
but also app/templates/posts/edit.hbs
{{input author as="select"
collection="controller.authors"
selection="controller.post.author"
optionLabelPath="content.name"
promptTranslation=".select_author"
}}
will get converted to:
{{input author as="select"
collection="controller.authors"
selection="controller.post.author"
optionLabelPath="content.name"
promptTranslation="posts.edit.select_author"
}}
Installation
npm install --save-dev broccoli-i18n-lazy-lookup
Note: For Ember CLI installation, please check ember-cli-i18n-lazy-lookup.
Usage
Assuming installation via NPM, you can use broccoli-i18n-lazy-lookup in your Brocfile.js
like this:
var filterI18nLazyLookup = require('broccoli-i18n-lazy-lookup');
tree = filterI18nLazyLookup(tree);
Note: To use with Ember CLI, please check ember-cli-i18n-lazy-lookup instead.
Tests
Running the tests:
npm install
npm test
License
This project is distributed under the MIT license.