Skip to content

Commit

Permalink
lets group dep element msg to
Browse files Browse the repository at this point in the history
  • Loading branch information
7h3Rabbit committed Aug 22, 2024
1 parent e88c5ab commit 101a420
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 6 deletions.
Binary file modified locales/en/LC_MESSAGES/html_validator_w3c.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion locales/en/LC_MESSAGES/html_validator_w3c.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ msgid "TEXT_REVIEW_RATING_ITEMS"
msgstr "- Number of errors: {0}"

msgid "TEXT_REVIEW_DEPRECATED_ELEMENT"
msgstr "The use of `{0}>` element is deprecated."
msgstr "The use of {0} element is deprecated."
Binary file modified locales/gov/LC_MESSAGES/html_validator_w3c.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion locales/gov/LC_MESSAGES/html_validator_w3c.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ msgid "TEXT_REVIEW_RATING_ITEMS"
msgstr "- Number of errors: {0}"

msgid "TEXT_REVIEW_DEPRECATED_ELEMENT"
msgstr "The use of `{0}>` element is deprecated."
msgstr "The use of {0} element is deprecated."
Binary file modified locales/sv/LC_MESSAGES/html_validator_w3c.mo
Binary file not shown.
2 changes: 1 addition & 1 deletion locales/sv/LC_MESSAGES/html_validator_w3c.po
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ msgid "TEXT_REVIEW_RATING_ITEMS"
msgstr "- Antal fel: {0}"

msgid "TEXT_REVIEW_DEPRECATED_ELEMENT"
msgstr "Användningen av elementet `{0}>` är föråldrad."
msgstr "Användningen av elementet {0} är föråldrad."
5 changes: 2 additions & 3 deletions tests/html_validator_w3c.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from helpers.setting_helper import get_config

# DEFAULTS
HTML_REVIEW_GROUP_ERRORS = True
HTML_START_STRINGS = [
'Start tag seen without seeing a doctype first. Expected “<!DOCTYPE html>”',
'Element “head” is missing a required instance of child element “title”.'
Expand Down Expand Up @@ -155,7 +154,7 @@ def create_review_and_rating(

tmp = re.sub(
r"(“[^”]+”)", "X", error_message, 0, re.MULTILINE)
if HTML_REVIEW_GROUP_ERRORS:
if not get_config('general.review.details'):
error_message = tmp

if msg_grouped_dict.get(error_message, False):
Expand Down Expand Up @@ -274,7 +273,7 @@ def get_errors_for_html(url, html, local_translation):
continue
results.append({
'type': 'error',
'message': local_translation('TEXT_REVIEW_DEPRECATED_ELEMENT').format(element)
'message': local_translation('TEXT_REVIEW_DEPRECATED_ELEMENT').format(element.replace('<', ''))
})

return results

0 comments on commit 101a420

Please sign in to comment.