Skip to content

Commit

Permalink
core(canonical): proper explanation for url misuse (#12676)
Browse files Browse the repository at this point in the history
  • Loading branch information
todortotev authored Jul 8, 2021
1 parent 08425f0 commit 000da66
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lighthouse-core/audits/seo/canonical.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const UIStrings = {
* @description Explanatory message stating that there was a failure in an audit caused by a URL being relative instead of absolute.
* @example {https://example.com/} url
* */
explanationRelative: 'Relative URL ({url})',
explanationRelative: 'Is not an absolute URL ({url})',
/**
* @description Explanatory message stating that there was a failure in an audit caused by a URL pointing to a different hreflang than the current context.'hreflang' is an HTML attribute and should not be translated.
* @example {https://example.com/} url
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/lib/i18n/locales/en-US.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lighthouse-core/lib/i18n/locales/en-XL.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lighthouse-core/test/audits/seo/canonical-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ describe('SEO: Document has valid canonical link', () => {
return CanonicalAudit.audit(artifacts, context).then(auditResult => {
const {score, explanation} = auditResult;
assert.equal(score, 0);
expect(explanation).toBeDisplayString('Relative URL (/)');
expect(explanation).toBeDisplayString('Is not an absolute URL (/)');
});
});

Expand Down

0 comments on commit 000da66

Please sign in to comment.