set the locale of the login popup

This commit is contained in:
Kyle Hensel
2024-02-22 21:15:15 +11:00
parent b5f1f78e87
commit 8889118f03
+7
View File
@@ -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);
},