Modify

Opened 2 years ago

Closed 23 months ago

Last modified 23 months ago

#22588 closed enhancement (fixed)

[Patch] Improve horse related presets

Reported by: Hufkratzer Owned by: team
Priority: normal Milestone: 23.01
Component: Internal preset Version:
Keywords: preset horse_riding equestrian horse_racing Cc: skyper, taylor.smock

Description

This patch aims to solve some issues that were already discussed in #21907 and are not blocked by #22001 and #22049. It

  • renames the preset for leisure=horse_riding from "Horse Riding" to "Horse Riding Centre"
  • adds links between the different horse related presets leisure=horse_riding, sport=equestrian and sport=horse_racing
  • introduces display_value's in the combo boxes

The motivation is to reduce mistaggings by

  • better distinguishing the horse_riding tag from the other related tags
  • helping the user to find the presets for these other tags.

In iD the preset for horse_riding is named "Horseback Riding Center" (AE). This patch here renames it to "Horse Riding Centre" (BE) because all the other presets for centres still use BE ("Centre") and I wanted to keep the patch as small as possible. Of course, it would be possible to rename all "Centre"s to "Center"s instead.

Related tickets, comments and links:

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2022-10-31 17:29:20 +0100 (Mon, 31 Oct 2022)
Build-Date:2022-11-01 02:30:58
Revision:18583
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18583 en) Windows 7 64-Bit
OS Build number: Windows 7 Professional (7601)
Memory Usage: 362 MB / 681 MB (121 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1400×1050 (scaling 1.00×1.00)
Maximum Screen Size: 1400×1050
Best cursor sizes: 16×16→48×48, 32×32→48×48
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: en_DE
Numbers with default locale: 1234567890 -> 1234567890
Dataset consistency test: No problems found

Plugins:
+ measurement (35978)

Tagging presets:
+ D:\TEMP\JOSM\trunk\resources\data\defaultpresets.xml

Map paint styles:
- G:\JOSMhufkratzer\Riding-style.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&zip=1

Last errors/warnings:
- 00345.181 E: Failed to locate image '[[Image(pond.png)]]'
- 00345.184 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 00967.421 E: Failed to locate image '[[Image(pond.png)]]'
- 00967.425 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 00981.227 E: Failed to locate image '[[Image(pond.png)]]'
- 00981.246 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 00998.999 E: Failed to locate image '[[Image(pond.png)]]'
- 00999.002 E: Failed to locate image '[[Image(oil-palm.png)]]'
- 04828.469 E: Failed to locate image '[[Image(pond.png)]]'
- 04828.473 E: Failed to locate image '[[Image(oil-palm.png)]]'

Attachments (5)

horse_riding.patch (4.7 KB ) - added by Hufkratzer 2 years ago.
patch update with blanks instead of tabs
german-josm.jpg (45.1 KB ) - added by Hufkratzer 23 months ago.
german-launchpad.jpg (113.4 KB ) - added by Hufkratzer 23 months ago.
spanish-josm.jpg (51.3 KB ) - added by Hufkratzer 23 months ago.
spanish-launchpad.jpg (119.6 KB ) - added by Hufkratzer 23 months ago.

Download all attachments as: .zip

Change History (23)

by Hufkratzer, 2 years ago

Attachment: horse_riding.patch added

patch update with blanks instead of tabs

comment:1 by Klumbumbus, 2 years ago

Milestone: 23.01
Owner: changed from team to Klumbumbus

in reply to:  description comment:2 by skyper, 2 years ago

Replying to Hufkratzer:

This patch here renames it to "Horse Riding Centre" (BE) because all the other presets for centres still use BE ("Centre") and I wanted to keep the patch as small as possible. Of course, it would be possible to rename all "Centre"s to "Center"s instead.

I did not get much feedback on #21963 but would rather rename all "Centre" to "Center" than introducing another "Centre" which will possibly be changed again as this way we would save some work for the translators overall.

Last edited 2 years ago by skyper (previous) (diff)

comment:3 by Klumbumbus, 2 years ago

Resolution: fixed
Status: newclosed

In 18625/josm:

fix #22588 - Improve horse related presets (patch by Hufkratzer)

comment:4 by Klumbumbus, 2 years ago

I used "center" for the new string "Horse Riding Center", but kept the old (already translated) string "Sports Centre" for now, which would/will be changed with #21963

comment:5 by Hufkratzer, 2 years ago

Thanks for dealing with the issue.

But "Horse Riding Center" is a mixture of BE ("Horse Riding") and AE ("Center"). In AE it would be "Horseback Riding" instead of "Horse Riding" (but it is "Horse Racing" in AE and BE), see

This was also discussed for iD presets in

EDIT: If you switch to AE ("Horseback Riding Center") you should also change "Horse Riding Arena" to "Horseback Riding Arena".

Last edited 2 years ago by Hufkratzer (previous) (diff)

comment:6 by Klumbumbus, 2 years ago

Resolution: fixed
Status: closedreopened

comment:7 by Klumbumbus, 2 years ago

Resolution: fixed
Status: reopenedclosed

In 18639/josm:

fix #22588 - Fix BE AE mix

comment:8 by Hufkratzer, 23 months ago

Resolution: fixed
Status: closedreopened

I have tested this in the latest available build 18645 and found that in the preset for sport=equestrian the string "Horse Riding Arena" isn't translated, although there have been translations entered in launchpad.

German:


Spanish:


I have no idea what causes this.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2023-01-26 23:46:32 +0100 (Thu, 26 Jan 2023)
Build-Date:2023-01-27 02:30:58
Revision:18645
Relative:URL: ^/trunk

Identification: JOSM/1.5 (18645 de) Windows 7 64-Bit
OS Build number: Windows 7 Professional (7601)
Memory Usage: 345 MB / 681 MB (240 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Screen: \Display0 1400×1050 (scaling 1.00×1.00)
Maximum Screen Size: 1400×1050
Best cursor sizes: 16×16→48×48, 32×32→48×48
System property file.encoding: Cp1252
System property sun.jnu.encoding: Cp1252
Locale info: de_DE
Numbers with default locale: 1234567890 -> 1234567890
Dataset consistency test: No problems found

Plugins:
+ measurement (35978)

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/IconTester&zip=1
- G:\JOSMhufkratzer\Riding-style.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&zip=1
Last edited 23 months ago by skyper (previous) (diff)

by Hufkratzer, 23 months ago

Attachment: german-josm.jpg added

by Hufkratzer, 23 months ago

Attachment: german-launchpad.jpg added

by Hufkratzer, 23 months ago

Attachment: spanish-josm.jpg added

by Hufkratzer, 23 months ago

Attachment: spanish-launchpad.jpg added

comment:9 by Klumbumbus, 23 months ago

Cc: taylor.smock added

Taylor, did something went wrong in r18645?

comment:10 by Klumbumbus, 23 months ago

Owner: changed from Klumbumbus to team
Status: reopenednew

comment:11 by skyper, 23 months ago

I guess the translation update is only added before a tested release.

comment:12 by Klumbumbus, 23 months ago

r18645 was a translation update.

comment:13 by skyper, 23 months ago

Oh, sorry, should read more carefully!

in reply to:  9 comment:14 by taylor.smock, 23 months ago

Replying to Klumbumbus:

Taylor, did something went wrong in r18645?

Nothing that I saw when I was doing it. With that said, Launchpad had issues with creating the exports a month or so ago, so I ended up going a different route for the 22.12 release.

I'll go ahead and go through that process again. Probably on Monday.

With that said, I just took a look at es.lang via vim, and there is Cancha para equitación and Centro de Equitación (the A3 is probably the `o), so something else is probably the problem. I'll try stepping through the code with a debugger while I have the localization process going in a different JOSM source directory.

comment:15 by taylor.smock, 23 months ago

I've done a bit of debugging.
It looks like we are mapping _:riding\nHorse Riding Arena to Cancha para equitación during i18n load.

The call tree for tr starts in PresetListEntry#getDisplayValue. I think the problem here is that we are calling tr(display_value) instead of trc(cms == null ? null : cms.values_context, display_value). The latter gives us the expected translation of Cancha para equitación while the former just returns Horse Riding Arena.

A patch for that is relatively trivial, but I don't know what the fallout would be (are there some values that depend upon the context not being set?).

The entries in the preset leisure list have other translation locations, as follows:

This is probably why they all have translations -- the gettext code doesn't need the context for them, since they have been translated without context.

EDIT: The ticket for changing tr(display_value) to trc(cms == null ? null : cms.values_context, display_value) is #22693.

Last edited 23 months ago by taylor.smock (previous) (diff)

comment:16 by taylor.smock, 23 months ago

Milestone: 23.0123.02

Ticket retargeted after milestone closed

comment:17 by Klumbumbus, 23 months ago

Resolution: fixed
Status: newclosed

translation fixed in r18648

comment:18 by Klumbumbus, 23 months ago

Milestone: 23.0223.01

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.