Rename & organize linter messages
This commit is contained in:
parent
1d1a2ce1c8
commit
1e03910b0b
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -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": {
|
||||
|
|
|
@ -195,7 +195,7 @@
|
|||
</svg>
|
||||
</span>
|
||||
</section>
|
||||
<section id="lint"><h2 i18n-text="issues">: <span id="issue-count"></span><svg id="lint-help" class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg></h2><div></div></section>
|
||||
<section id="lint"><h2 i18n-text="linterIssues">: <span id="issue-count"></span><svg id="lint-help" class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg></h2><div></div></section>
|
||||
</div>
|
||||
<section id="sections">
|
||||
<h2><span id="sections-heading" i18n-text="styleSectionsTitle"></span><svg id="sections-help" class="svg-icon info"><use xlink:href="#svg-icon-help"/></svg></h2>
|
||||
|
|
|
@ -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'),
|
||||
}));
|
||||
|
|
18
edit/lint.js
18
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 ? `<li><b>${makeLink(rule.url || url, rule.name)}</b><br>${rule.desc}</li>` : '';
|
||||
};
|
||||
} else {
|
||||
header = t('issuesHelp', makeLink(url, 'stylelint'));
|
||||
header = t('linterIssuesHelp', makeLink(url, 'stylelint'));
|
||||
template = rule => `<li>${makeLink(url + rule, rule)}</li>`;
|
||||
}
|
||||
// to-do: change this to a generator
|
||||
|
@ -234,7 +234,7 @@ function showLintHelp() {
|
|||
rules.push(rule);
|
||||
}
|
||||
});
|
||||
return showHelp(t('issues'), header + list + '</ul>');
|
||||
return showHelp(t('linterIssues'), header + list + '</ul>');
|
||||
}
|
||||
|
||||
function showLinterErrorMessage(title, contents) {
|
||||
|
@ -294,7 +294,7 @@ function setupLinterSettingsEvents(popup) {
|
|||
if (invalid.length) {
|
||||
return showLinterErrorMessage(
|
||||
linter,
|
||||
t('setLinterInvalidRuleError') + `<ul><li>${invalid.join('</li><li>')}</li></ul>`
|
||||
t('linterInvalidRuleError') + `<ul><li>${invalid.join('</li><li>')}</li></ul>`
|
||||
);
|
||||
}
|
||||
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',
|
||||
|
|
Loading…
Reference in New Issue
Block a user