From 04fc131e4d3db61d945ca9db6586a5a4e837939c Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 28 Feb 2017 12:14:12 +0100 Subject: Fix text-less popup hints for highlighting It would probably be better to add a new class of hint instead, or to support this in the translation/template engine. --- js/codeq/hint.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js') diff --git a/js/codeq/hint.js b/js/codeq/hint.js index 0c4b2f2..b869d99 100644 --- a/js/codeq/hint.js +++ b/js/codeq/hint.js @@ -1,5 +1,5 @@ /* CodeQ: an online programming tutor. - Copyright (C) 2015 UL FRI + Copyright (C) 2015-2017 UL FRI This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free @@ -258,7 +258,6 @@ along with this program. If not, see . */ // highlight given range in the editor var mark = addMark(hint.start, hint.end, style); - if (!template) return; // execute templates for all languages for (i = langs.length - 1; i >= 0; i--) { @@ -268,8 +267,9 @@ along with this program. If not, see . */ translations[lang] = codeq.template.process(content, templatePath, args); } else { - translations[lang] = 'No translation in ' + lang + ' available for popup hint ' + hint.id; - codeq.log.error(translations[lang]); + // any missing translation → no popup + // TODO support highlight-only hints instead + return; } } // construct the wrapper element for the translation mechanism -- cgit v1.2.1