#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:
- ticket:21907#comment:12 (Horse related stuff)
- ticket:21907#comment:28 (Riding Centre/Center)
- ticket:21907#comment:31 (Equestrian Sport)
- #21963 (spelling AE vs BE)
- https://wiki.openstreetmap.org/wiki/Tag:leisure=horse_riding
- https://github.com/openstreetmap/iD/issues/9118 (horse_riding)
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)
Change History (23)
by , 2 years ago
Attachment: | horse_riding.patch added |
---|
comment:1 by , 2 years ago
Milestone: | → 23.01 |
---|---|
Owner: | changed from | to
comment:2 by , 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.
comment:4 by , 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 , 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
- https://dictionary.cambridge.org/dictionary/english/horse-riding
- https://dictionary.cambridge.org/dictionary/english/horseback-riding
- https://dictionary.cambridge.org/dictionary/english/horse-racing
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".
comment:6 by , 2 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:8 by , 23 months ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
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.
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
by , 23 months ago
Attachment: | german-josm.jpg added |
---|
by , 23 months ago
Attachment: | german-launchpad.jpg added |
---|
by , 23 months ago
Attachment: | spanish-josm.jpg added |
---|
by , 23 months ago
Attachment: | spanish-launchpad.jpg added |
---|
comment:10 by , 23 months ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:14 by , 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 , 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:
Horse Riding Arena
: None (not translated elsewhere)Horse Riding Centre
: source:trunk/resources/data/defaultpresets.xml#L4065Sports Centre
: source:trunk/resources/data/defaultpresets.xml#L5162Stadium
: source:trunk/resources/data/defaultpresets.xml#L5154Racetrack
: source:trunk/resources/data/defaultpresets.xml#L5189
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.
comment:18 by , 23 months ago
Milestone: | 23.02 → 23.01 |
---|
patch update with blanks instead of tabs