- Timestamp:
- 2023-08-15T15:56:22+02:00 (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
r18795 r18808 166 166 name.append(tr(" [v{0}]", version)); 167 167 } 168 } 169 170 /** 171 * Decorates the name of primitive with nodes count 172 * 173 * @param name the name without the nodes count 174 * @param primitive the primitive 175 * @since 18808 176 */ 177 protected void decorateNameWithNodes(StringBuilder name, IWay way) { 178 char mark; 179 // If current language is left-to-right (almost all languages) 180 if (ComponentOrientation.getOrientation(Locale.getDefault()).isLeftToRight()) { 181 // will insert Left-To-Right Mark to ensure proper display of text in the case when object name is right-to-left 182 mark = '\u200E'; 183 } else { 184 // otherwise will insert Right-To-Left Mark to ensure proper display in the opposite case 185 mark = '\u200F'; 186 } 187 int nodesNo = way.getRealNodesCount(); 188 /* note: length == 0 should no longer happen, but leave the bracket code 189 nevertheless, who knows what future brings */ 190 /* I18n: count of nodes as parameter */ 191 String nodes = trn("{0} node", "{0} nodes", nodesNo, nodesNo); 192 name.append(mark).append(" (").append(nodes).append(')'); 168 193 } 169 194 … … 273 298 } 274 299 275 int nodesNo = way.getRealNodesCount(); 276 /* note: length == 0 should no longer happen, but leave the bracket code 277 nevertheless, who knows what future brings */ 278 /* I18n: count of nodes as parameter */ 279 String nodes = trn("{0} node", "{0} nodes", nodesNo, nodesNo); 280 name.append(mark).append(" (").append(nodes).append(')'); 300 decorateNameWithNodes(name, way); 281 301 } 282 302 decorateNameWithId(name, way);
Note:
See TracChangeset
for help on using the changeset viewer.