Opened 3 months ago
Closed 3 months ago
#23874 closed defect (fixed)
Syntax error in mapcss files since r19169
Reported by: | Famlam | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core validator | Version: | latest |
Keywords: | mapcss | Cc: | taylor.smock |
Description
What steps will reproduce the problem?
In r19169 (cc Taylor) the following mapcss lines were added to deprecated.mapcss:
throwWarning: tr("{0} should be replaced by {1}", "{1.tag}", "geological=esker"; throwWarning: tr("{0} should be replaced by {1}", "{1.tag}", "geological=moraine"; throwWarning: tr("{0} should be replaced by {1}", "{1.tag}", "natural=beach"; throwWarning: tr("{0} should be replaced by {1}", "{1.tag}", "natural=tundra";
Unfortunately, each of these lines is missing a )
before the final ;
What is the expected result?
4x )
added
What happens instead?
This results in faulty output messages:
tr("{0} should be replaced by {1}", "landform=beach", "natural=beach", gebruik in plaats daarvan natural=beach
instead of
landform=beach should be replaced by natural=beach [etc...]
(The suggestAlternative text is in Dutch due to my JOSM setup)
Please provide any additional information below. Attach a screenshot if possible.
I'm actually surprised it still parses this relatively well :)
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2024-08-16 18:04:22 +0200 (Fri, 16 Aug 2024) Revision:19198 Build-Date:2024-08-17 01:30:31 URL:https://josm.openstreetmap.de/svn/trunk Identification: JOSM/1.5 (19198 nl) Windows 10 64-Bit OS Build number: Windows 10 Home 22H2 (19045) Memory Usage: 339 MB / 2012 MB (154 MB allocated, but free) Java version: 21.0.4+7-LTS, Azul Systems, Inc., OpenJDK 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920x1080x32bpp@60Hz (scaling 1.10×1.10) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: UTF-8 System property sun.jnu.encoding: Cp1252 Locale info: nl_NL Numbers with default locale: 1234567890 -> 1234567890 VM arguments: [-Djpackage.app-version=1.5.19160, --add-modules=java.scripting,java.sql,javafx.controls,javafx.media,javafx.swing,javafx.web, --add-exports=java.base/sun.security.action=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.plugins.jpeg=ALL-UNNAMED, --add-exports=java.desktop/com.sun.imageio.spi=ALL-UNNAMED, --add-opens=java.base/java.lang=ALL-UNNAMED, --add-opens=java.base/java.nio=ALL-UNNAMED, --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED, --add-opens=java.base/jdk.internal.ref=ALL-UNNAMED, --add-opens=java.desktop/javax.imageio.spi=ALL-UNNAMED, --add-opens=java.desktop/javax.swing.text.html=ALL-UNNAMED, --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED, -Djpackage.app-path=%UserProfile%\AppData\Local\JOSM\JOSM.exe] Dataset consistency test: No problems found
So am I. It should be failing in
ValidatorTagCheckerRulesPreferenceTestIT
, and it isn't.This looks like a general issue with
tr
though. Probably since it can have an indefinite number of arguments.