20 Commits

Author SHA1 Message Date
Martin Raifer
31345c073a correctly detect Locale:* results when there are more than one langCodes
fixes a false positive console warning, e.g. reported in #9045

> Occasionally, it also gives a message which is not an error: "Unexpected title Locale:nl"
2025-02-17 21:17:59 +01:00
Kyℓe Hensel
c1ca888b72 linkify keys & tags in the preset docs from the wiki (#10763) 2025-02-12 15:42:29 +01: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
Til Schneider
4dabd79702 Move relation type detection to osm_wikibase (#7932) 2020-08-29 11:05:07 +02: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
Bryan Housel
4a8c20c56e Remove lodash forEach
(re: 6087)
2019-03-28 19:50:20 -04:00
Bryan Housel
a2b140e92b Remove unnecessary ternary 2019-02-08 16:38:40 -05:00
Bryan Housel
2a7fec46fe Fetch somewhat higher resolution images
(100x100 was really too small)
2019-02-08 13:36:39 -05:00
Bryan Housel
32c42073c6 Add support for Relation type documentation lookups from wikibase
(closes #5860)
2019-02-08 13:24:58 -05:00
Bryan Housel
e0459279bb Move implementation details from uiTagReference to wikibase service 2019-02-08 12:08:36 -05:00
Yuri Astrakhan
9ed347534b Remove unused import 2019-01-15 21:59:05 -05:00
Yuri Astrakhan
d724677c9f Support extracting wiki info from tag and key 2019-01-15 21:50:57 -05:00
Yuri Astrakhan
1127a34f94 Add wiki links from tag description
This feature requires P31 property to be present
in the data item. For an example, see
https://wiki.openstreetmap.org/wiki/Item:Q104#P31

Once the bot populates them in the data items,
it will automatically work for all existing keys/tags.
2019-01-15 20:07:45 -05:00
Bryan Housel
5f2d80c7a6 pacify eslint 2019-01-08 10:58:47 -05:00
Yuri Astrakhan
9f7f4aa3fc Fix language fallback processing, caching bug. 2018-12-23 01:57:26 -05:00
Yuri Astrakhan
aa78cd10a3 Data items - remove hardcoded locale IDs
Locale IDs are now fetched together with the other data
when the language code is provided.
2018-12-22 14:58:15 -05:00
Yuri Astrakhan
b2810105a5 Implement support for multilingual descriptions from wiki data items
* Takes data directly from the Wikibase data items (OSM Wiki)
     https://wiki.openstreetmap.org/wiki/OpenStreetMap:Data_Items
* Understands the difference in regions - e.g. will show different
  images depending on the local settings
* Perf: Single request will get both the tag and key description
2018-12-22 00:23:31 -05:00
Bryan Housel
22e36be4f2 WIP on replacing documentation with direct calls to OSM wikibase 2018-12-22 00:23:31 -05:00