Merge branch 'dialogue_cleanup' into next

Version bump for internal API change.

Conflicts:
	version.txt
This commit is contained in:
Jim Derry 2017-09-20 17:47:27 -04:00
commit 2a4dc1af52
16 changed files with 832 additions and 650 deletions

View file

@ -1506,8 +1506,8 @@ TIDY_EXPORT int TIDY_CALL tidyParseSource(TidyDoc tdoc, /**< T
*/
TIDY_EXPORT int TIDY_CALL tidyCleanAndRepair( TidyDoc tdoc );
/** Run configured diagnostics on parsed and repaired markup. You must call
** tidyCleanAndRepair() before using this function.
/** Reports the document type and diagnostic statistics on parsed and repaired
** markup. You must call tidyCleanAndRepair() before using this function.
** @param tdoc The tidy document to use.
** @result An integer representing the status.
*/

View file

@ -100,27 +100,15 @@ extern "C" {
** application specific messages.
*/
#define FOREACH_MSG_MISC(FN) \
/** File can't be opened */ FN(FILE_CANT_OPEN) \
/** File can't be opened */ FN(FILE_CANT_OPEN_CFG) \
/** Not a file */ FN(FILE_NOT_FILE) \
/** line %d column %d */ FN(LINE_COLUMN_STRING) \
/** Document content looks like %s */ FN(STRING_CONTENT_LOOKS) \
/** discarding */ FN(STRING_DISCARDING) \
/** Doctype given is %s */ FN(STRING_DOCTYPE_GIVEN) \
/** %u %s, %u %s were found! */ FN(STRING_ERROR_COUNT) \
/** error and errors */ FN(STRING_ERROR_COUNT_ERROR) \
/** warning and warnings */ FN(STRING_ERROR_COUNT_WARNING) \
/** Accessibility hello message */ FN(STRING_HELLO_ACCESS) \
/** HTML Proprietary */ FN(STRING_HTML_PROPRIETARY) \
/** missing or malformed argument for option: */ FN(STRING_MISSING_MALFORMED) \
/** Errors must be fixed */ FN(STRING_NEEDS_INTERVENTION) \
/** No warnings or errors were found */ FN(STRING_NO_ERRORS) \
/** No system identifier in emitted doctype */ FN(STRING_NO_SYSID) \
/** Not all warnings/errors were shown */ FN(STRING_NOT_ALL_SHOWN) \
/** plain text */ FN(STRING_PLAIN_TEXT) \
/** replacing */ FN(STRING_REPLACING) \
/** specified */ FN(STRING_SPECIFIED) \
/** unknown option: %s */ FN(STRING_UNKNOWN_OPTION) \
/** XML declaration */ FN(STRING_XML_DECLARATION) \
/** no */ FN(TIDYCUSTOMNO_STRING) \
/** block level */ FN(TIDYCUSTOMBLOCKLEVEL_STRING) \
@ -133,13 +121,11 @@ extern "C" {
** Tidy when certain conditions exist, and provide more verbose explanations
** than the short report.
*/
#define FOREACH_DIALOG_MSG(FN) \
#define FOREACH_FOOTNOTE_MSG(FN) \
/** Explanatory text. */ FN(TEXT_ACCESS_ADVICE1) \
/** Explanatory text. */ FN(TEXT_ACCESS_ADVICE2) \
/** Explanatory text. */ FN(TEXT_BAD_FORM) \
/** Explanatory text. */ FN(TEXT_BAD_MAIN) \
/** Explanatory text. */ FN(TEXT_GENERAL_INFO_PLEA) \
/** Explanatory text. */ FN(TEXT_GENERAL_INFO) \
/** Explanatory text. */ FN(TEXT_HTML_T_ALGORITHM) \
/** Explanatory text. */ FN(TEXT_INVALID_URI) \
/** Explanatory text. */ FN(TEXT_INVALID_UTF16) \
@ -159,6 +145,22 @@ extern "C" {
/** Explanatory text. */ FN(TEXT_WINDOWS_CHARS)
/** These messages are used to generate additional dialogue style output from
** Tidy when certain conditions exist, and provide more verbose explanations
** than the short report.
*/
#define FOREACH_DIALOG_MSG(FN) \
FN(STRING_CONTENT_LOOKS) \
FN(STRING_DOCTYPE_GIVEN) \
FN(STRING_ERROR_COUNT) \
FN(STRING_NEEDS_INTERVENTION) \
FN(STRING_NO_ERRORS) \
FN(STRING_NO_SYSID) \
FN(STRING_NOT_ALL_SHOWN) \
FN(TEXT_GENERAL_INFO_PLEA) \
FN(TEXT_GENERAL_INFO)
/** These are report messages, i.e., messages that appear in Tidy's table
** of errors and warnings.
*/
@ -189,6 +191,9 @@ extern "C" {
FN(ELEMENT_VERS_MISMATCH_WARN) \
FN(ENCODING_MISMATCH) \
FN(ESCAPED_ILLEGAL_URI) \
FN(FILE_CANT_OPEN) \
FN(FILE_CANT_OPEN_CFG) \
FN(FILE_NOT_FILE) \
FN(FIXED_BACKSLASH) \
FN(FOUND_STYLE_IN_BODY) \
FN(ID_NAME_MISMATCH) \
@ -235,6 +240,8 @@ extern "C" {
FN(REPLACING_ELEMENT) \
FN(REPLACING_UNEX_ELEMENT) \
FN(SPACE_PRECEDING_XMLDECL) \
FN(STRING_MISSING_MALFORMED) \
FN(STRING_UNKNOWN_OPTION) \
FN(SUSPECTED_MISSING_QUOTE) \
FN(TAG_NOT_ALLOWED_IN) \
FN(TOO_MANY_ELEMENTS_IN) \
@ -1342,16 +1349,17 @@ typedef enum
*/
typedef enum
{
TidyInfo = 350, /**< Report: Information about markup usage */
TidyWarning, /**< Report: Warning message */
TidyConfig, /**< Report: Configuration error */
TidyAccess, /**< Report: Accessibility message */
TidyError, /**< Report: Error message - output suppressed */
TidyBadDocument, /**< Report: I/O or file system error */
TidyFatal, /**< Report: Crash! */
TidyDialogueInfo, /**< Dialogue: Non-document related information */
TidyDialogueSummary, /**< Dialogue: Summary-related information */
TidyDialogueDoc, /**< Dialogue: Document-related information */
TidyInfo = 350, /**< Report: Information about markup usage */
TidyWarning, /**< Report: Warning message */
TidyConfig, /**< Report: Configuration error */
TidyAccess, /**< Report: Accessibility message */
TidyError, /**< Report: Error message - output suppressed */
TidyBadDocument, /**< Report: I/O or file system error */
TidyFatal, /**< Report: Crash! */
TidyDialogueSummary, /**< Dialogue: Summary-related information */
TidyDialogueInfo, /**< Dialogue: Non-document related information */
TidyDialogueFootnote, /**< Dialogue: Footnote */
TidyDialogueDoc = TidyDialogueFootnote, /**< Dialogue: Deprecated (renamed) */
} TidyReportLevel;
@ -1397,6 +1405,7 @@ typedef enum
TIDYSTRINGS_FIRST = 500,
FOREACH_MSG_MISC(MAKE_ENUM)
FOREACH_FOOTNOTE_MSG(MAKE_ENUM)
FOREACH_DIALOG_MSG(MAKE_ENUM)
FOREACH_REPORT_MSG(MAKE_ENUM)

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-09-06 20:53:40\n"
"PO-Revision-Date: 2017-09-19 14:00:03\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1784,31 +1784,16 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
msgctxt "TidyDialogueSummary"
msgid "Summary: "
msgstr ""
msgctxt "TidyDialogueDoc"
msgid "Document: "
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgctxt "TidyDialogueFootnote"
msgid "Footnote: "
msgstr ""
#, c-format
@ -1816,27 +1801,11 @@ msgctxt "LINE_COLUMN_STRING"
msgid "line %d column %d - "
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#. For example, "discarding invalid UTF-16 surrogate pair"
msgctxt "STRING_DISCARDING"
msgid "discarding"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
msgctxt "STRING_ERROR_COUNT_ERROR"
msgid "error"
msgid_plural "errors"
@ -1858,36 +1827,10 @@ msgctxt "STRING_HTML_PROPRIETARY"
msgid "HTML Proprietary"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
msgctxt "STRING_XML_DECLARATION"
msgid "XML declaration"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
msgid "plain text"
msgstr ""
@ -1902,11 +1845,6 @@ msgctxt "STRING_SPECIFIED"
msgid "specified"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "TIDYCUSTOMNO_STRING"
msgid "no"
msgstr ""
@ -2130,6 +2068,43 @@ msgctxt "TEXT_USING_BODY"
msgid "You are recommended to use CSS to specify page and link colors"
msgstr "You are recommended to use CSS to specify page and link colours\n"
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "TEXT_GENERAL_INFO"
@ -2278,6 +2253,21 @@ msgctxt "ESCAPED_ILLEGAL_URI"
msgid "%s escaping malformed URI reference"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr ""
#, c-format
msgctxt "FIXED_BACKSLASH"
msgid "%s converting backslash in URI to slash"
@ -2500,6 +2490,16 @@ msgctxt "SPACE_PRECEDING_XMLDECL"
msgid "removing whitespace preceding XML Declaration"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "SUSPECTED_MISSING_QUOTE"
msgid "missing quote mark for attribute value"
msgstr ""

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-09-06 20:53:40\n"
"PO-Revision-Date: 2017-09-19 14:00:03\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1732,31 +1732,16 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
msgctxt "TidyDialogueSummary"
msgid "Summary: "
msgstr ""
msgctxt "TidyDialogueDoc"
msgid "Document: "
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgctxt "TidyDialogueFootnote"
msgid "Footnote: "
msgstr ""
#, c-format
@ -1764,27 +1749,11 @@ msgctxt "LINE_COLUMN_STRING"
msgid "line %d column %d - "
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#. For example, "discarding invalid UTF-16 surrogate pair"
msgctxt "STRING_DISCARDING"
msgid "discarding"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
msgctxt "STRING_ERROR_COUNT_ERROR"
msgid "error"
msgid_plural "errors"
@ -1806,36 +1775,10 @@ msgctxt "STRING_HTML_PROPRIETARY"
msgid "HTML Proprietary"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
msgctxt "STRING_XML_DECLARATION"
msgid "XML declaration"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
msgid "plain text"
msgstr ""
@ -1850,11 +1793,6 @@ msgctxt "STRING_SPECIFIED"
msgid "specified"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "TIDYCUSTOMNO_STRING"
msgid "no"
msgstr ""
@ -2074,6 +2012,43 @@ msgctxt "TEXT_USING_BODY"
msgid "You are recommended to use CSS to specify page and link colors"
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "TEXT_GENERAL_INFO"
@ -2222,6 +2197,21 @@ msgctxt "ESCAPED_ILLEGAL_URI"
msgid "%s escaping malformed URI reference"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr ""
#, c-format
msgctxt "FIXED_BACKSLASH"
msgid "%s converting backslash in URI to slash"
@ -2444,6 +2434,16 @@ msgctxt "SPACE_PRECEDING_XMLDECL"
msgid "removing whitespace preceding XML Declaration"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "SUSPECTED_MISSING_QUOTE"
msgid "missing quote mark for attribute value"
msgstr ""

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-09-06 20:53:40\n"
"PO-Revision-Date: 2017-09-19 14:00:03\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1727,31 +1727,16 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
msgctxt "TidyDialogueSummary"
msgid "Summary: "
msgstr ""
msgctxt "TidyDialogueDoc"
msgid "Document: "
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgctxt "TidyDialogueFootnote"
msgid "Footnote: "
msgstr ""
#, c-format
@ -1759,27 +1744,11 @@ msgctxt "LINE_COLUMN_STRING"
msgid "line %d column %d - "
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#. For example, "discarding invalid UTF-16 surrogate pair"
msgctxt "STRING_DISCARDING"
msgid "discarding"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
msgctxt "STRING_ERROR_COUNT_ERROR"
msgid "error"
msgid_plural "errors"
@ -1801,36 +1770,10 @@ msgctxt "STRING_HTML_PROPRIETARY"
msgid "HTML Proprietary"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
msgctxt "STRING_XML_DECLARATION"
msgid "XML declaration"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
msgid "plain text"
msgstr ""
@ -1845,11 +1788,6 @@ msgctxt "STRING_SPECIFIED"
msgid "specified"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "TIDYCUSTOMNO_STRING"
msgid "no"
msgstr ""
@ -2069,6 +2007,43 @@ msgctxt "TEXT_USING_BODY"
msgid "You are recommended to use CSS to specify page and link colors"
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "TEXT_GENERAL_INFO"
@ -2217,6 +2192,21 @@ msgctxt "ESCAPED_ILLEGAL_URI"
msgid "%s escaping malformed URI reference"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr ""
#, c-format
msgctxt "FIXED_BACKSLASH"
msgid "%s converting backslash in URI to slash"
@ -2439,6 +2429,16 @@ msgctxt "SPACE_PRECEDING_XMLDECL"
msgid "removing whitespace preceding XML Declaration"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "SUSPECTED_MISSING_QUOTE"
msgid "missing quote mark for attribute value"
msgstr ""

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-09-06 20:53:40\n"
"PO-Revision-Date: 2017-09-19 14:00:03\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -2046,59 +2046,28 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr "Panique:"
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr "Informations: "
msgctxt "TidyDialogueSummary"
msgid "Summary: "
msgstr "Résumé:"
msgctxt "TidyDialogueDoc"
msgid "Document: "
msgstr "Document:"
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr "Informations: "
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr "Impossible d'ouvrir « %s »\n"
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr "\"%s\" n'est pas un fichier!\n"
msgctxt "TidyDialogueFootnote"
msgid "Footnote: "
msgstr "Remarque:"
#, c-format
msgctxt "LINE_COLUMN_STRING"
msgid "line %d column %d - "
msgstr "Ligne: %d Col: %d - "
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr "Le contenu du document ressemble à %s"
#. For example, "discarding invalid UTF-16 surrogate pair"
msgctxt "STRING_DISCARDING"
msgid "discarding"
msgstr "rejet"
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr "DOCTYPE donnée est «%s»"
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr "Tidy a trouvé %u %s et %u %s!"
msgctxt "STRING_ERROR_COUNT_ERROR"
msgid "error"
msgid_plural "errors"
@ -2122,38 +2091,10 @@ msgctxt "STRING_HTML_PROPRIETARY"
msgid "HTML Proprietary"
msgstr "HTML Propriétaire"
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr "argument manquant ou incorrect pour l'option: %s"
msgctxt "STRING_XML_DECLARATION"
msgid "XML declaration"
msgstr "déclaration XML"
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
"Ce document contient des erreurs qui doivent d'abord être résolues\n"
"en utilisant HTML Tidy pour produire une version nettoyée.\n"
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr "Aucun avertissement ou erreur trouvée."
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr "Aucun identifiant système dans le doctype soumis"
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr "Tidy a trouvé %u %s et %u %s! Tous les avertissements et erreurs n'ont pas été affichés."
msgctxt "STRING_PLAIN_TEXT"
msgid "plain text"
msgstr "texte brut"
@ -2168,11 +2109,6 @@ msgctxt "STRING_SPECIFIED"
msgid "specified"
msgstr "précisé"
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr "option inconnue: %s"
msgctxt "TIDYCUSTOMNO_STRING"
msgid "no"
msgstr "aucune"
@ -2504,6 +2440,45 @@ msgstr ""
"Il est recommandé d'utiliser les CSS pour préciser les couleurs \n"
"de la page et des liens"
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr "Le contenu du document ressemble à %s"
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr "DOCTYPE donnée est «%s»"
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr "Tidy a trouvé %u %s et %u %s!"
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
"Ce document contient des erreurs qui doivent d'abord être résolues\n"
"en utilisant HTML Tidy pour produire une version nettoyée.\n"
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr "Aucun avertissement ou erreur trouvée."
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr "Aucun identifiant système dans le doctype soumis"
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr "Tidy a trouvé %u %s et %u %s! Tous les avertissements et erreurs n'ont pas été affichés."
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "TEXT_GENERAL_INFO"
@ -2662,6 +2637,21 @@ msgctxt "ESCAPED_ILLEGAL_URI"
msgid "%s escaping malformed URI reference"
msgstr "%s échappement de la référence d''URI mal formée"
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr "Impossible d'ouvrir « %s »\n"
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr "\"%s\" n'est pas un fichier!\n"
#, c-format
msgctxt "FIXED_BACKSLASH"
msgid "%s converting backslash in URI to slash"
@ -2884,6 +2874,16 @@ msgctxt "SPACE_PRECEDING_XMLDECL"
msgid "removing whitespace preceding XML Declaration"
msgstr "suppression de l'espace précédant la déclaration XML"
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr "argument manquant ou incorrect pour l'option: %s"
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr "option inconnue: %s"
msgctxt "SUSPECTED_MISSING_QUOTE"
msgid "missing quote mark for attribute value"
msgstr "absence de guillemet pour la valeur d'attribut"

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-09-06 20:53:40\n"
"PO-Revision-Date: 2017-09-19 14:00:03\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1727,31 +1727,16 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
msgctxt "TidyDialogueSummary"
msgid "Summary: "
msgstr ""
msgctxt "TidyDialogueDoc"
msgid "Document: "
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr "无法打开”%s”\n"
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgctxt "TidyDialogueFootnote"
msgid "Footnote: "
msgstr ""
#, c-format
@ -1759,27 +1744,11 @@ msgctxt "LINE_COLUMN_STRING"
msgid "line %d column %d - "
msgstr "行 %d 列 %d - "
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr "文档内容看起来像 %s"
#. For example, "discarding invalid UTF-16 surrogate pair"
msgctxt "STRING_DISCARDING"
msgid "discarding"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
msgctxt "STRING_ERROR_COUNT_ERROR"
msgid "error"
msgid_plural "errors"
@ -1799,36 +1768,10 @@ msgctxt "STRING_HTML_PROPRIETARY"
msgid "HTML Proprietary"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
msgctxt "STRING_XML_DECLARATION"
msgid "XML declaration"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
msgid "plain text"
msgstr ""
@ -1843,11 +1786,6 @@ msgctxt "STRING_SPECIFIED"
msgid "specified"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "TIDYCUSTOMNO_STRING"
msgid "no"
msgstr ""
@ -2067,6 +2005,43 @@ msgctxt "TEXT_USING_BODY"
msgid "You are recommended to use CSS to specify page and link colors"
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr "文档内容看起来像 %s"
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "TEXT_GENERAL_INFO"
@ -2211,6 +2186,21 @@ msgctxt "ESCAPED_ILLEGAL_URI"
msgid "%s escaping malformed URI reference"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr "无法打开”%s”\n"
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr ""
#, c-format
msgctxt "FIXED_BACKSLASH"
msgid "%s converting backslash in URI to slash"
@ -2433,6 +2423,16 @@ msgctxt "SPACE_PRECEDING_XMLDECL"
msgid "removing whitespace preceding XML Declaration"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "SUSPECTED_MISSING_QUOTE"
msgid "missing quote mark for attribute value"
msgstr ""

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-09-06 20:53:40\n"
"POT-Creation-Date: 2017-09-19 14:00:03\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@ -1727,31 +1727,16 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
msgctxt "TidyDialogueSummary"
msgid "Summary: "
msgstr ""
msgctxt "TidyDialogueDoc"
msgid "Document: "
msgctxt "TidyDialogueInfo"
msgid "Information: "
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgctxt "TidyDialogueFootnote"
msgid "Footnote: "
msgstr ""
#, c-format
@ -1759,27 +1744,11 @@ msgctxt "LINE_COLUMN_STRING"
msgid "line %d column %d - "
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#. For example, "discarding invalid UTF-16 surrogate pair"
msgctxt "STRING_DISCARDING"
msgid "discarding"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
msgctxt "STRING_ERROR_COUNT_ERROR"
msgid "error"
msgid_plural "errors"
@ -1801,36 +1770,10 @@ msgctxt "STRING_HTML_PROPRIETARY"
msgid "HTML Proprietary"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
msgctxt "STRING_XML_DECLARATION"
msgid "XML declaration"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
msgid "plain text"
msgstr ""
@ -1845,11 +1788,6 @@ msgctxt "STRING_SPECIFIED"
msgid "specified"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "TIDYCUSTOMNO_STRING"
msgid "no"
msgstr ""
@ -2069,6 +2007,43 @@ msgctxt "TEXT_USING_BODY"
msgid "You are recommended to use CSS to specify page and link colors"
msgstr ""
#, c-format
msgctxt "STRING_CONTENT_LOOKS"
msgid "Document content looks like %s"
msgstr ""
#, c-format
msgctxt "STRING_DOCTYPE_GIVEN"
msgid "Doctype given is \"%s\""
msgstr ""
#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "STRING_ERROR_COUNT"
msgid "Tidy found %u %s and %u %s!"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "STRING_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
msgstr ""
msgctxt "STRING_NO_ERRORS"
msgid "No warnings or errors were found."
msgstr ""
msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
msgctxt "TEXT_GENERAL_INFO"
@ -2213,6 +2188,21 @@ msgctxt "ESCAPED_ILLEGAL_URI"
msgid "%s escaping malformed URI reference"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN"
msgid "Can't open \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_CANT_OPEN_CFG"
msgid "Can't open configuration file \"%s\"\n"
msgstr ""
#, c-format
msgctxt "FILE_NOT_FILE"
msgid "\"%s\" is not a file!\n"
msgstr ""
#, c-format
msgctxt "FIXED_BACKSLASH"
msgid "%s converting backslash in URI to slash"
@ -2435,6 +2425,16 @@ msgctxt "SPACE_PRECEDING_XMLDECL"
msgid "removing whitespace preceding XML Declaration"
msgstr ""
#, c-format
msgctxt "STRING_MISSING_MALFORMED"
msgid "missing or malformed argument for option: %s"
msgstr ""
#, c-format
msgctxt "STRING_UNKNOWN_OPTION"
msgid "unknown option: %s"
msgstr ""
msgctxt "SUSPECTED_MISSING_QUOTE"
msgid "missing quote mark for attribute value"
msgstr ""

View file

@ -1645,13 +1645,13 @@ static void CheckMultiHeaders( TidyDocImpl* doc, Node* node )
if (validColSpanRows == no)
{
TY_(ReportAccessError)( doc, node, DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS );
TY_(DialogueMessage)( doc, TEXT_HTML_T_ALGORITHM, TidyDialogueDoc );
TY_(Dialogue)( doc, TEXT_HTML_T_ALGORITHM );
}
if (validColSpanColumns == no)
{
TY_(ReportAccessError)( doc, node, DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS );
TY_(DialogueMessage)( doc, TEXT_HTML_T_ALGORITHM, TidyDialogueDoc );
TY_(Dialogue)( doc, TEXT_HTML_T_ALGORITHM );
}
}
}
@ -3290,7 +3290,7 @@ void TY_(AccessibilityChecks)( TidyDocImpl* doc )
InitAccessibilityChecks( doc, cfg(doc, TidyAccessibilityCheckLevel) );
/* Hello there, ladies and gentlemen... */
TY_(DialogueMessage)( doc, STRING_HELLO_ACCESS, TidyDialogueDoc );
TY_(Dialogue)( doc, STRING_HELLO_ACCESS );
/* Checks all elements for script accessibility */
CheckScriptKeyboardAccessible( doc, &doc->root );

View file

@ -1577,29 +1577,20 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ TidyError, 0, "Error: " },
{ TidyBadDocument, 0, "Document: " },
{ TidyFatal, 0, "Panic: " },
{ TidyDialogueInfo, 0, "Information: " },
{ TidyDialogueSummary, 0, "Summary: " },
{ TidyDialogueDoc, 0, "Document: " },
{ TidyDialogueInfo, 0, "Information: " },
{ TidyDialogueFootnote, 0, "Footnote: " },
/********************************************
** Miscellaneous Strings
** @remark enum source TidyStrings
** @rename enum generator FOREACH_MSG_MISC
** @remark enum generator FOREACH_MSG_MISC
********************************************/
{ FILE_CANT_OPEN, 0, "Can't open \"%s\"\n" },
{ FILE_CANT_OPEN_CFG, 0, "Can't open configuration file \"%s\"\n" },
{ FILE_NOT_FILE, 0, "\"%s\" is not a file!\n" },
{ LINE_COLUMN_STRING, 0, "line %d column %d - " },
{ STRING_CONTENT_LOOKS, 0, "Document content looks like %s" },
{/* For example, "discarding invalid UTF-16 surrogate pair" */
STRING_DISCARDING, 0, "discarding"
},
{ STRING_DOCTYPE_GIVEN, 0, "Doctype given is \"%s\"" },
{/* The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */
STRING_ERROR_COUNT, 0, "Tidy found %u %s and %u %s!"
},
{ STRING_ERROR_COUNT_ERROR, 0, "error" },
{ STRING_ERROR_COUNT_ERROR, 1, "errors" },
{ STRING_ERROR_COUNT_WARNING, 0, "warning" },
@ -1608,17 +1599,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
{/* This is not a formal name and can be translated. */
STRING_HTML_PROPRIETARY, 0, "HTML Proprietary"
},
{ STRING_MISSING_MALFORMED, 0, "missing or malformed argument for option: %s" },
{ STRING_XML_DECLARATION, 0, "XML declaration" },
{/* This console output should be limited to 78 characters per line.
- The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */
STRING_NEEDS_INTERVENTION, 0,
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
},
{ STRING_NO_ERRORS, 0, "No warnings or errors were found." },
{ STRING_NO_SYSID, 0, "No system identifier in emitted doctype" },
{ STRING_NOT_ALL_SHOWN, 0, "Tidy found %u %s and %u %s! Not all warnings/errors were shown." },
{ STRING_PLAIN_TEXT, 0, "plain text" },
{/* For example, "replacing invalid UTF-8 bytes" */
STRING_REPLACING, 0, "replacing"
@ -1626,7 +1607,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
{/* For example, "you should avoid using the specified encoding." */
STRING_SPECIFIED, 0, "specified"
},
{ STRING_UNKNOWN_OPTION, 0, "unknown option: %s" },
{ TIDYCUSTOMNO_STRING, 0, "no" },
{ TIDYCUSTOMBLOCKLEVEL_STRING, 0, "block level" },
{ TIDYCUSTOMEMPTY_STRING, 0, "empty" },
@ -1635,9 +1615,9 @@ static languageDefinition language_en = { whichPluralForm_en, {
/********************************************
** Miscellaneous Strings
** Footnote Strings
** @remark enum source TidyStrings
** @rename enum generator FOREACH_DIALOG_MSG
** @rename enum generator FOREACH_FOOTNOTE_MSG
********************************************/
{/* This console output should be limited to 78 characters per line. */
TEXT_HTML_T_ALGORITHM, 0,
@ -1797,8 +1777,28 @@ static languageDefinition language_en = { whichPluralForm_en, {
TEXT_USING_BODY, 0,
"You are recommended to use CSS to specify page and link colors"
},
/********************************************
** Miscellaneous Dialogue Strings
** @remark enum source TidyStrings
** @rename enum generator FOREACH_DIALOG_MSG
********************************************/
{ STRING_CONTENT_LOOKS, 0, "Document content looks like %s" },
{ STRING_DOCTYPE_GIVEN, 0, "Doctype given is \"%s\"" },
{/* The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */
STRING_ERROR_COUNT, 0, "Tidy found %u %s and %u %s!"
},
{/* This console output should be limited to 78 characters per line.
- The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */
- The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */
STRING_NEEDS_INTERVENTION, 0,
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
},
{ STRING_NO_ERRORS, 0, "No warnings or errors were found." },
{ STRING_NO_SYSID, 0, "No system identifier in emitted doctype" },
{ STRING_NOT_ALL_SHOWN, 0, "Tidy found %u %s and %u %s! Not all warnings/errors were shown." },
{/* This console output should be limited to 78 characters per line.
- The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */
TEXT_GENERAL_INFO, 0,
"About HTML Tidy: https://github.com/htacg/tidy-html5\n"
"Bug reports and comments: https://github.com/htacg/tidy-html5/issues\n"
@ -1820,7 +1820,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
/********************************************
** Report Output
** @remark enum source TidyStrings
** @rename enum generator FOREACH_DIALOG_MSG
** @rename enum generator FOREACH_REPORT_MSG
********************************************/
{ ADDED_MISSING_CHARSET, 0, "Added appropriate missing <meta charset=...> to %s" },
{ ANCHOR_NOT_UNIQUE, 0, "%s anchor \"%s\" already defined" },
@ -1848,6 +1848,9 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ ELEMENT_VERS_MISMATCH_WARN, 0, "%s element not available in %s" },
{ ENCODING_MISMATCH, 0, "specified input encoding (%s) does not match actual input encoding (%s)" },
{ ESCAPED_ILLEGAL_URI, 0, "%s escaping malformed URI reference" },
{ FILE_CANT_OPEN, 0, "Can't open \"%s\"\n" },
{ FILE_CANT_OPEN_CFG, 0, "Can't open configuration file \"%s\"\n" },
{ FILE_NOT_FILE, 0, "\"%s\" is not a file!\n" },
{ FIXED_BACKSLASH, 0, "%s converting backslash in URI to slash" },
{ FOUND_STYLE_IN_BODY, 0, "found <style> tag in <body>! fix-style-tags: yes to move." },
{ ID_NAME_MISMATCH, 0, "%s id and name attribute value mismatch" },
@ -1894,6 +1897,8 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ REPLACING_ELEMENT, 0, "replacing %s with %s" },
{ REPLACING_UNEX_ELEMENT, 0, "replacing unexpected %s with %s" },
{ SPACE_PRECEDING_XMLDECL, 0, "removing whitespace preceding XML Declaration" },
{ STRING_MISSING_MALFORMED, 0, "missing or malformed argument for option: %s" },
{ STRING_UNKNOWN_OPTION, 0, "unknown option: %s" },
{ SUSPECTED_MISSING_QUOTE, 0, "missing quote mark for attribute value" },
{ TAG_NOT_ALLOWED_IN, 0, "%s isn't allowed in <%s> elements" },
{ TOO_MANY_ELEMENTS_IN, 0, "too many %s elements in <%s>" },

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-09-06 20:53:40
* PO_REVISION_DATE=2017-09-19 14:00:03
*/
#ifdef _MSC_VER
@ -579,16 +579,11 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
{ TidyError, 0, "Erreur:" },
{ TidyBadDocument, 0, "Document:" },
{ TidyFatal, 0, "Panique:" },
{ TidyDialogueInfo, 0, "Informations: " },
{ TidyDialogueSummary, 0, "Résumé:" },
{ TidyDialogueDoc, 0, "Document:" },
{ FILE_CANT_OPEN, 0, "Impossible d'ouvrir « %s »\n" },
{ FILE_NOT_FILE, 0, "\"%s\" n'est pas un fichier!\n" },
{ TidyDialogueInfo, 0, "Informations: " },
{ TidyDialogueFootnote, 0, "Remarque:" },
{ LINE_COLUMN_STRING, 0, "Ligne: %d Col: %d - " },
{ STRING_CONTENT_LOOKS, 0, "Le contenu du document ressemble à %s" },
{ STRING_DISCARDING, 0, "rejet" },
{ STRING_DOCTYPE_GIVEN, 0, "DOCTYPE donnée est «%s»" },
{ STRING_ERROR_COUNT, 0, "Tidy a trouvé %u %s et %u %s!" },
{ STRING_ERROR_COUNT_ERROR, 0, "erreur" },
{ STRING_ERROR_COUNT_ERROR, 1, "erreurs" },
{ STRING_ERROR_COUNT_WARNING, 0, "avertissement" },
@ -598,19 +593,10 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
"Contrôles d'accessibilité:\n"
},
{ STRING_HTML_PROPRIETARY, 0, "HTML Propriétaire" },
{ STRING_MISSING_MALFORMED, 0, "argument manquant ou incorrect pour l'option: %s" },
{ STRING_XML_DECLARATION, 0, "déclaration XML" },
{ STRING_NEEDS_INTERVENTION, 0,
"Ce document contient des erreurs qui doivent d'abord être résolues\n"
"en utilisant HTML Tidy pour produire une version nettoyée.\n"
},
{ STRING_NO_ERRORS, 0, "Aucun avertissement ou erreur trouvée." },
{ STRING_NO_SYSID, 0, "Aucun identifiant système dans le doctype soumis" },
{ STRING_NOT_ALL_SHOWN, 0, "Tidy a trouvé %u %s et %u %s! Tous les avertissements et erreurs n'ont pas été affichés." },
{ STRING_PLAIN_TEXT, 0, "texte brut" },
{ STRING_REPLACING, 0, "remplacement" },
{ STRING_SPECIFIED, 0, "précisé" },
{ STRING_UNKNOWN_OPTION, 0, "option inconnue: %s" },
{ TIDYCUSTOMNO_STRING, 0, "aucune" },
{ TIDYCUSTOMBLOCKLEVEL_STRING, 0, "élément de bloc" },
{ TIDYCUSTOMEMPTY_STRING, 0, "vide" },
@ -766,6 +752,16 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
"Il est recommandé d'utiliser les CSS pour préciser les couleurs \n"
"de la page et des liens"
},
{ STRING_CONTENT_LOOKS, 0, "Le contenu du document ressemble à %s" },
{ STRING_DOCTYPE_GIVEN, 0, "DOCTYPE donnée est «%s»" },
{ STRING_ERROR_COUNT, 0, "Tidy a trouvé %u %s et %u %s!" },
{ STRING_NEEDS_INTERVENTION, 0,
"Ce document contient des erreurs qui doivent d'abord être résolues\n"
"en utilisant HTML Tidy pour produire une version nettoyée.\n"
},
{ STRING_NO_ERRORS, 0, "Aucun avertissement ou erreur trouvée." },
{ STRING_NO_SYSID, 0, "Aucun identifiant système dans le doctype soumis" },
{ STRING_NOT_ALL_SHOWN, 0, "Tidy a trouvé %u %s et %u %s! Tous les avertissements et erreurs n'ont pas été affichés." },
{ TEXT_GENERAL_INFO, 0,
"À propos de HTML Tidy: https://github.com/htacg/tidy-html5\n"
"Rapports de bugs et commentaires: https://github.com/htacg/tidy-html5/issues\n"
@ -810,6 +806,8 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
{ ELEMENT_VERS_MISMATCH_WARN, 0, "%s élément non disponible dans %s" },
{ ENCODING_MISMATCH, 0, "l'encodage de caractère précisé en entrée (%s) ne correspond pas à l'encodage réellement entré (%s)" },
{ ESCAPED_ILLEGAL_URI, 0, "%s échappement de la référence d''URI mal formée" },
{ FILE_CANT_OPEN, 0, "Impossible d'ouvrir « %s »\n" },
{ FILE_NOT_FILE, 0, "\"%s\" n'est pas un fichier!\n" },
{ FIXED_BACKSLASH, 0, "%s conversion des antislash vers slash dans l'URI " },
{ ID_NAME_MISMATCH, 0, "%s discordance entre id et valeur de nom d'attribut" },
{ ILLEGAL_NESTING, 0, "%s ne doit pas être imbriqué" },
@ -854,6 +852,8 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
{ REPLACING_ELEMENT, 0, "remplacement de %s par %s" },
{ REPLACING_UNEX_ELEMENT, 0, "remplacement des %s inattendus par %s" },
{ SPACE_PRECEDING_XMLDECL, 0, "suppression de l'espace précédant la déclaration XML" },
{ STRING_MISSING_MALFORMED, 0, "argument manquant ou incorrect pour l'option: %s" },
{ STRING_UNKNOWN_OPTION, 0, "option inconnue: %s" },
{ SUSPECTED_MISSING_QUOTE, 0, "absence de guillemet pour la valeur d'attribut" },
{ TAG_NOT_ALLOWED_IN, 0, "%s n'est pas permis dans les éléments <%s>" },
{ TOO_MANY_ELEMENTS_IN, 0, "trop d'éléments %s dans <%s>" },

View file

@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-05-13 21:04:45
* PO_REVISION_DATE=2017-09-08 11:28:05
*/
#ifdef _MSC_VER
@ -61,9 +61,9 @@ static languageDefinition language_zh_cn = { whichPluralForm_zh_cn, {
{/* Specify the ll or ll_cc language code here. */
TIDY_LANGUAGE, 0, "zh_cn"
},
{ FILE_CANT_OPEN, 0, "无法打开”%s”\n" },
{ LINE_COLUMN_STRING, 0, "行 %d 列 %d - " },
{ STRING_CONTENT_LOOKS, 0, "文档内容看起来像 %s" },
{ FILE_CANT_OPEN, 0, "无法打开”%s”\n" },
#if SUPPORT_CONSOLE_APP
{ TC_STRING_VERS_A, 0, "HTML Tidy 用于 %s 版本 %s" },

View file

@ -162,22 +162,29 @@ static void messageOut( TidyMessageImpl *message )
go = go & ( doc->errors < cfg(doc, TidyShowErrors) );
}
// /* Suppress TidyInfo on Reports if applicable. */
// if ( message->level == TidyInfo )
// {
// go = go & (cfgBool(doc, TidyShowInfo) == yes);
// }
/* If suppressing TidyInfo/TidyDialogueInfo on Reports, suppress them. */
if ( message->level == TidyInfo || message->level == TidyDialogueInfo )
{
go = go & (cfgBool(doc, TidyShowInfo) == yes);
}
/* If suppressing TidyWarning on Reports, suppress them. */
/* Suppress TidyWarning on Reports if applicable. */
if ( message->level == TidyWarning )
{
go = go & (cfgBool(doc, TidyShowWarnings) == yes);
}
/* If we're TidyQuiet and handling TidyDialogue, then suppress. */
if ( cfgBool(doc, TidyQuiet) )
/* If we're TidyQuiet and handling any type of dialogue above summaries,
then suppress. */
if ( message->level > TidyDialogueSummary )
{
go = go & !(message->level > TidyFatal);
go = go & !cfgBool(doc, TidyQuiet);
}
/* Output the message if applicable. */
@ -322,7 +329,10 @@ static struct _dispatchTable {
{ REPLACING_ELEMENT, TidyWarning, formatStandard },
{ REPLACING_UNEX_ELEMENT, TidyWarning, formatStandard },
{ SPACE_PRECEDING_XMLDECL, TidyWarning, formatStandard },
{ STRING_CONTENT_LOOKS, TidyInfo, formatStandard }, /* reportMarkupVersion() */
{ STRING_DOCTYPE_GIVEN, TidyInfo, formatStandard }, /* reportMarkupVersion() */
{ STRING_MISSING_MALFORMED, TidyConfig, formatStandard },
{ STRING_NO_SYSID, TidyInfo, formatStandard }, /* reportMarkupVersion() */
{ STRING_UNKNOWN_OPTION, TidyConfig, formatStandard },
{ SUSPECTED_MISSING_QUOTE, TidyError, formatStandard },
{ TAG_NOT_ALLOWED_IN, TidyWarning, formatStandard, PREVIOUS_LOCATION },
@ -682,9 +692,14 @@ TidyMessageImpl *formatStandard(TidyDocImpl* doc, Node *element, Node *node, uin
return TY_(tidyMessageCreateWithNode)(doc, element, code, level, elemdesc, tagtype );
}
case STRING_NO_SYSID:
return TY_(tidyMessageCreate)( doc, code, level );
case FILE_CANT_OPEN:
case FILE_CANT_OPEN_CFG:
case FILE_NOT_FILE:
case STRING_CONTENT_LOOKS:
case STRING_DOCTYPE_GIVEN:
case STRING_MISSING_MALFORMED:
{
ctmbstr str;
@ -843,7 +858,9 @@ TidyMessageImpl *formatStandardDynamic(TidyDocImpl* doc, Node *element, Node *no
*********************************************************************/
/* This function performs the heavy lifting for TY_(Report)(). */
/* This function performs the heavy lifting for TY_(Report)(). Critically we
** can accept the va_list needed for recursion.
*/
static void vReport(TidyDocImpl* doc, Node *element, Node *node, uint code, va_list args)
{
int i = 0;
@ -865,22 +882,9 @@ static void vReport(TidyDocImpl* doc, Node *element, Node *node, uint code, va_l
if ( dispatchTable[i].next )
{
switch ( code )
{
case TAG_NOT_ALLOWED_IN:
TY_(Report)(doc, element, node, PREVIOUS_LOCATION);
break;
case TOO_MANY_ELEMENTS_IN:
TY_(Report)(doc, node, node, PREVIOUS_LOCATION);
break;
default:
va_copy(args_copy, args);
vReport(doc, element, node, dispatchTable[i].next, args_copy);
va_end(args_copy);
break;
}
va_copy(args_copy, args);
vReport(doc, element, node, dispatchTable[i].next, args_copy);
va_end(args_copy);
}
break;
}
@ -979,26 +983,148 @@ void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option )
/*********************************************************************
* Output Dialogue Information
* In addition to reports that are added to the table, Tidy emits
* various dialogue type information. Most of these are specific to
* exact circumstances, although `TY_(DialogueMessage)` should be
* used instead of adding a new function, if possible.
* Dialogue Output Functions
* As for issuing reports, Tidy manages all dialogue output from a
* single source in order to manage message categories in a simple
* an consistent manner.
*********************************************************************/
void TY_(DialogueMessage)( TidyDocImpl* doc, uint code, TidyReportLevel level )
{
TidyMessageImpl *message = NULL;
/* This structure ties together for each dialogue Code the default
** TidyReportLevel. This it makes it simple to output new dialogue
** messages, or to change report level by modifying this array.
*/
static struct _dialogueDispatchTable {
uint code; /**< The message code. */
TidyReportLevel level; /**< The default TidyReportLevel of the message. */
} dialogueDispatchTable[] = {
{ STRING_HELLO_ACCESS, TidyDialogueInfo }, /* AccessibilityChecks() */
{ TEXT_GENERAL_INFO, TidyDialogueInfo }, /* tidyGeneralInfo() */
{ TEXT_GENERAL_INFO_PLEA, TidyDialogueInfo }, /* tidyGeneralInfo() */
{ STRING_NEEDS_INTERVENTION, TidyDialogueSummary }, /* tidyDocRunDiagnostics() */
{ STRING_ERROR_COUNT, TidyDialogueSummary }, /* ReportNumWarnings() */
{ STRING_NO_ERRORS, TidyDialogueSummary }, /* ReportNumWarnings() */
{ STRING_NOT_ALL_SHOWN, TidyDialogueSummary }, /* ReportNumWarnings() */
{ TEXT_ACCESS_ADVICE1, TidyDialogueFootnote }, /* errorSummary() */
{ TEXT_ACCESS_ADVICE2, TidyDialogueFootnote },
{ TEXT_BAD_FORM, TidyDialogueFootnote },
{ TEXT_BAD_MAIN, TidyDialogueFootnote },
{ TEXT_HTML_T_ALGORITHM, TidyDialogueFootnote },
{ TEXT_INVALID_URI, TidyDialogueFootnote },
{ TEXT_INVALID_UTF8, TidyDialogueFootnote },
{ TEXT_INVALID_UTF16, TidyDialogueFootnote },
{ TEXT_M_IMAGE_ALT, TidyDialogueFootnote },
{ TEXT_M_IMAGE_MAP, TidyDialogueFootnote },
{ TEXT_M_LINK_ALT, TidyDialogueFootnote },
{ TEXT_M_SUMMARY, TidyDialogueFootnote },
{ TEXT_SGML_CHARS, TidyDialogueFootnote },
{ TEXT_USING_BODY, TidyDialogueFootnote },
{ TEXT_USING_FONT, TidyDialogueFootnote },
{ TEXT_USING_FRAMES, TidyDialogueFootnote },
{ TEXT_USING_LAYER, TidyDialogueFootnote },
{ TEXT_USING_NOBR, TidyDialogueFootnote },
{ TEXT_USING_SPACER, TidyDialogueFootnote },
{ TEXT_VENDOR_CHARS, TidyDialogueFootnote },
};
message = TY_(tidyMessageCreate)( doc, code, level);
messageOut(message);
/* This message formatter for dialogue messages should be capable of formatting
** every message, because they're not all the complex and there aren't that
** many.
*/
TidyMessageImpl *formatDialogue( TidyDocImpl* doc, uint code, TidyReportLevel level, va_list args )
{
switch (code)
{
case TEXT_SGML_CHARS:
case TEXT_VENDOR_CHARS:
{
ctmbstr str = va_arg(args, ctmbstr);
return TY_(tidyMessageCreate)( doc, code, level, str );
}
case STRING_ERROR_COUNT:
case STRING_NOT_ALL_SHOWN:
return TY_(tidyMessageCreate)( doc, code, level,
doc->warnings, tidyLocalizedStringN( STRING_ERROR_COUNT_WARNING, doc->warnings ),
doc->errors, tidyLocalizedStringN( STRING_ERROR_COUNT_ERROR, doc->errors ) );
case STRING_HELLO_ACCESS:
case STRING_NEEDS_INTERVENTION:
case STRING_NO_ERRORS:
case TEXT_ACCESS_ADVICE1:
case TEXT_ACCESS_ADVICE2:
case TEXT_BAD_FORM:
case TEXT_BAD_MAIN:
case TEXT_GENERAL_INFO:
case TEXT_GENERAL_INFO_PLEA:
case TEXT_HTML_T_ALGORITHM:
case TEXT_INVALID_URI:
case TEXT_INVALID_UTF8:
case TEXT_INVALID_UTF16:
case TEXT_M_IMAGE_ALT:
case TEXT_M_IMAGE_MAP:
case TEXT_M_LINK_ALT:
case TEXT_M_SUMMARY:
case TEXT_USING_BODY:
case TEXT_USING_FONT:
case TEXT_USING_FRAMES:
case TEXT_USING_LAYER:
case TEXT_USING_NOBR:
case TEXT_USING_SPACER:
default:
return TY_(tidyMessageCreate)( doc, code, level );
}
return NULL;
}
/* This single Dialogue output function determines the correct message level
** and formats the message with the appropriate formatter, and then outputs it.
** This one dialogue function should be sufficient for every use case.
*/
void TY_(Dialogue)(TidyDocImpl* doc, uint code, ...)
{
int i = 0;
va_list args;
while ( dialogueDispatchTable[i].code != 0 )
{
if ( dialogueDispatchTable[i].code == code )
{
TidyReportLevel level = dialogueDispatchTable[i].level;
va_start(args, code);
TidyMessageImpl *message = formatDialogue( doc, code, level, args );
va_end(args);
messageOut( message );
break;
}
i++;
}
}
/*********************************************************************
* Output Dialogue Information
* In addition to reports that are added to the table, Tidy emits
* various dialogue type information. Most of these are specific to
* exact circumstances, although `TY_(Dialogue)` should be used
* instead of adding a new function, if possible.
*********************************************************************/
/* Outputs the footnotes and other dialogue information after document cleanup
** is complete. LibTidy users might consider capturing these individually in
** the message callback rather than capturing this entire buffer.
** Called by tidyErrorSummary(), in console.
** @todo: This name is a bit misleading and should probably be renamed to
** indicate its focus on printing footnotes.
*/
void TY_(ErrorSummary)( TidyDocImpl* doc )
{
TidyMessageImpl *message = NULL;
ctmbstr encnam = tidyLocalizedString(STRING_SPECIFIED);
int charenc = cfg( doc, TidyCharEncoding );
if ( charenc == WIN1252 )
@ -1022,48 +1148,30 @@ void TY_(ErrorSummary)( TidyDocImpl* doc )
if (doc->badChars)
{
if (doc->badChars & BC_VENDOR_SPECIFIC_CHARS)
{
message = TY_(tidyMessageCreate)( doc, TEXT_VENDOR_CHARS, TidyDialogueDoc, encnam);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_VENDOR_CHARS, encnam );
if ((doc->badChars & BC_INVALID_SGML_CHARS) || (doc->badChars & BC_INVALID_NCR))
{
message = TY_(tidyMessageCreate)( doc, TEXT_SGML_CHARS, TidyDialogueDoc, encnam);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_SGML_CHARS, encnam );
if (doc->badChars & BC_INVALID_UTF8)
{
message = TY_(tidyMessageCreate)( doc, TEXT_INVALID_UTF8, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_INVALID_UTF8 );
#if SUPPORT_UTF16_ENCODINGS
if (doc->badChars & BC_INVALID_UTF16)
{
message = TY_(tidyMessageCreate)( doc, TEXT_INVALID_UTF16, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_INVALID_UTF16 );
#endif
if (doc->badChars & BC_INVALID_URI)
{
message = TY_(tidyMessageCreate)( doc, TEXT_INVALID_URI, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_INVALID_URI );
}
if (doc->badForm & flg_BadForm) /* Issue #166 - changed to BIT flag to support other errors */
if (doc->badForm)
{
message = TY_(tidyMessageCreate)( doc, TEXT_BAD_FORM, TidyDialogueDoc);
messageOut(message);
}
if (doc->badForm & flg_BadForm) /* Issue #166 - changed to BIT flag to support other errors */
TY_(Dialogue)( doc, TEXT_BAD_FORM );
if (doc->badForm & flg_BadMain) /* Issue #166 - repeated <main> element */
{
message = TY_(tidyMessageCreate)( doc, TEXT_BAD_MAIN, TidyDialogueDoc);
messageOut(message);
if (doc->badForm & flg_BadMain) /* Issue #166 - repeated <main> element */
TY_(Dialogue)( doc, TEXT_BAD_MAIN );
}
if (doc->badAccess)
@ -1072,147 +1180,96 @@ void TY_(ErrorSummary)( TidyDocImpl* doc )
if ( cfg(doc, TidyAccessibilityCheckLevel) == 0 )
{
if (doc->badAccess & BA_MISSING_SUMMARY)
{
message = TY_(tidyMessageCreate)( doc, TEXT_M_SUMMARY, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_M_SUMMARY );
if (doc->badAccess & BA_MISSING_IMAGE_ALT)
{
message = TY_(tidyMessageCreate)( doc, TEXT_M_IMAGE_ALT, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_M_IMAGE_ALT );
if (doc->badAccess & BA_MISSING_IMAGE_MAP)
{
message = TY_(tidyMessageCreate)( doc, TEXT_M_IMAGE_MAP, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_M_IMAGE_MAP );
if (doc->badAccess & BA_MISSING_LINK_ALT)
{
message = TY_(tidyMessageCreate)( doc, TEXT_M_LINK_ALT, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_M_LINK_ALT );
if ((doc->badAccess & BA_USING_FRAMES) && !(doc->badAccess & BA_USING_NOFRAMES))
{
message = TY_(tidyMessageCreate)( doc, TEXT_USING_FRAMES, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_USING_FRAMES );
}
if ( cfg(doc, TidyAccessibilityCheckLevel) > 0 )
{
message = TY_(tidyMessageCreate)( doc, TEXT_ACCESS_ADVICE2, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_ACCESS_ADVICE2 );
else
{
message = TY_(tidyMessageCreate)( doc, TEXT_ACCESS_ADVICE1, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_ACCESS_ADVICE1 );
}
if (doc->badLayout)
{
if (doc->badLayout & USING_LAYER)
{
message = TY_(tidyMessageCreate)( doc, TEXT_USING_LAYER, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_USING_LAYER );
if (doc->badLayout & USING_SPACER)
{
message = TY_(tidyMessageCreate)( doc, TEXT_USING_SPACER, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_USING_SPACER );
if (doc->badLayout & USING_FONT)
{
message = TY_(tidyMessageCreate)( doc, TEXT_USING_FONT, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_USING_FONT );
if (doc->badLayout & USING_NOBR)
{
message = TY_(tidyMessageCreate)( doc, TEXT_USING_NOBR, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_USING_NOBR );
if (doc->badLayout & USING_BODY)
{
message = TY_(tidyMessageCreate)( doc, TEXT_USING_BODY, TidyDialogueDoc);
messageOut(message);
}
TY_(Dialogue)( doc, TEXT_USING_BODY );
}
}
/* Outputs document HTML version and version-related information.
** Called by tidyRunDiagnostics(), from console.
** Called by tidyDocReportDoctype(), currently unused.
*/
void TY_(ReportMarkupVersion)( TidyDocImpl* doc )
{
TidyMessageImpl *message = NULL;
if ( doc->givenDoctype )
{
/* @todo: deal with non-ASCII characters in FPI */
message = TY_(tidyMessageCreate)( doc, STRING_DOCTYPE_GIVEN, TidyInfo, doc->givenDoctype );
messageOut(message);
}
TY_(Report)( doc, NULL, NULL, STRING_DOCTYPE_GIVEN, doc->givenDoctype );
if ( ! cfgBool(doc, TidyXmlTags) )
{
Bool isXhtml = doc->lexer->isvoyager;
uint apparentVers;
ctmbstr vers;
apparentVers = TY_(ApparentVersion)( doc );
vers = TY_(HTMLVersionNameFromCode)( apparentVers, isXhtml );
uint apparentVers = TY_(ApparentVersion)( doc );
ctmbstr vers = TY_(HTMLVersionNameFromCode)( apparentVers, isXhtml );
if ( !vers )
{
vers = tidyLocalizedString(STRING_HTML_PROPRIETARY);
}
message = TY_(tidyMessageCreate)( doc, STRING_CONTENT_LOOKS, TidyInfo, vers );
messageOut(message);
TY_(Report)( doc, NULL, NULL, STRING_CONTENT_LOOKS, vers );
/* Warn about missing sytem identifier (SI) in emitted doctype */
if ( TY_(WarnMissingSIInEmittedDocType)( doc ) )
{
message = TY_(tidyMessageCreate)( doc, STRING_NO_SYSID, TidyInfo);
messageOut(message);
}
TY_(Report)( doc, NULL, NULL, STRING_NO_SYSID );
}
}
/* Reports the number of warnings and errors found in the document.
** Called by tidyRunDiagnostics(), from console.
*/
void TY_(ReportNumWarnings)( TidyDocImpl* doc )
{
TidyMessageImpl *message = NULL;
if ( doc->warnings > 0 || doc->errors > 0 )
{
uint code;
if ( doc->errors > cfg(doc, TidyShowErrors) || !cfgBool(doc, TidyShowWarnings) )
{
code = STRING_NOT_ALL_SHOWN;
TY_(Dialogue)( doc, STRING_NOT_ALL_SHOWN );
}
else
{
code = STRING_ERROR_COUNT;
TY_(Dialogue)( doc, STRING_ERROR_COUNT );
}
message = TY_(tidyMessageCreate)( doc, code, TidyDialogueSummary,
doc->warnings, tidyLocalizedStringN( STRING_ERROR_COUNT_WARNING, doc->warnings ),
doc->errors, tidyLocalizedStringN( STRING_ERROR_COUNT_ERROR, doc->errors ) );
}
else
{
message = TY_(tidyMessageCreate)( doc, STRING_NO_ERRORS, TidyDialogueSummary);
TY_(Dialogue)( doc, STRING_NO_ERRORS );
}
messageOut(message);
TY_(WriteChar)( '\n', doc->errout );
}
@ -1240,6 +1297,7 @@ static const tidyStringsKeyItem tidyStringsKeys[] = {
FOREACH_TIDYCONFIGCATEGORY(MAKE_STRUCT)
FOREACH_MSG_MISC(MAKE_STRUCT)
FOREACH_FOOTNOTE_MSG(MAKE_STRUCT)
FOREACH_DIALOG_MSG(MAKE_STRUCT)
FOREACH_REPORT_MSG(MAKE_STRUCT)

View file

@ -2,7 +2,8 @@
#define __MESSAGE_H__
/******************************************************************************
* General Message Writing Routines
* @file
* Provides General Message Writing Routines
*
* This module handles LibTidy's high level output routines, as well as
* provides lookup functions and management for keys used for retrieval
@ -17,9 +18,10 @@
* prefer to hook into a callback in order to take advantage of the data
* that are available in a more flexible way.
*
* - Dialogue, consisting of general information that's not related to your
* source file in particular, is also written to the current output buffer
* when appropriate.
* - Dialogue, consisting of footnotes related to your source file, and of
* general information that's not related to your source file in particular.
* This is also written to the current output buffer when appropriate, and
* available via callbacks.
*
* Report information typically takes the form of a warning, an error, info,
* etc., and the output routines keep track of the count of these.
@ -27,31 +29,90 @@
* The preferred way of handling Tidy diagnostics output is either
* - define a new output sink, or
* - use a message filter callback routine.
* *
* (c) 1998-2017 (W3C) MIT, ERCIM, Keio University, University of
* Toronto, HTACG
* See tidy.h for the copyright notice.
*
* @author HTACG, et al (consult git log)
*
* @copyright
* Copyright (c) 1998-2017 World Wide Web Consortium (Massachusetts
* Institute of Technology, European Research Consortium for Informatics
* and Mathematics, Keio University) and HTACG.
* @par
* All Rights Reserved.
* @par
* See `tidy.h` for the complete license.
*
* @date Additional updates: consult git log
*
******************************************************************************/
#include "forward.h"
/** @name Release Information */
/** @addtogroup internal_api */
/** @{ */
/***************************************************************************//**
** @defgroup message_releaseinfo Tidy Release Information
**
** These functions return information about the current release version date
** and version number. Note that the latest release date or the highest
** version number alone do not guarantee the latest Tidy release, as we may
** backport important fixes to older releases of Tidy.
**
** @{
******************************************************************************/
/**
* Returns the release date of this instance of HTML Tidy.
*/
ctmbstr TY_(ReleaseDate)(void);
/**
* Returns the release version of this instance of HTML Tidy.
*/
ctmbstr TY_(tidyLibraryVersion)(void);
/** @} */
/** @name High Level Message Writing Functions - General */
/** @} message_releaseinfo group */
/***************************************************************************//**
** @defgroup message_reporting Report and Dialogue Writing Functions
**
** These simple functions perform the vast majority of Tidy's output, and
** one these should be your first choice when adding your own output.
**
** A report is typically diagnostic output that is generated each time Tidy
** detects an issue in your document or makes a change. A dialogue is a piece
** of information such as a summary, a footnote, or other non-tabular data.
** Some of these functions emit multiple reports or dialogue in order to
** effect a summary.
**
** @{
******************************************************************************/
/** @name General Report Writing
** If one of the convenience reporting functions does not fit your required
** message signature, then this designated reporting function will fit the
** bill. Be sure to see if a message formatter exists that can handle the
** variable arguments.
*/
/** @{ */
/**
* The designated report writing function. When a proper formatter exists,
* this one function can hanle all report output.
*/
void TY_(Report)(TidyDocImpl* doc, Node *element, Node *node, uint code, ...);
/** @} */
/** @name Convenience Reporting Functions */
/** @name Convenience Reporting Functions
** These convenience reporting functions are able to handle the bulk of Tidy's
** necessary reporting, and avoid the danger of using a variadic if you are
** unfamiliar with Tidy.
*/
/** @{ */
@ -70,28 +131,75 @@ void TY_(ReportSurrogateError)(TidyDocImpl* doc, uint code, uint c1, uint c2);
void TY_(ReportUnknownOption)( TidyDocImpl* doc, ctmbstr option );
/** @} */
/** @name General Dialogue Writing
** These functions produce dialogue output such as individual messages, or
** several messages in summary form.
*/
/** @{ */
/**
* Emits a single dialogue message, and is capable of accepting a variadic
* that is passed to the correct message formatter as needed.
*/
void TY_(Dialogue)( TidyDocImpl* doc, uint code, ... );
/** @} */
/** @name Output Dialogue Information */
/** @{ */
void TY_(DialogueMessage)( TidyDocImpl* doc, uint code, TidyReportLevel level );
/**
* Outputs the footnotes and other dialogue information after document cleanup
* is complete. LibTidy users might consider capturing these individually in
* the message callback rather than capturing this entire buffer.
* Called by `tidyErrorSummary()`, in console.
* @todo: This name is a bit misleading and should probably be renamed to
* indicate its focus on printing footnotes.
*/
void TY_(ErrorSummary)( TidyDocImpl* doc );
/**
* Outputs document HTML version and version-related information as the final
* report(s) in the report table.
* Called by `tidyRunDiagnostics()`, from console.
* Called by `tidyDocReportDoctype()`, currently unused.
*/
void TY_(ReportMarkupVersion)( TidyDocImpl* doc );
/**
* Reports the number of warnings and errors found in the document as dialogue
* inforation.
* Called by `tidyRunDiagnostics()`, from console.
*/
void TY_(ReportNumWarnings)( TidyDocImpl* doc );
/** @} */
/** @name Key Discovery */
/** @{ */
/** @} message_reporting group */
/***************************************************************************//**
** @defgroup message_keydiscovery Key Discovery
**
** LibTidy users may want to use `TidyReportCallback` to enable their own
** localization lookup features. Because Tidy's report codes are enums the
** specific values can change over time. Using these functions provides the
** ability for LibTidy users to use LibTidy's enum values as strings for
** lookup purposes.
**
** @{
******************************************************************************/
/**
* LibTidy users may want to use `TidyReportCallback` to enable their own
* localization lookup features. Because Tidy's report codes are enums the
* specific values can change over time. This function returns a string
* representing the enum value name that can be used as a lookup key
* independent of changing string values. `TidyReportCallback` will return
* this general string as the report message key.
* This function returns a string representing the enum value name that can
* be used as a lookup key independent of changing string values.
* `TidyReportCallback` will return this general string as the report
* message key.
*/
ctmbstr TY_(tidyErrorCodeAsKey)(uint code);
@ -118,7 +226,9 @@ TidyIterator TY_(getErrorCodeList)();
uint TY_(getNextErrorCode)( TidyIterator* iter );
/** @} */
/** @} message_keydiscovery group */
/** @} internal_api addtogroup */
/* accessibility flaws */

View file

@ -1041,8 +1041,8 @@ void TIDY_CALL tidyGeneralInfo( TidyDoc tdoc )
TidyDocImpl* impl = tidyDocToImpl( tdoc );
if ( impl )
{
TY_(DialogueMessage)( impl, TEXT_GENERAL_INFO, TidyDialogueInfo);
TY_(DialogueMessage)( impl, TEXT_GENERAL_INFO_PLEA, TidyDialogueInfo);
TY_(Dialogue)( impl, TEXT_GENERAL_INFO );
TY_(Dialogue)( impl, TEXT_GENERAL_INFO_PLEA );
}
}
@ -1487,7 +1487,7 @@ int tidyDocRunDiagnostics( TidyDocImpl* doc )
}
if ( doc->errors > 0 && !force )
TY_(DialogueMessage)(doc, STRING_NEEDS_INTERVENTION, TidyDialogueDoc);
TY_(Dialogue)(doc, STRING_NEEDS_INTERVENTION );
return tidyDocStatus( doc );
}

View file

@ -1,2 +1,2 @@
5.5.40
5.5.41
2017.09.20