diff --git a/_locales/bg/messages.json b/_locales/bg/messages.json index 9c95ffe9..4d92d798 100644 --- a/_locales/bg/messages.json +++ b/_locales/bg/messages.json @@ -27,7 +27,7 @@ "message": "Изнасяне", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Проблеми", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -664,7 +664,7 @@ "message": "Прозорец за настройките", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Проблеми, намерени от $link$ при следните правила:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/cs/messages.json b/_locales/cs/messages.json index b00a9ce4..978c701e 100644 --- a/_locales/cs/messages.json +++ b/_locales/cs/messages.json @@ -27,7 +27,7 @@ "message": "Exportovat", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Problémy", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -652,7 +652,7 @@ "message": "Možnosti rozhraní", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Problémy nalezené aplikací $link$ s těmito povolenými pravidly:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 08e0496b..ff0b0d1d 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -27,7 +27,7 @@ "message": "Exportieren", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Probleme", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -632,7 +632,7 @@ "message": "Optionen", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Die von $link$ gefunden Fehler haben die folgenden Einstellungen:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/en/messages.json b/_locales/en/messages.json index cf1d0551..4774b077 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -349,11 +349,23 @@ "message": "Install update", "description": "Label for the button to install an update for a single style" }, - "issues": { + "linterConfigTitle": { + "message": "Open a popup to configure the linter rules", + "description": "Tooltip on an icon to indicate it opens a popup with linter configuration settings" + }, + "linterCSSLintSettings": { + "message": "(Set rules: 0 = disabled; 1 = warning; 2 = error)", + "description": "CSSLint rule settings values" + }, + "linterInvalidRuleError": { + "message": "Not saved due to these invalid rules:", + "description": "Invalid linter rules will show a message followed by a list of invalid rules" + }, + "linterIssues": { "message": "Issues", "description": "Label for the CSS linter issues block on the style edit page" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "The issues found by $link$ rules:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { @@ -362,9 +374,26 @@ } } }, - "linterConfigTitle": { - "message": "Open a popup to configure the linter rules", - "description": "Tooltip on an icon to indicate it opens a popup with linter configuration settings" + "linterJSONError": { + "message": "Invalid JSON format", + "description": "Setting linter rules with invalid JSON message" + }, + "linterResetMessage": { + "message": "To undo accidental reset, press Ctrl-Z (or Cmd-Z) in the text box", + "description": "Reset button tooltip to inform user on how to undo an accidental reset" + }, + "linterRulesLink": { + "message": "See a full list of rules", + "description": "Stylelint or CSSLint rules label added before a link" + }, + "linterRulesTitle": { + "message": "Set rules for $linter$", + "description": "Stylelint or CSSLint popup header", + "placeholders": { + "linter": { + "content": "$1" + } + } }, "manageFilters": { "message": "Filters", @@ -518,35 +547,6 @@ "message": "Remove section", "description": "Label for the button to remove a section" }, - "setLinterLink": { - "message": "See a full list of rules", - "description": "Stylelint or CSSLint rules label added before a link" - }, - "setLinterRulesTitle": { - "message": "Set rules for $linter$", - "description": "Stylelint or CSSLint popup header", - "placeholders": { - "linter": { - "content": "$1" - } - } - }, - "setLinterError": { - "message": "Invalid JSON format", - "description": "Setting linter rules with invalid JSON message" - }, - "setLinterInvalidRuleError": { - "message": "Not saved due to these invalid rules:", - "description": "Invalid linter rules will show a message followed by a list of invalid rules" - }, - "setLinterResetMessage": { - "message": "To undo accidental reset, press Ctrl-Z (or Cmd-Z) in the text box", - "description": "Reset button tooltip to inform user on how to undo an accidental reset" - }, - "showCSSLintSettings": { - "message": "(Set rules: 0 = disabled; 1 = warning; 2 = error)", - "description": "CSSLint rule settings values" - }, "shortcuts": { "message": "Shortcuts", "description": "Go to shortcut configuration" diff --git a/_locales/es/messages.json b/_locales/es/messages.json index caea53af..e7d870ad 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -27,7 +27,7 @@ "message": "Exportar", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Problemas", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -656,7 +656,7 @@ "message": "Interfaz de opciones", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Problemas encontrados por $link$ con estas reglas aplicadas:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/et/messages.json b/_locales/et/messages.json index be2b90c7..8215d9f3 100644 --- a/_locales/et/messages.json +++ b/_locales/et/messages.json @@ -27,7 +27,7 @@ "message": "Ekspordi", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Vead", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -652,7 +652,7 @@ "message": "Valikute liides", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "$link$ poolt leitud vead nende lubatud reeglitega:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 7b4907e7..b895e6b7 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -27,7 +27,7 @@ "message": "エクスポート", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "問題点", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -648,7 +648,7 @@ "message": "オプション UI", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "これらのルールを有効にして $link$ で見つかった問題:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/nl/messages.json b/_locales/nl/messages.json index b5d23ac0..3bb836b4 100644 --- a/_locales/nl/messages.json +++ b/_locales/nl/messages.json @@ -11,7 +11,7 @@ "message": "Exporteren", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Problemen", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -344,7 +344,7 @@ "message": "Controleer alle stijlen op updates", "description": "Label for the button to check all styles for updates" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "De door stylelint gevonden problemen, $link$, met deze ingeschakelde regels:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/pl/messages.json b/_locales/pl/messages.json index 166fb9ad..9fa369fe 100644 --- a/_locales/pl/messages.json +++ b/_locales/pl/messages.json @@ -27,7 +27,7 @@ "message": "Eksportuj", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Problemy", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -656,7 +656,7 @@ "message": "Opcje interfejsu", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Problemy znalezione przez $link$ z tymi włączonymi regułami:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index 13d8a783..3c8c0fad 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -27,7 +27,7 @@ "message": "Экспорт", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Проблемы", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -656,7 +656,7 @@ "message": "Настройки", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Проблемы и предупреждения по версии $link$ с данными включенными правилами:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/sr/messages.json b/_locales/sr/messages.json index 33c4736e..709440f7 100644 --- a/_locales/sr/messages.json +++ b/_locales/sr/messages.json @@ -11,7 +11,7 @@ "message": "Извези", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "Проблеми", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -356,7 +356,7 @@ "message": "Проверите ажурирања за све стилове", "description": "Label for the button to check all styles for updates" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "Проблем пронађен од стране $link$ са овим омогућеним правилима:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index be8d1007..db591542 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -27,7 +27,7 @@ "message": "导出", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "问题", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -656,7 +656,7 @@ "message": "设置用户界面", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "$link$ 在已启用的这些规则中找到问题:", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index cb750f64..b59d3ffa 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -27,7 +27,7 @@ "message": "導出", "description": "Label for the button to export a style ('edit' page) or all styles ('manage' page)" }, - "issues": { + "linterIssues": { "message": "問題", "description": "Label for the CSS linter issues block on the style edit page" }, @@ -660,7 +660,7 @@ "message": "選項介面", "description": "Go to Options UI" }, - "issuesHelp": { + "linterIssuesHelp": { "message": "由$link$發現啟用這些規則會產生衝突", "description": "Help popup message for the selected CSS linter issues block on the style edit page", "placeholders": { diff --git a/edit.html b/edit.html index 53762564..7e3164fb 100644 --- a/edit.html +++ b/edit.html @@ -195,7 +195,7 @@   -

:

+

:

diff --git a/edit/edit.js b/edit/edit.js index 1f3d72a1..38eade7c 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -1571,7 +1571,7 @@ function fromMozillaFormat() { firstAddedCM.focus(); if (errors.length) { - showHelp(t('issues'), $element({ + showHelp(t('linterIssues'), $element({ tag: 'pre', textContent: errors.join('\n'), })); diff --git a/edit/lint.js b/edit/lint.js index 2e4ce5a6..ae5c5b7a 100644 --- a/edit/lint.js +++ b/edit/lint.js @@ -217,13 +217,13 @@ function showLintHelp() { if (linter === 'csslint') { const CSSLintRules = window.CSSLint.getRules(); const findCSSLintRule = id => CSSLintRules.find(rule => rule.id === id); - header = t('issuesHelp', makeLink('https://github.com/CSSLint/csslint/wiki/Rules-by-ID', 'CSSLint')); + header = t('linterIssuesHelp', makeLink('https://github.com/CSSLint/csslint/wiki/Rules-by-ID', 'CSSLint')); template = ruleID => { const rule = findCSSLintRule(ruleID); return rule ? `
  • ${makeLink(rule.url || url, rule.name)}
    ${rule.desc}
  • ` : ''; }; } else { - header = t('issuesHelp', makeLink(url, 'stylelint')); + header = t('linterIssuesHelp', makeLink(url, 'stylelint')); template = rule => `
  • ${makeLink(url + rule, rule)}
  • `; } // to-do: change this to a generator @@ -234,7 +234,7 @@ function showLintHelp() { rules.push(rule); } }); - return showHelp(t('issues'), header + list + ''); + return showHelp(t('linterIssues'), header + list + ''); } function showLinterErrorMessage(title, contents) { @@ -294,7 +294,7 @@ function setupLinterSettingsEvents(popup) { if (invalid.length) { return showLinterErrorMessage( linter, - t('setLinterInvalidRuleError') + `` + t('linterInvalidRuleError') + `` ); } if (linter === 'stylelint') { @@ -305,7 +305,7 @@ function setupLinterSettingsEvents(popup) { updateLinter(linter); showSavedMessage(); } else { - showLinterErrorMessage(linter, t('setLinterError')); + showLinterErrorMessage(linter, t('linterJSONError')); } popup.codebox.focus(); }); @@ -365,24 +365,24 @@ function setupLinterPopup(rules) { cm.setOption('mode', 'application/json'); cm.setOption('lint', 'json'); } - const popup = showCodeMirrorPopup(t('setLinterRulesTitle', linterTitle), $element({ + const popup = showCodeMirrorPopup(t('linterRulesTitle', linterTitle), $element({ appendChild: [ $element({ tag: 'p', appendChild: [ - t('setLinterLink') + ' ', + t('linterRulesLink') + ' ', makeLink( linter === 'stylelint' ? 'https://stylelint.io/demo/' : 'https://github.com/CSSLint/csslint/wiki/Rules-by-ID', linterTitle ), - linter === 'csslint' ? ' ' + t('showCSSLintSettings') : '' + linter === 'csslint' ? ' ' + t('linterCSSLintSettings') : '' ] }), makeButton('save', 'styleSaveLabel'), makeButton('cancel', 'confirmCancel'), - makeButton('reset', 'genericResetLabel', {title: t('setLinterResetMessage')}), + makeButton('reset', 'genericResetLabel', {title: t('linterResetMessage')}), $element({ tag: 'span', className: 'saved-message',