Consolidate localization behavior and init to a coreLocalizer function and singleton
Explicitly support `en-US` locale
Rename coreData to coreFileFetcher and export a singleton rather than using a property of coreContext
Add `apiConnections` property of coreContext to simplify adding a source switcher
Replace some init functions with re-callable, promise-supporting `ensureLoaded` functions
Make coreContext itself load the UI if a container has been specified at init time
Fix code tests
This was used for debugging translations, it would replace each string with
the translation key, so people could see what key was used where in the UI.
As far as I know, nobody was using this.
- ES6ify (now using class syntax to define QAItem objects)
- Fix bug with KeepRight marker rendering not updating properly
- Use `qa-` prefix for the UI element classes to differentiate from iD
validation error related UI element classes
- Move away from "error" where possible in source
- Move away from snake_case naming where possible
Note that some function/method names have been untouched to make life
easier for v3 development. Have added note comments where appropriate.
- preset data is no longer bundled into iD.js
- some code pathways commented out re: external presets
- many changes so that tests can run without presets at start, or async
- still need to make sure fallbacks are always there (point, line, area, etc)
We have http://openstreetmap.community now for this, and it eliminates
another place in the code where that data would have been needed.
This commit also ES6ifies svgDebug.
This also includes a bunch of tweaks to make the tests work
in both PhantomJS and modern browsers like Chrome.
Basically - introduce some more async into the test code so that
the coreData.get promise is guaranteed to settle. Because in
PhantomJS the promise is polyfilled, and Chrome it's native, they
work slightly differently.
Also dist/data/* contains minified files now
These are now external and will fetch as needed:
-export { dataAddressFormats } from './address-formats.json';
-export { dataDeprecated } from './deprecated.json';
-export { dataDiscarded } from './discarded.json';
-export { dataLanguages } from './languages.json';
-export { dataPhoneFormats } from './phone-formats.json';
-export { dataShortcuts } from './shortcuts.json';
-export { dataTerritoryLanguages } from './territory-languages.json';