lgalfaso/angular-dynamic-locale — pull request #18 by elfreyshira (2014-03-28 20:22:13+00:00)
Title: Fixing issue #17: Script is loaded on page only once for each locale

The solution to https://github.com/lgalfaso/angular-dynamic-locale/issues/17

I set up a cache of locale scripts that have already been called. If the `loadScript` function has already been called for a certain locale, it skips re-creating the `script` element.

Tests are written that correctly break when you take out the `calledScripts` cache code.