Index: trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java	(revision 8679)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java	(revision 8680)
@@ -17,4 +17,5 @@
 import org.openstreetmap.josm.data.validation.Test;
 import org.openstreetmap.josm.data.validation.TestError;
+import org.openstreetmap.josm.tools.LanguageInfo;
 import org.openstreetmap.josm.tools.Predicates;
 import org.openstreetmap.josm.tools.Utils;
@@ -132,5 +133,5 @@
                     if (condition.matches(".*[0-9]:[0-9]{2}.*")) {
                         final List<OpeningHourTest.OpeningHoursTestError> errors = openingHourTest.checkOpeningHourSyntax(
-                                "", condition, OpeningHourTest.CheckMode.TIME_RANGE, true);
+                                "", condition, OpeningHourTest.CheckMode.TIME_RANGE, true, LanguageInfo.getJOSMLocaleCode());
                         if (!errors.isEmpty()) {
                             return errors.get(0).getMessage();
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 8679)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/OpeningHourTest.java	(revision 8680)
@@ -25,4 +25,5 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.io.CachedFile;
+import org.openstreetmap.josm.tools.LanguageInfo;
 
 /**
@@ -55,10 +56,11 @@
                     new CachedFile("resource://data/validator/opening_hours.js").getInputStream(), StandardCharsets.UTF_8)) {
                 ENGINE.eval(reader);
+                ENGINE.eval("var opening_hours = require('opening_hours');");
                 // fake country/state to not get errors on holidays
                 ENGINE.eval("var nominatimJSON = {address: {state: 'Bayern', country_code: 'de'}};");
                 ENGINE.eval(
-                        "var oh = function (value, mode) {" +
+                        "var oh = function (value, mode, locale) {" +
                         " try {" +
-                        "    var r= new opening_hours(value, nominatimJSON, mode);" +
+                        "    var r = new opening_hours(value, nominatimJSON, {mode: mode, locale: locale});" +
                         "    r.getErrors = function() {return [];};" +
                         "    return r;" +
@@ -85,6 +87,6 @@
     }
 
-    protected Object parse(String value, CheckMode mode) throws ScriptException, NoSuchMethodException {
-        return ((Invocable) ENGINE).invokeFunction("oh", value, mode.code);
+    protected Object parse(String value, CheckMode mode, String locale) throws ScriptException, NoSuchMethodException {
+        return ((Invocable) ENGINE).invokeFunction("oh", value, mode.code, locale);
     }
 
@@ -179,5 +181,5 @@
      */
     public List<OpeningHoursTestError> checkOpeningHourSyntax(final String key, final String value, CheckMode mode) {
-        return checkOpeningHourSyntax(key, value, mode, false);
+        return checkOpeningHourSyntax(key, value, mode, false, LanguageInfo.getJOSMLocaleCode());
     }
 
@@ -190,8 +192,9 @@
      * @param mode whether to validate {@code value} as a time range, or points in time, or both.
      * @param ignoreOtherSeverity whether to ignore errors with {@link Severity#OTHER}.
+     * @param locale the locale code used for localizing messages
      * @return a list of {@link TestError} or an empty list
      */
     public List<OpeningHoursTestError> checkOpeningHourSyntax(final String key, final String value, CheckMode mode,
-            boolean ignoreOtherSeverity) {
+            boolean ignoreOtherSeverity, String locale) {
         if (ENGINE == null || value == null || value.trim().isEmpty()) {
             return Collections.emptyList();
@@ -199,5 +202,5 @@
         final List<OpeningHoursTestError> errors = new ArrayList<>();
         try {
-            final Object r = parse(value, mode);
+            final Object r = parse(value, mode, locale);
             String prettifiedValue = null;
             try {
