mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
Replace hardcoded RTL list with detected language lookup from dataLocales
This commit is contained in:
@@ -307,7 +307,7 @@ export function coreContext() {
|
||||
};
|
||||
|
||||
context.loadLocale = function(callback) {
|
||||
if (locale && locale !== 'en' && dataLocales.indexOf(locale) !== -1) {
|
||||
if (locale && locale !== 'en' && dataLocales.hasOwnProperty(locale)) {
|
||||
localePath = localePath || context.asset('locales/' + locale + '.json');
|
||||
d3.json(localePath, function(err, result) {
|
||||
if (!err) {
|
||||
@@ -351,7 +351,7 @@ export function coreContext() {
|
||||
context.projection = geoRawMercator();
|
||||
|
||||
locale = utilDetect().locale;
|
||||
if (locale && dataLocales.indexOf(locale) === -1) {
|
||||
if (locale && !dataLocales.hasOwnProperty(locale)) {
|
||||
locale = locale.split('-')[0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user