Changeset 17810 in josm for trunk/src/org
- Timestamp:
- 2021-04-21T16:10:26+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
r17674 r17810 232 232 } 233 233 if (n == null) { 234 n = way.hasKey("highway") ? tr("highway") : 235 way.hasKey("railway") ? tr("railway") : 236 way.hasKey("waterway") ? tr("waterway") : 237 way.hasKey("landuse") ? tr("landuse") : null; 234 n = formatAddress(way); 238 235 } 239 236 if (n == null) { 240 n = formatAddress(way); 241 } 242 if (n == null && way.hasKey("building")) { 243 n = tr("building"); 237 for (String key : Arrays.asList(marktr("highway"), marktr("railway"), marktr("waterway"), marktr("landuse"), marktr("building"))) { 238 if (way.hasKey(key) && !way.isKeyFalse(key)) { 239 /* I18N: first is highway, railway, waterway, landuse or building type, second is the type itself */ 240 n = way.isKeyTrue(key) ? tr(key) : tr("{0} ({1})", trcLazy(key, way.get(key)), tr(key)); 241 break; 242 } 243 } 244 244 } 245 245 if (n == null || n.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.