Prefer place name in UA/browser language

closes #16
This commit is contained in:
2026-02-10 19:19:36 +04:00
parent 87e2380ef6
commit 64ccc694d3
4 changed files with 38 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import Component from '@glimmer/component';
import { fn } from '@ember/helper';
import { on } from '@ember/modifier';
import { humanizeOsmTag } from '../utils/format-text';
import { getLocalizedName } from '../utils/osm';
import Icon from '../components/icon';
import PlaceEditForm from './place-edit-form';
@@ -22,8 +23,7 @@ export default class PlaceDetails extends Component {
get name() {
return (
this.place.title ||
this.tags.name ||
this.tags['name:en'] ||
getLocalizedName(this.tags) ||
'Unnamed Place'
);
}