Removed option for SUPPORT_ACCESSIBILITY_CHECKS, regen'd strings.

This commit is contained in:
Jim Derry 2017-10-03 12:45:34 -04:00
parent dfa2501928
commit a1e4dcc066
25 changed files with 15 additions and 88 deletions

View file

@ -228,7 +228,6 @@ endif ()
# Macro Values
# These additional macros are set in Tidy's source code.
#------------------------------------------------------------------------
add_definitions ( -DSUPPORT_ACCESSIBILITY_CHECKS=1 )
add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" )
add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" )

View file

@ -362,9 +362,7 @@ static const CmdOptDesc cmdopt_defs[] = {
{ CmdOptProcDir, "-xml", TC_OPT_XML, 0, "input-xml: yes" },
{ CmdOptProcDir, "-asxml", TC_OPT_ASXML, 0, "output-xhtml: yes", "-asxhtml" },
{ CmdOptProcDir, "-ashtml", TC_OPT_ASHTML, 0, "output-html: yes" },
#if SUPPORT_ACCESSIBILITY_CHECKS
{ CmdOptProcDir, "-access <%s>", TC_OPT_ACCESS, TC_LABEL_LEVL, "accessibility-check: <%s>" },
#endif
{ CmdOptCharEnc, "-raw", TC_OPT_RAW, 0, NULL },
{ CmdOptCharEnc, "-ascii", TC_OPT_ASCII, 0, NULL },
{ CmdOptCharEnc, "-latin0", TC_OPT_LATIN0, 0, NULL },
@ -2357,8 +2355,6 @@ int main( int argc, char** argv )
--argc;
}
}
#if SUPPORT_ACCESSIBILITY_CHECKS
else if ( strcasecmp(arg, "access") == 0 )
{
if ( argc >= 3 )
@ -2373,7 +2369,6 @@ int main( int argc, char** argv )
}
}
}
#endif
else
{

View file

@ -1406,11 +1406,7 @@ typedef enum
FOREACH_FOOTNOTE_MSG(MAKE_ENUM)
FOREACH_DIALOG_MSG(MAKE_ENUM)
FOREACH_REPORT_MSG(MAKE_ENUM)
#if SUPPORT_ACCESSIBILITY_CHECKS
/* Defined in `access.h` */
FOREACH_ACCESS_MSG(MAKE_ENUM)
#endif
#if SUPPORT_CONSOLE_APP
FOREACH_MSG_CONSOLE(MAKE_ENUM)

View file

@ -77,11 +77,6 @@ extern "C" {
* Optional Tidy features support
*===========================================================================*/
/* Enable/disable support for additional accessibility checks */
#ifndef SUPPORT_ACCESSIBILITY_CHECKS
# define SUPPORT_ACCESSIBILITY_CHECKS 1
#endif
/* Enable/disable support for additional languages */
#ifndef SUPPORT_LOCALIZATIONS
# define SUPPORT_LOCALIZATIONS 1

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"PO-Revision-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"PO-Revision-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"PO-Revision-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"PO-Revision-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"PO-Revision-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:37:01\n"
"PO-Revision-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n"
"POT-Creation-Date: 2017-10-03 12:37:01\n"
"POT-Creation-Date: 2017-10-03 12:44:37\n"
"Last-Translator: jderry\n"
"Language-Team: \n"

View file

@ -8,9 +8,6 @@
#include "tidy-int.h"
#if SUPPORT_ACCESSIBILITY_CHECKS
#include "access.h"
#include "message.h"
#include "tags.h"
@ -3321,13 +3318,3 @@ void TY_(AccessibilityChecks)( TidyDocImpl* doc )
FreeAccessibilityChecks( doc );
}
#endif
/*
* local variables:
* mode: c
* indent-tabs-mode: nil
* c-basic-offset: 4
* eval: (c-set-offset 'substatement-open 0)
* end:
*/

View file

@ -4,11 +4,6 @@
/*********************************************************************
* carry out accessibility checks
*
* This module is an add-on to HTML Tidy and is enabled or disabled via
* the SUPPORT_ACCESSIBILITY_CHECKS macro, which is defined by default
* in `tidyplatform.h`. Search this code for this macro to determine
* other locations supporting code exists.
*
* This module carries out processes for all accessibility checks. It
* traverses through all the content within the tree and evaluates the
* tags for accessibility.
@ -37,8 +32,6 @@
#include "forward.h"
#if SUPPORT_ACCESSIBILITY_CHECKS
enum {
TEXTBUF_SIZE=128u
@ -94,5 +87,4 @@ struct _TidyAccessImpl
void TY_(AccessibilityChecks)( TidyDocImpl* doc );
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
#endif /* __ACCESS_H__ */

View file

@ -156,13 +156,6 @@ static PickListItems attributeCasePicks = {
#define DLF DEFAULT_NL_CONFIG
/* If Accessibility checks not supported, make config setting read-only */
#if SUPPORT_ACCESSIBILITY_CHECKS
#define ParseAcc ParsePickList
#else
#define ParseAcc NULL
#endif
static void AdjustConfig( TidyDocImpl* doc );
/* parser for integer values */
@ -203,7 +196,7 @@ static ParseProperty ParsePickList;
static const TidyOptionImpl option_defs[] =
{
{ TidyUnknownOption, MS, "unknown!", IN, 0, NULL, NULL },
{ TidyAccessibilityCheckLevel, DG, "accessibility-check", IN, 0, ParseAcc, &accessPicks },
{ TidyAccessibilityCheckLevel, DG, "accessibility-check", IN, 0, ParsePickList, &accessPicks },
{ TidyAltText, MU, "alt-text", ST, 0, ParseString, NULL },
{ TidyAnchorAsName, MU, "anchor-as-name", BL, yes, ParsePickList, &boolPicks },
{ TidyAsciiChars, CE, "ascii-chars", BL, no, ParsePickList, &boolPicks },

View file

@ -1953,8 +1953,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ XML_DECLARATION_DETECTED, 0, "An XML declaration was detected. Did you mean to use input-xml?" },
{ XML_ID_SYNTAX, 0, "%s ID \"%s\" uses XML ID syntax" },
#if SUPPORT_ACCESSIBILITY_CHECKS
/***************************************
** Report Output -- Accessibility
***************************************/
@ -2077,7 +2076,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ METADATA_MISSING, 0, "[13.2.1.1]: Metadata missing." },
{ METADATA_MISSING_REDIRECT_AUTOREFRESH, 0, "[13.2.1.3]: Metadata missing (redirect/auto-refresh)." },
{ SKIPOVER_ASCII_ART, 0, "[13.10.1.1]: skip over ascii art." },
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
#if SUPPORT_CONSOLE_APP

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
* PO_REVISION_DATE=2017-10-03 12:44:37
*/
#ifdef _MSC_VER
@ -147,8 +147,6 @@ static languageDefinition language_en_gb = { whichPluralForm_en_gb, {
},
{ UNKNOWN_ELEMENT_LOOKS_CUSTOM, 0, "%s is not recognised! Did you mean to enable the custom-tags option?" },
{ UNKNOWN_ELEMENT, 0, "%s is not recognised!" },
#if SUPPORT_ACCESSIBILITY_CHECKS
{ MULTIMEDIA_REQUIRES_TEXT, 0, "[1.4.1.1]: multimedia requires synchronised text equivalents." },
{ INFORMATION_NOT_CONVEYED_IMAGE, 0, "[2.1.1.1]: ensure information not conveyed through colour alone (image)." },
{ INFORMATION_NOT_CONVEYED_APPLET, 0, "[2.1.1.2]: ensure information not conveyed through colour alone (applet)." },
@ -160,8 +158,6 @@ static languageDefinition language_en_gb = { whichPluralForm_en_gb, {
{ COLOR_CONTRAST_ACTIVE_LINK, 0, "[2.2.1.3]: poor colour contrast (active link)." },
{ COLOR_CONTRAST_VISITED_LINK, 0, "[2.2.1.4]: poor colour contrast (visited link)." },
{ LAYOUT_TABLES_LINEARIZE_PROPERLY, 0, "[5.3.1.1]: verify layout tables linearise properly." },
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
#if SUPPORT_CONSOLE_APP
{ TC_TXT_HELP_LANG_2, 0,

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
* PO_REVISION_DATE=2017-10-03 12:44:37
*/
#ifdef _MSC_VER

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
* PO_REVISION_DATE=2017-10-03 12:44:37
*/
#ifdef _MSC_VER

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
* PO_REVISION_DATE=2017-10-03 12:44:37
*/
#ifdef _MSC_VER
@ -864,8 +864,6 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
{ WHITE_IN_URI, 0, "%s rejet des espaces dans la référence URI" },
{ XML_DECLARATION_DETECTED, 0, "Une déclaration XML a été détectée. Voulez-vous utiliser l'option input-xml?" },
{ XML_ID_SYNTAX, 0, "%s ID « %s » utilise la syntaxe XML ID" },
#if SUPPORT_ACCESSIBILITY_CHECKS
{ IMG_MISSING_ALT, 0, "[1.1.1.1]: <img> texte manquant 'alt'." },
{ IMG_ALT_SUSPICIOUS_FILENAME, 0, "[1.1.1.2]: texte 'alt' suspect (nom de fichier)." },
{ IMG_ALT_SUSPICIOUS_FILE_SIZE, 0, "[1.1.1.3]: texte 'alt' suspect (taille de fichier)." },
@ -988,8 +986,6 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
{ METADATA_MISSING, 0, "[13.2.1.1]: Métadonnées manquantes." },
{ METADATA_MISSING_REDIRECT_AUTOREFRESH, 0, "[13.2.1.3]: Métadonnées manquantes (redirect/auto-refresh)." },
{ SKIPOVER_ASCII_ART, 0, "[13.10.1.1]: ignore l'ascii art." },
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
#if SUPPORT_CONSOLE_APP
{ TC_LABEL_COL, 0, "colonne" },

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
* PO_REVISION_DATE=2017-10-03 12:44:37
*/
#ifdef _MSC_VER
@ -971,8 +971,6 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, {
{ WHITE_IN_URI, 0, "%s descartando espaço em branco na referência de URI" },
{ XML_DECLARATION_DETECTED, 0, "Uma declaração XML foi detectada. Você queria usar input-xml?" },
{ XML_ID_SYNTAX, 0, "%s ID \"%s\" usa sintaxe de ID de XML" },
#if SUPPORT_ACCESSIBILITY_CHECKS
{ IMG_MISSING_ALT, 0, "[1.1.1.1]: <img> carece de texto 'alt'." },
{ IMG_ALT_SUSPICIOUS_FILENAME, 0, "[1.1.1.2]: texto 'alt' suspeito (nome de arquivo)." },
{ IMG_ALT_SUSPICIOUS_FILE_SIZE, 0, "[1.1.1.3]: texto 'alt' suspeito (tamanho de arquivo)." },
@ -1098,8 +1096,6 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, {
{ METADATA_MISSING, 0, "[13.2.1.1]: faltando metadados." },
{ METADATA_MISSING_REDIRECT_AUTOREFRESH, 0, "[13.2.1.3]: faltando metadados (redirecionamento/autorrenovação)." },
{ SKIPOVER_ASCII_ART, 0, "[13.10.1.1]: pular arte em ascii." },
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
#if SUPPORT_CONSOLE_APP
{ TC_LABEL_COL, 0, "coluna" },

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:37:01
* PO_REVISION_DATE=2017-10-03 12:44:37
*/
#ifdef _MSC_VER

View file

@ -920,12 +920,10 @@ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...)
* rest of Tidy's code.
*********************************************************************/
#if SUPPORT_ACCESSIBILITY_CHECKS
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code )
{
TY_(Report)( doc, NULL, node, code );
}
#endif
void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code)
@ -1316,10 +1314,7 @@ static const tidyStringsKeyItem tidyStringsKeys[] = {
{ "TIDYSTRINGS_FIRST", TIDYSTRINGS_FIRST },
#if SUPPORT_ACCESSIBILITY_CHECKS
FOREACH_ACCESS_MSG(MAKE_STRUCT)
#endif
#if SUPPORT_CONSOLE_APP
FOREACH_MSG_CONSOLE(MAKE_STRUCT)

View file

@ -116,10 +116,7 @@ void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...);
/** @{ */
#if SUPPORT_ACCESSIBILITY_CHECKS
void TY_(ReportAccessError)( TidyDocImpl* doc, Node* node, uint code );
#endif
void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code);
void TY_(ReportBadArgument)( TidyDocImpl* doc, ctmbstr option );
void TY_(ReportEntityError)( TidyDocImpl* doc, uint code, ctmbstr entity, int c );

View file

@ -4404,11 +4404,9 @@ void TY_(ParseFrameSet)(TidyDocImpl* doc, Node *frameset, GetTokenMode ARG_UNUSE
}
/* discard unexpected tags */
#if SUPPORT_ACCESSIBILITY_CHECKS
/* WAI [6.5.1.4] link is being discarded outside of NOFRAME */
if ( nodeIsA(node) )
doc->badAccess |= BA_INVALID_LINK_NOFRAMES;
#endif
TY_(Report)(doc, frameset, node, DISCARDING_UNEXPECTED);
TY_(FreeNode)( doc, node);
@ -4908,11 +4906,9 @@ void TY_(ParseDocument)(TidyDocImpl* doc)
break;
}
#if SUPPORT_ACCESSIBILITY_CHECKS
/* do this before any more document fixes */
if ( cfg( doc, TidyAccessibilityCheckLevel ) > 0 )
TY_(AccessibilityChecks)( doc );
#endif /* #if SUPPORT_ACCESSIBILITY_CHECKS */
if (!TY_(FindHTML)(doc))
{

View file

@ -43,11 +43,7 @@ struct _TidyDocImpl
TidyConfigImpl config;
TidyTagImpl tags;
TidyAttribImpl attribs;
#if SUPPORT_ACCESSIBILITY_CHECKS
/* Accessibility Checks state */
TidyAccessImpl access;
#endif
/* The Pretty Print buffer */
TidyPrintImpl pprint;