Skip to content

Commit

Permalink
Merge remote-tracking branch 'k-yle/3595-localised-auth-popup' into d…
Browse files Browse the repository at this point in the history
…evelop
  • Loading branch information
tyrasd committed May 27, 2024
2 parents 0e63438 + 8889118 commit 9c6b725
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ _Breaking developer changes, which may affect downstream projects or sites that

#### :tada: New Features
#### :sparkles: Usability & Accessibility
* Login/logout pages are now using the user's locale ([#3595], thanks [@k-yle])
#### :scissors: Operations
#### :camera: Street-Level
#### :white_check_mark: Validation
Expand All @@ -51,6 +52,7 @@ _Breaking developer changes, which may affect downstream projects or sites that
#### :rocket: Presets
#### :hammer: Development

[#3595]: https://github.com/openstreetmap/iD/issues/3595
[#8994]: https://github.com/openstreetmap/iD/issues/8994


Expand Down
7 changes: 7 additions & 0 deletions modules/services/osm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
},

Expand Down

0 comments on commit 9c6b725

Please sign in to comment.