The main differences here is:
- oci now supports default strings and exports a "resolveStrings" function
- this makes linkifying any urls embedded in descriptions a bit more complicated
because urls and descriptions might need resolution, we can't use iD's normal
t() function to do the token replacement like before
- Actually bail out properly if namelike values contain semicolon ';'
- Prioritize the canonical tags like `brand:wikidata`, `operator:wikidata`
- Don't insert a name into 'alternate' set if it's already in 'primary' set
Add utilFetchJson to get around some quirks of d3.json and use it for coreFileFetcher
Load real general English locale strings at the beginning of code tests
This involves a few things to make the validator less weird
- _headGraph shouldn't be allowed to change while validation is happening..
- So we don't allow that to happen anymore, and keep track of _headPromise and _headIsCurrent
- If head graph falls behind, kick off another validation to catch it up
- Separate head and base work queues, so we aren't waiting for the base entities to validate
before providing feedback to the user about what they are editing
(the base queue can get quite large around metropolitan areas)
This has caused problems going back a long time, and now that we have a validator
and very visible brand presets with logos, it's not necessary anymore.
(re: #5558, closes#8271, closes#8304)
- implements a validation work queue, jobs are run during browser idle callbacks
- when merging base entities, don't run validations 2x on both base and head graphs (this was wasteful)
- keep track of resolved issues in a separate set (it's not a simple compare of base/head anymore)
this happens after validation queue is empty and avoids race conditions and inaccurate resolved counts
- Notes still load over the xml api, so when the user is not authenticated,
we can't use d3_json to fetch them (instead use to d3_xml)
- Make sure to delete the deferred callback handles once the callbacks are
processed (probably unnecessary, but good housekeeping)
- Remove a stray `if (!json.elements)` block from the `parseUserJSON`
function. This was preventing the user profile from parsing, as the
user's JSON has no such property (was probably copied from `parseJSON`)
This also fixes the logic for calculating whether the preset shows a
`brand` or `operator` field - it needs to use `fields()` to actually
resolve the fields, as these fields can be inherited from another preset.
This also includes a change to match "primary" names before
"alternate" names (aka the "Baby Gap" / "Gap" problem)