yui/yui3 — pull request #1814 by customcommander (2014-05-10 12:14:44+00:00)
Title: Support for {nested.placeholder} in Lang.sub

Hey,

We're producing static html files for our tests that we would like to quickly tokenize with Lang.sub and a global config object:

```javascript
var config = {
templates: {
product_a: {
text: 'foo'
},
product_b: {
text: 'bar'
}
// ...
}
};
```

```html

{product_a.text}

{product_b.text}

```

This PR updates `Lang.sub` to support nested placeholders. I've also taken the liberty to refactor a bit the existing unit tests prior to adding my changes.

It seemed to me that this was an obvious feature for `Lang.sub` but in retrospect if you didn't include it there must have been a good reason for it? Anyway, pushing it for your perusal and subsequent approval or destruction with fire :-)

I'm expecting this PR to fail the build and I've got no idea why to be honest:

- Opened tests/unit/lang.html in a browser: OK
- Ran grover tests/unit/lang.html: OK
- yogi serve + open lang.html: OK
- yogi serve + click on grover: FAIL
- yogi test: FAIL

The fact that "native" grover works fine but grover via `yogi serve` doesn't, is a bit odd.

Cheers,