Commit Graph

27 Commits

Author SHA1 Message Date
Martin Raifer
41aa127d23 reduce use of parseFloat
as it silently strips non-numeric suffixes (e.g. a value of "123 foo" is transformed into a numeric value of 123 by `parseFloat`, which is typically not what we desire)
2022-11-24 19:39:15 +01:00
Martin Raifer
632e24137a drop legacy builds, unneeded polyfills, document drop of IE11 support 2022-02-03 13:07:28 +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
Quincy Morgan
0473243930 Add workaround for broken rapid tapping on iOS 13.4+ (close #7694) 2020-06-15 12:27:53 -04: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
b12c30461b Don't bundle the locales anymore, load first in context init
(re: #4994)
2020-02-21 12:24:08 -05:00
Bryan Housel
ed58c8f62b ES6ify detect.js 2020-02-21 10:42:58 -05:00
Quincy Morgan
8cc9ca6aa6 Add script translations to labels 2019-08-02 11:17:39 -04:00
Quincy Morgan
e37948fe9a Use CLDR for a translated language list in the localized name field instead of untranslated wmf site matrix (close #2457)
Translate language names in the community index list (close #4990)
2019-07-31 13:47:53 -04:00
Quincy Morgan
d01bb78707 Reduce circular dependencies caused by importing from indexes, the location of the validation models, and the location of areaKeys (close #6237) 2019-04-24 13:45:59 -07:00
Tobias
5009edee4b Move variable to the top of the file and reuse
As suggested in https://github.com/openstreetmap/iD/pull/5650#issuecomment-449589375
2018-12-23 07:38:00 +01:00
Tobias Jordans
c97b659a34 Allow locale and language being set via URL param
With the hash-url `locale=en-US` or `locale=de-DE` one can force a locale and language regardless of the given language from the osm-website-settings.
2018-12-22 19:10:50 +01:00
Bryan Housel
3838b02739 Add detect.cssfilters, fallback to opacity only on IE11/Edge
(re: #4711)
2018-01-19 17:28:35 -05:00
Bryan Housel
82494750ef Cleanup code, detect download support (alternate flow for IE, Edge) 2017-09-15 16:39:50 -04:00
Bryan Housel
163323d3df Make sure bool url params actually contain value 'true'
(closes #4222)
2017-08-08 09:51:57 -04:00
Bryan Housel
bcd4e5135a Use window.top.location instead of window.location
(closes #3950)
2017-04-21 01:29:22 -04:00
Bryan Housel
1a1fc6db17 Better detection of culture-specific locale in language list
(closes #3842)
2017-02-15 15:09:14 -05:00
Bryan Housel
3f024d0b95 Replace hardcoded RTL list with detected language lookup from dataLocales 2016-11-28 00:12:50 -05:00
Bryan Housel
2448f1af1c npm run translations 2016-11-17 13:02:40 -05:00
Bryan Housel
1d03414b80 Allow forced utilDetect(), useful for testing 2016-10-18 21:56:24 -04:00
Bryan Housel
efd9e6df4b Memoize and avoid extra calls to utilDetect() 2016-10-18 21:48:39 -04:00
Bryan Housel
1c3e778baf Check for rtl url parameter for testing (rather than regex) 2016-10-08 12:45:01 -04:00
Nick Doiron
581bade5f3 update RTL detection 2016-10-05 01:38:13 -04:00
Bryan Housel
3102a4ae6a Rename all the things to include pseudonamespaces 2016-10-04 19:06:20 -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
Bryan Housel
7ca6d06254 Replace iD global with iD.Context() module (#3254) 2016-07-19 10:15:32 -04:00
Bryan Housel
cb71e90384 Module for iD.Detect() (#3243)
* convert iD.Detect() iife to a module

* iD.Detect() should return loaded locale (except for 'en')

(The previous code was a hack to replace the detected locale with the loaded
locale.  Now that Detect is a module, we can not replace the detected locale
from external code, but we can have Detect() return the locale we really want)
2016-07-13 09:15:47 -04:00