jrburke/requirejs — pull request #311 by archive (2012-06-07 07:02:39+00:00)
Title: Support for complex locale data models

In our project we need support for substituting properties on different levels in the locale file, not just the first level. E.g:

color.js (base):
black: {
opacity: 1,
rgb: {
r: "0",
g: "0",
b: "0",
}
}

color.js (en-EN):
black: {
opacity: 0.5
}

Should produce the result:
black: {
opacity: 0.5,
rgb: {
r: "0",
g: "0",
b: "0",
}
}

So we have updated the mixin function to support nested structures. What do you think about this?

Please see the “i18n” pull request for updated code.