From 8889118f032222cece5a5ea34f79cdf65024373a Mon Sep 17 00:00:00 2001 From: Kyle Hensel Date: Thu, 22 Feb 2024 21:15:15 +1100 Subject: [PATCH] set the locale of the login popup --- modules/services/osm.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/services/osm.js b/modules/services/osm.js index 504c6ae2d..eecf6a038 100644 --- a/modules/services/osm.js +++ b/modules/services/osm.js @@ -9,6 +9,7 @@ import { JXON } from '../util/jxon'; import { geoExtent, geoRawMercator, geoVecAdd, geoZoomToScale } from '../geo'; import { osmEntity, osmNode, osmNote, osmRelation, osmWay } from '../osm'; import { utilArrayChunk, utilArrayGroupBy, utilArrayUniq, utilObjectOmit, utilRebind, utilTiler, utilQsString } from '../util'; +import { localizer } from '../core/localizer.js'; import { osmApiConnections } from '../../config/id.js'; @@ -1438,6 +1439,12 @@ export default { that.userChangesets(function() {}); // eagerly load user details/changesets } + // ensure the locale is correctly set before opening the popup + oauth.options({ + ...oauth.options(), + locale: localizer.localeCode(), + }); + oauth.authenticate(done); },