emberjs/ember.js — pull request #5341 by chadhietala (2014-08-08 05:33:00+00:00)
Title: [FEATURE pass-ast-to-precompile] Allow precompile to accept AST

In certain cases when you are in a build pipeline you may want to perform some static analysis on templates and potentially modify the AST instead of writing some hacky RegEx to replace or remove items. An example of this is if I need to extract i18n strings from a template.

Developer writes this in project
```
{{i18n-t "i18n_some_uniq_key" text="Hello World"}}
```

What actually gets compiled
```
{{i18n-t "i18n_some_uniq_key"}}
```
From a developers point of view this is great because you can establish any strings in the template. As part of your build though you generally want to extract these strings and write them to some object literal manifest that can be looked up based upon locale. This also means we want to remove the static strings from the template for the runtime use case. In other words, the templates that developers compose are the source of truth but at build time we do some magic to allow for locale specific languages.