31 Commits

Author SHA1 Message Date
Martin Raifer
b2e4d81767 fix infoboxes for NSI presets, fixes #10885
(which had regressed in c1ca888)
2025-03-17 12:11:51 +01:00
Martin Raifer
ea054a00a5 fix bug in "lang=badvalue" handling for wikidata api
see https://github.com/openstreetmap/iD/pull/9638#issuecomment-1623497481
2023-07-07 12:49:55 +02:00
Martin Raifer
96c2670727 we can still use the full language for output (uselang) 2023-05-23 16:15:11 +02:00
Martin Raifer
862ca6522a retry wikidata api without lng's region subtag if an error is returned
closes #9638
2023-05-23 16:13:40 +02:00
Quincy Morgan
482d0902ac Fix issues with Wikidata field 2020-09-24 10:27:35 -04:00
Quincy Morgan
bbbf401232 Add en fallback in coreLocalizer instead of utilDetect.browserLocales
Include all preferred and fallback langauges in coreLocalizer.localeCodes even if higher-priority ones have 100% string coverage
Fallback to the user's preferred languages instead of directly to English when querying OSM wikibase documentation and Wikidata (re: #7996)
Add `lang` attribute to tag documentation text loaded from OSM wikibase or Wikidata (re: #7963)
2020-09-23 16:15:34 -04:00
Peter Newman
4205ca1d07 Fix the seemingly safe spellings found by codespell
Untested, only checked by inspection.

(cherry picked from commit 2c47a11008)
2020-08-10 17:32:37 +01:00
Quincy Morgan
41418e57a5 Fix issues with wikidata field searching and label updating 2020-05-20 11:23:01 -04:00
Quincy Morgan
84a55606ad Show wikidata field search results in the user's language when possible 2020-03-31 13:00:52 -07:00
Quincy Morgan
a1af118f0e Ensure locales and presets are loaded before the UI loads (close #7406)
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
2020-03-31 12:23:31 -07:00
Bryan Housel
b99be67169 When calling an errback from a Promise.catch, pass err.message 2019-04-25 21:58:36 -04:00
Bryan Housel
e6bc9d9e8f Swap out d3-request, swap in d3-fetch 2019-04-24 16:25:25 -04:00
Quincy Morgan
d5a2ca131d Fix issue with loading brand documentation (close #6134) 2019-04-02 07:21:30 -04:00
Quincy Morgan
5a0f8b3453 Autocomplete labels in the Wikidata field (close #5544) 2019-03-28 19:34:47 -04:00
Bryan Housel
5b4aa529de Replace lodash uniq
(re: 6087)
2019-03-27 02:43:25 -04:00
Bryan Housel
d055f34be8 Add sitelinks to result from wikidata getDocs 2019-02-09 15:18:32 -05:00
Bryan Housel
29ce6cb30c Use proper errbacks
(re: #5823)
2019-02-09 14:51:37 -05:00
Bryan Housel
fbe584c7ec Lookup docs for some presets on wikidata, not wikibase
(re: #5823)

Now `uiTagReference` can accept a `qid` param for presets where we want this
(such as brands)
2019-02-08 16:27:33 -05:00
Bryan Housel
3de03439e2 Use user's locale for fetching wikidata label/description
(closes #5563)
2018-12-11 19:02:29 -05:00
Bryan Housel
8456b387e0 pacify eslint 2018-12-01 22:44:02 -05:00
Bryan Housel
5a6671d728 Cache wikidata results
Because wikidata field potentially shown on hover now
and the results of this lookup will never change
2018-12-01 22:06:17 -05:00
Quincy Morgan
afcc474d3c Wikidata entity labels and descriptions are now fetched and displayed in the field, if present 2018-12-01 17:39:16 -08:00
Tom Hughes
3819fd6498 Use XHR to access wikidata API instead of JSONP 2018-07-04 17:05:39 +01:00
Bryan Housel
50da78c1fd Convert lodah-es and d3 to named imports for services 2017-09-25 15:10:47 -04:00
Bryan Housel
053074d076 Export live binding for services in iD.services, fix init/reset
(closes #3324)

Previously we allowed devs to swap out services that they didn't need.
This became difficult now that ES6 exports are immutable bindings.
But we can wrap the immutable bindings themselves in a live object,
to get back the flexibility that we used to have.

This change also drops the `taginfo` accessor on Context, since devs who want
to swap out taginfo service with something else can now do so through the live
binding.  `iD.services.taginfo = myTaginfo()`
2016-10-14 10:38:09 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -04:00
Bryan Housel
4a94474a3a Better guard code around wiki services, always call callbacks 2016-09-28 14:42:30 -04:00
Tom MacWright
6341d4e4b5 one-shot build (#3266)
* One-shot development

* Move jsonp to module
* Tooltip -> module
* Remove d3.jsonp
* Fix tooltip lint
* Load all libs but d3 itself with require
* Add top-level brfs

* Unformat intro graph
2016-08-10 15:25:19 -07:00
Kushan Joshi
fc680a2e9a external modules for services 2016-07-06 14:39:58 -04:00
Bryan Housel
82f0a81308 Resolve module variable collisions 2016-06-16 11:11:00 -04:00
Bryan Housel
0c0642e321 Attempt to put services into module 2016-06-16 11:11:00 -04:00