jrburke/requirejs — pull request #250 by snaxor (2012-04-25 13:01:54+00:00)
Title: I18n: Merging groups of strings

I tweaked i18n.js to support merging "groups" of strings. It is a simple addition, but it does allow for some namespacing and organization of the strings within one collection.

In root nls/example.js

```javascript
define({

"root": {
intro : {
step1 : "Some text here",
step2 : "Some more text",
step3 : "Even more texts"
},
results : {
blurb1 : "Something interesting",
blurb2 : "Also interesting"
}
},
'fr-fr' : true
});
```

In root nls/fr-fr/example.js

```javascript
define({

intro : {
step1 : "Certaines parties du texte ici",
step2 : "Certains textes plus"
},
results : {
blurb1 : "quelque chose d'intéressant"
}
});
```

Resulting object

```javascript
{
intro : {
step1 : "Certaines parties du texte ici", //fr-fr
step2 : "Certains textes plus", //fr-fr
step3 : "Even more texts" //root
},
results : {
blurb1 : "Quelque chose d'intéressant", //fr-fr
blurb2 : "Also interesting" //root
}
}
```