diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2b0c896..380ffc3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,7 +109,9 @@ add_definitions ( -DSUPPORT_ASIAN_ENCODINGS=1 )
add_definitions ( -DSUPPORT_ACCESSIBILITY_CHECKS=1 )
add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" )
add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" )
-### add_definitions ( -DRC_NUMBER="MinGW" )
+if (TIDY_RC_NUMBER)
+ add_definitions ( -DRC_NUMBER="${TIDY_RC_NUMBER}" )
+endif ()
# Issue #188 - Support user items in platform.h
if (TIDY_CONFIG_FILE)
diff --git a/console/tidy.c b/console/tidy.c
index 81d5b4d..bf1b0f0 100644
--- a/console/tidy.c
+++ b/console/tidy.c
@@ -610,12 +610,10 @@ void GetOption( TidyDoc tdoc, TidyOption topt, OptionDesc *d )
case TidySortAttributes:
case TidyNewline:
case TidyAccessibilityCheckLevel:
+ case TidyUseCustomTags:
d->type = "enum";
d->vals = NULL;
- d->def =
- optId==TidyNewline ?
- "Platform dependent"
- :tidyOptGetCurrPick( tdoc, optId );
+ d->def = tidyOptGetCurrPick( tdoc, optId );
break;
case TidyDoctype:
@@ -648,7 +646,7 @@ void GetOption( TidyDoc tdoc, TidyOption topt, OptionDesc *d )
d->def = "?";
d->vals = NULL;
break;
-
+
/* General case will handle remaining */
default:
switch ( optTyp )
@@ -1376,9 +1374,6 @@ static void printOptionValues( TidyDoc ARG_UNUSED(tdoc), TidyOption topt,
}
}
break;
- case TidyNewline:
- d->def = tidyOptGetCurrPick( tdoc, optId );
- break;
default:
break;
}
@@ -2058,6 +2053,15 @@ int main( int argc, char** argv )
if ( status >= 0 ) {
status = tidyRunDiagnostics( tdoc );
+ /*\ Issue #119 - but not really related to 'custom_tags' support.
+ * Issue ?: To remove some 2014 extra debug output - I wanted to
+ * remove the Info: messages, but chose to except one, namely
+ * tidyReportDoctype(), but never intended keeping it here
+ * for so long!
+ * That doctype Info:, and all others, are still reported by
+ * default. geoff
+ \*/
+#if 0 /* 000000000 this code can be removed some time in future 00000000000 */
if ( !tidyOptGetBool(tdoc, TidyQuiet) ) {
/* NOT quiet, show DOCTYPE, if not already shown */
if (!tidyOptGetBool(tdoc, TidyShowInfo)) {
@@ -2066,7 +2070,7 @@ int main( int argc, char** argv )
tidyOptSetBool( tdoc, TidyShowInfo, no );
}
}
-
+#endif /* 000000000 this code can be removed some time in future 00000000000 */
}
if ( status > 1 ) /* If errors, do we want to force output? */
status = ( tidyOptGetBool(tdoc, TidyForceOutput) ? status : -1 );
diff --git a/include/tidy.h b/include/tidy.h
index 0e10fb6..5b46af8 100644
--- a/include/tidy.h
+++ b/include/tidy.h
@@ -463,10 +463,16 @@ TIDY_EXPORT ctmbstr TIDY_CALL tidyOptGetEncName( TidyDoc tdoc, TidyOptionI
/** Get current pick list value for option by ID. Useful for enum types. */
TIDY_EXPORT ctmbstr TIDY_CALL tidyOptGetCurrPick( TidyDoc tdoc, TidyOptionId optId);
-/** Iterate over user declared tags */
+/** Iterate over user declared tags as configured. If `custom-tags` is not
+** **no**, then autonomous custom tags will be included in the results.
+*/
TIDY_EXPORT TidyIterator TIDY_CALL tidyOptGetDeclTagList( TidyDoc tdoc );
/** Get next declared tag of specified type: TidyInlineTags, TidyBlockTags,
-** TidyEmptyTags, TidyPreTags */
+** TidyEmptyTags, TidyPreTags. Note that even when using `custom-tags`,
+** TidyCustomTags is not an option here, as autonomous custom tags are
+** added to one of the existing types, and TidyCustomTags is defined as
+** internal API.
+*/
TIDY_EXPORT ctmbstr TIDY_CALL tidyOptGetNextDeclTag( TidyDoc tdoc,
TidyOptionId optId,
TidyIterator* iter );
diff --git a/include/tidyenum.h b/include/tidyenum.h
index bb48722..4bbc64c 100644
--- a/include/tidyenum.h
+++ b/include/tidyenum.h
@@ -70,6 +70,9 @@ typedef enum
TidyCharEncoding, /**< In/out character encoding */
TidyCoerceEndTags, /**< Coerce end tags from start tags where probably intended */
TidyCSSPrefix, /**< CSS class naming for clean option */
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ TidyCustomTags, /**< Internal use ONLY */
+#endif
TidyDecorateInferredUL, /**< Mark inferred UL elements with no indent CSS */
TidyDoctype, /**< User specified doctype */
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -154,6 +157,7 @@ typedef enum
TidyTabSize, /**< Expand tabs to n spaces */
TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */
TidyUpperCaseTags, /**< Output tags in upper not lower case */
+ TidyUseCustomTags, /**< Enable Tidy to use autonomous custom tags */
TidyVertSpace, /**< degree to which markup is spread out vertically */
TidyWord2000, /**< Draconian cleaning for Word2000 */
TidyWrapAsp, /**< Wrap within ASP pseudo elements */
@@ -193,6 +197,19 @@ typedef enum
TidyAutoState /**< Automatic */
} TidyTriState;
+/** Integer values used by ParseUseCustomTags. These are used throughout
+ * LibTidy to indicate the how Tidy treats custom tags, and also have
+ * associated localized strings to describe them.
+ */
+typedef enum
+{
+ TidyCustomNo = 300,
+ TidyCustomBlocklevel,
+ TidyCustomEmpty,
+ TidyCustomInline,
+ TidyCustomPre
+} TidyUseCustomTagsState;
+
/** TidyNewline option values to control output line endings.
*/
typedef enum
@@ -531,6 +548,7 @@ typedef enum
TidyAttr_HSPACE, /**< HSPACE= */
TidyAttr_HTTP_EQUIV, /**< HTTP_EQUIV= */
TidyAttr_ID, /**< ID= */
+ TidyAttr_IS, /**< IS= */
TidyAttr_ISMAP, /**< ISMAP= */
TidyAttr_ITEMID, /**< ITEMID= */
TidyAttr_ITEMPROP, /**< ITEMPROP= */
@@ -889,6 +907,7 @@ typedef enum
FN(OBSOLETE_ELEMENT) \
FN(PROPRIETARY_ELEMENT) \
FN(REPLACING_ELEMENT) \
+ FN(CUSTOM_TAG_DETECTED) \
FN(REPLACING_UNEX_ELEMENT) \
FN(SPACE_PRECEDING_XMLDECL) \
FN(SUSPECTED_MISSING_QUOTE) \
@@ -901,6 +920,7 @@ typedef enum
FN(UNEXPECTED_ENDTAG_IN) \
FN(UNEXPECTED_ENDTAG) \
FN(UNKNOWN_ELEMENT) \
+ FN(UNKNOWN_ELEMENT_LOOKS_CUSTOM) \
FN(USING_BR_INPLACE_OF)
/* error codes used for attribute messages */
@@ -922,6 +942,7 @@ typedef enum
FN(JOINING_ATTRIBUTE) \
FN(MISMATCHED_ATTRIBUTE_ERROR) \
FN(MISMATCHED_ATTRIBUTE_WARN) \
+ FN(ATTRIBUTE_IS_NOT_ALLOWED) \
FN(MISSING_ATTR_VALUE) \
FN(MISSING_ATTRIBUTE) \
FN(MISSING_IMAGEMAP) \
diff --git a/localize/translations/language_en_gb.po b/localize/translations/language_en_gb.po
index 55f1c9d..bfcbe2e 100644
--- a/localize/translations/language_en_gb.po
+++ b/localize/translations/language_en_gb.po
@@ -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-03-10 09:04:23\n"
+"PO-Revision-Date: 2017-03-15 17:35:16\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -63,7 +63,7 @@ msgstr[0] ""
msgstr[1] ""
msgctxt "STRING_HELLO_ACCESS"
-msgid "Accessibility Checks:"
+msgid "\nAccessibility Checks:\n"
msgstr ""
#. This is not a formal name and can be translated.
@@ -84,8 +84,9 @@ msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
+#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
-msgid "Not all warnings/errors were shown."
+msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
@@ -128,7 +129,6 @@ msgid ""
" referenced by this attribute are inserted into the list and the \n"
" search stops for the current direction.\n"
" TD cells that set the axis attribute are also treated as header cells.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -138,7 +138,7 @@ msgid ""
"128 - 159 may not be recognized on other platforms. You are\n"
"instead recommended to use named entities, e.g. ™ rather\n"
"than Windows character code 153 (0x2122 in Unicode). Note that\n"
-"as of February 1998 few browsers support the new entities.\n\n"
+"as of February 1998 few browsers support the new entities.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -150,7 +150,6 @@ msgid ""
"work widely enough on the World Wide Web; you should avoid using the \n"
"%s character encoding, instead you are recommended to\n"
"use named entities, e.g. ™.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -164,7 +163,6 @@ msgid ""
"Tidy assumed you wanted to refer to a character with the same byte value in the \n"
"%s encoding and replaced that reference with the Unicode \n"
"equivalent.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -179,7 +177,6 @@ msgid ""
"does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n"
"(but it does allow other noncharacters). For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -189,7 +186,6 @@ msgid ""
"The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n"
"mapping of unpaired surrogates. For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -204,7 +200,6 @@ msgid ""
"scripts depend on that. If you want to depend on that, you must\n"
"escape the URI on your own. For more information please refer to\n"
"http://www.w3.org/International/O-URL-and-ident.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -216,7 +211,6 @@ msgid ""
"in one table cell and the in another. If the
cannot be placed inside the\n"
"table! Note that one form can't be nested inside another!\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -236,7 +230,6 @@ msgid ""
"table cells are useful for specifying which headers apply\n"
"to each table cell, enabling non-visual browsers to provide\n"
"a meaningful context for each cell.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -246,7 +239,6 @@ msgid ""
"of an image; longer descriptions should be given with the\n"
"longdesc attribute which takes a URL linked to the description.\n"
"These measures are needed for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -256,7 +248,6 @@ msgid ""
"maps as the latter are inaccessible to people using non-\n"
"graphical browsers. In addition, client-side maps are easier\n"
"to set up and provide immediate feedback to users.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -265,7 +256,6 @@ msgid ""
"For hypertext links defined using a client-side image map, you\n"
"need to use the alt attribute to provide a textual description\n"
"of the link for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -275,20 +265,22 @@ msgid ""
"people who are either blind or using a browser that\n"
"doesn't support frames. A frames-based page should always\n"
"include an alternative layout inside a NOFRAMES element.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
+#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE1"
msgid ""
"For further advice on how to make your pages accessible\n"
-"see http://www.w3.org/WAI/GL"
+"see http://www.w3.org/WAI/GL.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE2"
-msgid " and http://www.html-tidy.org/accessibility/"
+msgid ""
+"For further advice on how to make your pages accessible\n"
+"see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -297,7 +289,6 @@ msgid ""
"The Cascading Style Sheets (CSS) Positioning mechanism\n"
"is recommended in preference to the proprietary \n"
"element due to limited vendor support for LAYER.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -306,7 +297,6 @@ msgid ""
"You are recommended to use CSS for controlling white\n"
"space (e.g. for indentation, margins and line spacing).\n"
"The proprietary element has limited vendor support.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -316,7 +306,6 @@ msgid ""
"properties such as its size and color. This will reduce\n"
"the size of HTML files and make them easier to maintain\n"
"compared with using elements.\n"
-"\n"
msgstr ""
"You are recommended to use CSS to specify the font and\n"
"properties such as its size and colour. This will reduce\n"
@@ -329,7 +318,6 @@ msgid ""
"You are recommended to use CSS to control line wrapping.\n"
"Use \"white-space: nowrap\" to inhibit wrapping in place\n"
"of inserting ... into the markup.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -343,7 +331,6 @@ msgctxt "TEXT_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -360,12 +347,12 @@ 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.
+#. - Don't terminate the last line with a newline.
msgctxt "TEXT_GENERAL_INFO_PLEA"
msgid ""
-"\n"
"Do you speak a language other than English, or a different variant of \n"
"English? Consider helping us to localize HTML Tidy. For details please see \n"
-"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
+"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md"
msgstr ""
"\n"
"Would you like to see Tidy in proper, British English? Please consider \n"
@@ -400,6 +387,18 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
+msgctxt "TidyDialogueInfo"
+msgid "Information: "
+msgstr ""
+
+msgctxt "TidyDialogueSummary"
+msgid "Summary: "
+msgstr ""
+
+msgctxt "TidyDialogueDoc"
+msgid "Document: "
+msgstr ""
+
#, c-format
msgctxt "ENCODING_MISMATCH"
msgid "specified input encoding (%s) does not match actual input encoding (%s)"
@@ -500,6 +499,11 @@ msgctxt "MISMATCHED_ATTRIBUTE_WARN"
msgid "%s attribute \"%s\" not allowed for %s"
msgstr ""
+#, c-format
+msgctxt "ATTRIBUTE_IS_NOT_ALLOWED"
+msgid "%s attribute \"is\" not allowed for autonomous custom tags."
+msgstr ""
+
#, c-format
msgctxt "JOINING_ATTRIBUTE"
msgid "%s joining values of repeated attribute \"%s\""
@@ -664,6 +668,27 @@ msgctxt "REPLACING_ELEMENT"
msgid "replacing %s with %s"
msgstr ""
+#, c-format
+msgctxt "CUSTOM_TAG_DETECTED"
+msgid "detected autonomous custom tag %s; will treat as %s"
+msgstr ""
+
+msgctxt "TidyCustomBlocklevel"
+msgid "block level"
+msgstr ""
+
+msgctxt "TidyCustomEmpty"
+msgid "empty"
+msgstr ""
+
+msgctxt "TidyCustomInline"
+msgid "inline"
+msgstr ""
+
+msgctxt "TidyCustomPre"
+msgid "pre"
+msgstr ""
+
#, c-format
msgctxt "COERCE_TO_ENDTAG"
msgid "<%s> is probably intended as %s>"
@@ -848,6 +873,11 @@ msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
msgstr ""
+#, c-format
+msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
+msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
+msgstr ""
+
#, c-format
msgctxt "PREVIOUS_LOCATION"
msgid "<%s> previously mentioned"
@@ -2976,8 +3006,36 @@ msgstr ""
#. be translated.
msgctxt "TidyEscapeScripts"
msgid ""
-"This option causes items that look like closing tags, like </g
to be escaped "
-"to <\\/g
. Set this option to 'no' if you do not want this."
+"This option causes items that look like closing tags, like "
+"</g
to be escaped to <\\/g
. Set "
+"this option to no if you do not want this."
+msgstr ""
+
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyUseCustomTags"
+msgid ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognized "
+"accordingly, and unknown closing tags will be discarded. "
msgstr ""
msgctxt "TidyDiagnostics"
@@ -3302,8 +3360,8 @@ msgid "HTML Tidy version %s"
msgstr ""
#. This console output should be limited to 78 characters per line.
-#. - %n represents the name of the executable from the file system, and is mostly like going to be "tidy".
-#. - %2 represents a version number, typically x.x.xx.
+#. - First %s represents the name of the executable from the file system, and is mostly like going to be "tidy".
+#. - Second %s represents a version number, typically x.x.xx.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "TC_TXT_HELP_1"
diff --git a/localize/translations/language_es.po b/localize/translations/language_es.po
index 0de027c..7f403f0 100644
--- a/localize/translations/language_es.po
+++ b/localize/translations/language_es.po
@@ -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-03-10 09:04:23\n"
+"PO-Revision-Date: 2017-03-15 17:35:16\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -63,7 +63,7 @@ msgstr[0] ""
msgstr[1] ""
msgctxt "STRING_HELLO_ACCESS"
-msgid "Accessibility Checks:"
+msgid "\nAccessibility Checks:\n"
msgstr ""
#. This is not a formal name and can be translated.
@@ -84,8 +84,9 @@ msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
+#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
-msgid "Not all warnings/errors were shown."
+msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
@@ -128,7 +129,6 @@ msgid ""
" referenced by this attribute are inserted into the list and the \n"
" search stops for the current direction.\n"
" TD cells that set the axis attribute are also treated as header cells.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -138,7 +138,7 @@ msgid ""
"128 - 159 may not be recognized on other platforms. You are\n"
"instead recommended to use named entities, e.g. ™ rather\n"
"than Windows character code 153 (0x2122 in Unicode). Note that\n"
-"as of February 1998 few browsers support the new entities.\n\n"
+"as of February 1998 few browsers support the new entities.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -150,7 +150,6 @@ msgid ""
"work widely enough on the World Wide Web; you should avoid using the \n"
"%s character encoding, instead you are recommended to\n"
"use named entities, e.g. ™.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -164,7 +163,6 @@ msgid ""
"Tidy assumed you wanted to refer to a character with the same byte value in the \n"
"%s encoding and replaced that reference with the Unicode \n"
"equivalent.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -179,7 +177,6 @@ msgid ""
"does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n"
"(but it does allow other noncharacters). For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -189,7 +186,6 @@ msgid ""
"The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n"
"mapping of unpaired surrogates. For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -204,7 +200,6 @@ msgid ""
"scripts depend on that. If you want to depend on that, you must\n"
"escape the URI on your own. For more information please refer to\n"
"http://www.w3.org/International/O-URL-and-ident.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -216,7 +211,6 @@ msgid ""
"in one table cell and the in another. If the cannot be placed inside the\n"
"table! Note that one form can't be nested inside another!\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -236,7 +230,6 @@ msgid ""
"table cells are useful for specifying which headers apply\n"
"to each table cell, enabling non-visual browsers to provide\n"
"a meaningful context for each cell.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -246,7 +239,6 @@ msgid ""
"of an image; longer descriptions should be given with the\n"
"longdesc attribute which takes a URL linked to the description.\n"
"These measures are needed for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -256,7 +248,6 @@ msgid ""
"maps as the latter are inaccessible to people using non-\n"
"graphical browsers. In addition, client-side maps are easier\n"
"to set up and provide immediate feedback to users.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -265,7 +256,6 @@ msgid ""
"For hypertext links defined using a client-side image map, you\n"
"need to use the alt attribute to provide a textual description\n"
"of the link for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -275,20 +265,22 @@ msgid ""
"people who are either blind or using a browser that\n"
"doesn't support frames. A frames-based page should always\n"
"include an alternative layout inside a NOFRAMES element.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
+#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE1"
msgid ""
"For further advice on how to make your pages accessible\n"
-"see http://www.w3.org/WAI/GL"
+"see http://www.w3.org/WAI/GL.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE2"
-msgid " and http://www.html-tidy.org/accessibility/"
+msgid ""
+"For further advice on how to make your pages accessible\n"
+"see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -297,7 +289,6 @@ msgid ""
"The Cascading Style Sheets (CSS) Positioning mechanism\n"
"is recommended in preference to the proprietary \n"
"element due to limited vendor support for LAYER.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -306,7 +297,6 @@ msgid ""
"You are recommended to use CSS for controlling white\n"
"space (e.g. for indentation, margins and line spacing).\n"
"The proprietary element has limited vendor support.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -316,7 +306,6 @@ msgid ""
"properties such as its size and color. This will reduce\n"
"the size of HTML files and make them easier to maintain\n"
"compared with using elements.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -325,7 +314,6 @@ msgid ""
"You are recommended to use CSS to control line wrapping.\n"
"Use \"white-space: nowrap\" to inhibit wrapping in place\n"
"of inserting ... into the markup.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -339,7 +327,6 @@ msgctxt "TEXT_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -356,12 +343,12 @@ 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.
+#. - Don't terminate the last line with a newline.
msgctxt "TEXT_GENERAL_INFO_PLEA"
msgid ""
-"\n"
"Do you speak a language other than English, or a different variant of \n"
"English? Consider helping us to localize HTML Tidy. For details please see \n"
-"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
+"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md"
msgstr ""
"\n"
"¿Le gustaría ver Tidy en un español correcto? Por favor considere \n"
@@ -396,6 +383,18 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
+msgctxt "TidyDialogueInfo"
+msgid "Information: "
+msgstr ""
+
+msgctxt "TidyDialogueSummary"
+msgid "Summary: "
+msgstr ""
+
+msgctxt "TidyDialogueDoc"
+msgid "Document: "
+msgstr ""
+
#, c-format
msgctxt "ENCODING_MISMATCH"
msgid "specified input encoding (%s) does not match actual input encoding (%s)"
@@ -496,6 +495,11 @@ msgctxt "MISMATCHED_ATTRIBUTE_WARN"
msgid "%s attribute \"%s\" not allowed for %s"
msgstr ""
+#, c-format
+msgctxt "ATTRIBUTE_IS_NOT_ALLOWED"
+msgid "%s attribute \"is\" not allowed for autonomous custom tags."
+msgstr ""
+
#, c-format
msgctxt "JOINING_ATTRIBUTE"
msgid "%s joining values of repeated attribute \"%s\""
@@ -660,6 +664,27 @@ msgctxt "REPLACING_ELEMENT"
msgid "replacing %s with %s"
msgstr ""
+#, c-format
+msgctxt "CUSTOM_TAG_DETECTED"
+msgid "detected autonomous custom tag %s; will treat as %s"
+msgstr ""
+
+msgctxt "TidyCustomBlocklevel"
+msgid "block level"
+msgstr ""
+
+msgctxt "TidyCustomEmpty"
+msgid "empty"
+msgstr ""
+
+msgctxt "TidyCustomInline"
+msgid "inline"
+msgstr ""
+
+msgctxt "TidyCustomPre"
+msgid "pre"
+msgstr ""
+
#, c-format
msgctxt "COERCE_TO_ENDTAG"
msgid "<%s> is probably intended as %s>"
@@ -844,6 +869,11 @@ msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
msgstr ""
+#, c-format
+msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
+msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
+msgstr ""
+
#, c-format
msgctxt "PREVIOUS_LOCATION"
msgid "<%s> previously mentioned"
@@ -2953,8 +2983,36 @@ msgstr ""
#. be translated.
msgctxt "TidyEscapeScripts"
msgid ""
-"This option causes items that look like closing tags, like </g
to be escaped "
-"to <\\/g
. Set this option to 'no' if you do not want this."
+"This option causes items that look like closing tags, like "
+"</g
to be escaped to <\\/g
. Set "
+"this option to no if you do not want this."
+msgstr ""
+
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyUseCustomTags"
+msgid ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognized "
+"accordingly, and unknown closing tags will be discarded. "
msgstr ""
msgctxt "TidyDiagnostics"
@@ -3279,8 +3337,8 @@ msgid "HTML Tidy version %s"
msgstr ""
#. This console output should be limited to 78 characters per line.
-#. - %n represents the name of the executable from the file system, and is mostly like going to be "tidy".
-#. - %2 represents a version number, typically x.x.xx.
+#. - First %s represents the name of the executable from the file system, and is mostly like going to be "tidy".
+#. - Second %s represents a version number, typically x.x.xx.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "TC_TXT_HELP_1"
diff --git a/localize/translations/language_es_mx.po b/localize/translations/language_es_mx.po
index 24c2c29..558496e 100644
--- a/localize/translations/language_es_mx.po
+++ b/localize/translations/language_es_mx.po
@@ -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-03-10 09:04:23\n"
+"PO-Revision-Date: 2017-03-15 17:35:16\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -63,7 +63,7 @@ msgstr[0] ""
msgstr[1] ""
msgctxt "STRING_HELLO_ACCESS"
-msgid "Accessibility Checks:"
+msgid "\nAccessibility Checks:\n"
msgstr ""
#. This is not a formal name and can be translated.
@@ -84,8 +84,9 @@ msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
+#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
-msgid "Not all warnings/errors were shown."
+msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
@@ -128,7 +129,6 @@ msgid ""
" referenced by this attribute are inserted into the list and the \n"
" search stops for the current direction.\n"
" TD cells that set the axis attribute are also treated as header cells.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -138,7 +138,7 @@ msgid ""
"128 - 159 may not be recognized on other platforms. You are\n"
"instead recommended to use named entities, e.g. ™ rather\n"
"than Windows character code 153 (0x2122 in Unicode). Note that\n"
-"as of February 1998 few browsers support the new entities.\n\n"
+"as of February 1998 few browsers support the new entities.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -150,7 +150,6 @@ msgid ""
"work widely enough on the World Wide Web; you should avoid using the \n"
"%s character encoding, instead you are recommended to\n"
"use named entities, e.g. ™.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -164,7 +163,6 @@ msgid ""
"Tidy assumed you wanted to refer to a character with the same byte value in the \n"
"%s encoding and replaced that reference with the Unicode \n"
"equivalent.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -179,7 +177,6 @@ msgid ""
"does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n"
"(but it does allow other noncharacters). For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -189,7 +186,6 @@ msgid ""
"The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n"
"mapping of unpaired surrogates. For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -204,7 +200,6 @@ msgid ""
"scripts depend on that. If you want to depend on that, you must\n"
"escape the URI on your own. For more information please refer to\n"
"http://www.w3.org/International/O-URL-and-ident.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -216,7 +211,6 @@ msgid ""
"in one table cell and the in another. If the cannot be placed inside the\n"
"table! Note that one form can't be nested inside another!\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -236,7 +230,6 @@ msgid ""
"table cells are useful for specifying which headers apply\n"
"to each table cell, enabling non-visual browsers to provide\n"
"a meaningful context for each cell.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -246,7 +239,6 @@ msgid ""
"of an image; longer descriptions should be given with the\n"
"longdesc attribute which takes a URL linked to the description.\n"
"These measures are needed for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -256,7 +248,6 @@ msgid ""
"maps as the latter are inaccessible to people using non-\n"
"graphical browsers. In addition, client-side maps are easier\n"
"to set up and provide immediate feedback to users.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -265,7 +256,6 @@ msgid ""
"For hypertext links defined using a client-side image map, you\n"
"need to use the alt attribute to provide a textual description\n"
"of the link for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -275,20 +265,22 @@ msgid ""
"people who are either blind or using a browser that\n"
"doesn't support frames. A frames-based page should always\n"
"include an alternative layout inside a NOFRAMES element.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
+#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE1"
msgid ""
"For further advice on how to make your pages accessible\n"
-"see http://www.w3.org/WAI/GL"
+"see http://www.w3.org/WAI/GL.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE2"
-msgid " and http://www.html-tidy.org/accessibility/"
+msgid ""
+"For further advice on how to make your pages accessible\n"
+"see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -297,7 +289,6 @@ msgid ""
"The Cascading Style Sheets (CSS) Positioning mechanism\n"
"is recommended in preference to the proprietary \n"
"element due to limited vendor support for LAYER.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -306,7 +297,6 @@ msgid ""
"You are recommended to use CSS for controlling white\n"
"space (e.g. for indentation, margins and line spacing).\n"
"The proprietary element has limited vendor support.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -316,7 +306,6 @@ msgid ""
"properties such as its size and color. This will reduce\n"
"the size of HTML files and make them easier to maintain\n"
"compared with using elements.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -325,7 +314,6 @@ msgid ""
"You are recommended to use CSS to control line wrapping.\n"
"Use \"white-space: nowrap\" to inhibit wrapping in place\n"
"of inserting ... into the markup.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -339,7 +327,6 @@ msgctxt "TEXT_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -356,12 +343,12 @@ 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.
+#. - Don't terminate the last line with a newline.
msgctxt "TEXT_GENERAL_INFO_PLEA"
msgid ""
-"\n"
"Do you speak a language other than English, or a different variant of \n"
"English? Consider helping us to localize HTML Tidy. For details please see \n"
-"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
+"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md"
msgstr ""
"\n"
"¿Le gustaría ver Tidy en adecuada, español mexicano? Por favor considere \n"
@@ -396,6 +383,18 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
+msgctxt "TidyDialogueInfo"
+msgid "Information: "
+msgstr ""
+
+msgctxt "TidyDialogueSummary"
+msgid "Summary: "
+msgstr ""
+
+msgctxt "TidyDialogueDoc"
+msgid "Document: "
+msgstr ""
+
#, c-format
msgctxt "ENCODING_MISMATCH"
msgid "specified input encoding (%s) does not match actual input encoding (%s)"
@@ -496,6 +495,11 @@ msgctxt "MISMATCHED_ATTRIBUTE_WARN"
msgid "%s attribute \"%s\" not allowed for %s"
msgstr ""
+#, c-format
+msgctxt "ATTRIBUTE_IS_NOT_ALLOWED"
+msgid "%s attribute \"is\" not allowed for autonomous custom tags."
+msgstr ""
+
#, c-format
msgctxt "JOINING_ATTRIBUTE"
msgid "%s joining values of repeated attribute \"%s\""
@@ -660,6 +664,27 @@ msgctxt "REPLACING_ELEMENT"
msgid "replacing %s with %s"
msgstr ""
+#, c-format
+msgctxt "CUSTOM_TAG_DETECTED"
+msgid "detected autonomous custom tag %s; will treat as %s"
+msgstr ""
+
+msgctxt "TidyCustomBlocklevel"
+msgid "block level"
+msgstr ""
+
+msgctxt "TidyCustomEmpty"
+msgid "empty"
+msgstr ""
+
+msgctxt "TidyCustomInline"
+msgid "inline"
+msgstr ""
+
+msgctxt "TidyCustomPre"
+msgid "pre"
+msgstr ""
+
#, c-format
msgctxt "COERCE_TO_ENDTAG"
msgid "<%s> is probably intended as %s>"
@@ -844,6 +869,11 @@ msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
msgstr ""
+#, c-format
+msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
+msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
+msgstr ""
+
#, c-format
msgctxt "PREVIOUS_LOCATION"
msgid "<%s> previously mentioned"
@@ -2948,8 +2978,36 @@ msgstr ""
#. be translated.
msgctxt "TidyEscapeScripts"
msgid ""
-"This option causes items that look like closing tags, like </g
to be escaped "
-"to <\\/g
. Set this option to 'no' if you do not want this."
+"This option causes items that look like closing tags, like "
+"</g
to be escaped to <\\/g
. Set "
+"this option to no if you do not want this."
+msgstr ""
+
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyUseCustomTags"
+msgid ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognized "
+"accordingly, and unknown closing tags will be discarded. "
msgstr ""
msgctxt "TidyDiagnostics"
@@ -3274,8 +3332,8 @@ msgid "HTML Tidy version %s"
msgstr ""
#. This console output should be limited to 78 characters per line.
-#. - %n represents the name of the executable from the file system, and is mostly like going to be "tidy".
-#. - %2 represents a version number, typically x.x.xx.
+#. - First %s represents the name of the executable from the file system, and is mostly like going to be "tidy".
+#. - Second %s represents a version number, typically x.x.xx.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "TC_TXT_HELP_1"
diff --git a/localize/translations/language_fr.po b/localize/translations/language_fr.po
index 91ff180..0c5f4d0 100644
--- a/localize/translations/language_fr.po
+++ b/localize/translations/language_fr.po
@@ -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-03-10 09:04:23\n"
+"PO-Revision-Date: 2017-03-15 17:35:16\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -63,7 +63,7 @@ msgstr[0] "alarme"
msgstr[1] "alarmes"
msgctxt "STRING_HELLO_ACCESS"
-msgid "Accessibility Checks:"
+msgid "\nAccessibility Checks:\n"
msgstr "Contrôles d'accessibilité: version 0.1"
#. This is not a formal name and can be translated.
@@ -84,8 +84,9 @@ msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr "Aucun identificateur de système dans le doctype émis"
+#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
-msgid "Not all warnings/errors were shown."
+msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr "Pas tous les avertissements/erreurs ont été présentés."
msgctxt "STRING_PLAIN_TEXT"
@@ -128,7 +129,6 @@ msgid ""
" referenced by this attribute are inserted into the list and the \n"
" search stops for the current direction.\n"
" TD cells that set the axis attribute are also treated as header cells.\n"
-"\n"
msgstr ""
"\n"
" - D'abord, cherchez à gauche de la position de la cellule de trouver \n"
@@ -158,7 +158,7 @@ msgid ""
"128 - 159 may not be recognized on other platforms. You are\n"
"instead recommended to use named entities, e.g. ™ rather\n"
"than Windows character code 153 (0x2122 in Unicode). Note that\n"
-"as of February 1998 few browsers support the new entities.\n\n"
+"as of February 1998 few browsers support the new entities.\n"
msgstr ""
"Personnages codes pour les polices Microsoft Windows dans la gamme\n"
"128-159 ne pas être reconnus sur d'autres plateformes. Vous êtes\n"
@@ -177,7 +177,6 @@ msgid ""
"work widely enough on the World Wide Web; you should avoid using the \n"
"%s character encoding, instead you are recommended to\n"
"use named entities, e.g. ™.\n"
-"\n"
msgstr ""
"Il est peu probable que fournisseur spécifique, encodages qui dépendent du système\n"
"travailler assez largement sur le World Wide Web; vous devriez éviter d'utiliser le "
@@ -195,7 +194,6 @@ msgid ""
"Tidy assumed you wanted to refer to a character with the same byte value in the \n"
"%s encoding and replaced that reference with the Unicode \n"
"equivalent.\n"
-"\n"
msgstr ""
"Les codes de caractères 128 à 159 (U + 0080 à U + 009F) ne sont pas autorisés \n"
"en HTML; même si elles l'étaient, ils seraient probablement les \n"
@@ -217,7 +215,6 @@ msgid ""
"does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n"
"(but it does allow other noncharacters). For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
"Les codes de caractères UTF-8 doivent être dans la gamme: U + 0000 à U + 10FFFF.\n"
"La définition de l'UTF-8 à l'annexe D de la norme ISO / CEI 10646-1: 2000 a "
@@ -239,7 +236,6 @@ msgid ""
"The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n"
"mapping of unpaired surrogates. For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
"Codes de caractères pour UTF-16 doit être dans la gamme: U + 0000 à U + 10FFFF.\n"
"La définition de UTF-16 dans l'annexe C de l'ISO/CEI 10646-1: 2000 n'autorise pas "
@@ -261,7 +257,6 @@ msgid ""
"scripts depend on that. If you want to depend on that, you must\n"
"escape the URI on your own. For more information please refer to\n"
"http://www.w3.org/International/O-URL-and-ident.html\n"
-"\n"
msgstr ""
"URI doit être correctement protégés, ils ne doivent pas contenir unescaped\n"
"caractères ci-dessous U + 0021, y compris le caractère d'espace et non\n"
@@ -283,7 +278,6 @@ msgid ""
"in one table cell and the in another. If the cannot be placed inside the\n"
"table! Note that one form can't be nested inside another!\n"
-"\n"
msgstr ""
"Vous devrez peut-être déplacer un ou deux de la\n"
"tags. Éléments HTML doivent être correctement imbriquées et les éléments\n"
@@ -313,7 +307,6 @@ msgid ""
"table cells are useful for specifying which headers apply\n"
"to each table cell, enabling non-visual browsers to provide\n"
"a meaningful context for each cell.\n"
-"\n"
msgstr ""
"L'attribut summary table devrait servir à décrire la structure\n"
"de la table. Il est très utile pour les personnes utilisant des\n"
@@ -330,7 +323,6 @@ msgid ""
"of an image; longer descriptions should be given with the\n"
"longdesc attribute which takes a URL linked to the description.\n"
"These measures are needed for people using non-graphical browsers.\n"
-"\n"
msgstr ""
"L'attribut alt devrait servir à donner une brève description d'une\n"
"image ; Il faudrait aussi des descriptions plus longues avec l'attribut\n"
@@ -345,7 +337,6 @@ msgid ""
"maps as the latter are inaccessible to people using non-\n"
"graphical browsers. In addition, client-side maps are easier\n"
"to set up and provide immediate feedback to users.\n"
-"\n"
msgstr ""
"Utilisation côté client images interactives préférence cartes-images\n"
"côté serveur comme celui-ci est inaccessibles aux personnes utilisant\n"
@@ -360,7 +351,6 @@ msgid ""
"For hypertext links defined using a client-side image map, you\n"
"need to use the alt attribute to provide a textual description\n"
"of the link for people using non-graphical browsers.\n"
-"\n"
msgstr ""
"Liens hypertextes définie à l'aide d'une hyperimage côté client, vous\n"
"devez utiliser l'attribut alt pour fournir une description textuelle de la\n"
@@ -374,7 +364,6 @@ msgid ""
"people who are either blind or using a browser that\n"
"doesn't support frames. A frames-based page should always\n"
"include an alternative layout inside a NOFRAMES element.\n"
-"\n"
msgstr ""
"Pages conçues à l'aide de cadres pose des problèmes pour\n"
"les personnes qui sont aveugles ou utilisez un navigateur qui\n"
@@ -384,10 +373,11 @@ msgstr ""
"\n"
#. This console output should be limited to 78 characters per line.
+#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE1"
msgid ""
"For further advice on how to make your pages accessible\n"
-"see http://www.w3.org/WAI/GL"
+"see http://www.w3.org/WAI/GL.\n"
msgstr ""
"Pour plus d'informations sur la façon de rendre vos pages\n"
"accessibles, voir http://www.w3.org/WAI/GL"
@@ -395,7 +385,9 @@ msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE2"
-msgid " and http://www.html-tidy.org/accessibility/"
+msgid ""
+"For further advice on how to make your pages accessible\n"
+"see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
msgstr "et http://www.html-tidy.org/Accessibility/"
#. This console output should be limited to 78 characters per line.
@@ -404,7 +396,6 @@ msgid ""
"The Cascading Style Sheets (CSS) Positioning mechanism\n"
"is recommended in preference to the proprietary \n"
"element due to limited vendor support for LAYER.\n"
-"\n"
msgstr ""
"Les Cascading Style Sheets (CSS) mécanisme de positionnement\n"
"Il est recommandé de préférence à la propriétaire \n"
@@ -417,7 +408,6 @@ msgid ""
"You are recommended to use CSS for controlling white\n"
"space (e.g. for indentation, margins and line spacing).\n"
"The proprietary element has limited vendor support.\n"
-"\n"
msgstr ""
"Il est recommandé d'utiliser les CSS pour contrôler blanc\n"
"espace (par exemple pour retrait, les marges et interlignes).\n"
@@ -431,7 +421,6 @@ msgid ""
"properties such as its size and color. This will reduce\n"
"the size of HTML files and make them easier to maintain\n"
"compared with using elements.\n"
-"\n"
msgstr ""
"Il est recommandé d'utiliser les CSS pour spécifier la police et\n"
"propriétés telles que sa taille et sa couleur. Cela permettra de réduire\n"
@@ -445,7 +434,6 @@ msgid ""
"You are recommended to use CSS to control line wrapping.\n"
"Use \"white-space: nowrap\" to inhibit wrapping in place\n"
"of inserting ... into the markup.\n"
-"\n"
msgstr ""
"Il est recommandé d'utiliser les CSS pour contrôler les sauts de ligne.\n"
"Utilisez \"white-space: nowrap\" pour inhiber emballage en place\n"
@@ -465,7 +453,6 @@ msgctxt "TEXT_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
-"\n"
msgstr ""
"Ce document contient des erreurs qui doivent être résolus avant\n"
"utilisant HTML Tidy pour générer une version rangé.\n"
@@ -492,12 +479,12 @@ 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.
+#. - Don't terminate the last line with a newline.
msgctxt "TEXT_GENERAL_INFO_PLEA"
msgid ""
-"\n"
"Do you speak a language other than English, or a different variant of \n"
"English? Consider helping us to localize HTML Tidy. For details please see \n"
-"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
+"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md"
msgstr ""
"\n"
"Parlez-vous une langue autre que l'anglais ou une autre variante de\n"
@@ -533,6 +520,18 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr "Panique:"
+msgctxt "TidyDialogueInfo"
+msgid "Information: "
+msgstr ""
+
+msgctxt "TidyDialogueSummary"
+msgid "Summary: "
+msgstr ""
+
+msgctxt "TidyDialogueDoc"
+msgid "Document: "
+msgstr ""
+
#, c-format
msgctxt "ENCODING_MISMATCH"
msgid "specified input encoding (%s) does not match actual input encoding (%s)"
@@ -633,6 +632,11 @@ msgctxt "MISMATCHED_ATTRIBUTE_WARN"
msgid "%s attribute \"%s\" not allowed for %s"
msgstr ""
+#, c-format
+msgctxt "ATTRIBUTE_IS_NOT_ALLOWED"
+msgid "%s attribute \"is\" not allowed for autonomous custom tags."
+msgstr ""
+
#, c-format
msgctxt "JOINING_ATTRIBUTE"
msgid "%s joining values of repeated attribute \"%s\""
@@ -797,6 +801,27 @@ msgctxt "REPLACING_ELEMENT"
msgid "replacing %s with %s"
msgstr "remplaçant %s avec %s"
+#, c-format
+msgctxt "CUSTOM_TAG_DETECTED"
+msgid "detected autonomous custom tag %s; will treat as %s"
+msgstr ""
+
+msgctxt "TidyCustomBlocklevel"
+msgid "block level"
+msgstr ""
+
+msgctxt "TidyCustomEmpty"
+msgid "empty"
+msgstr ""
+
+msgctxt "TidyCustomInline"
+msgid "inline"
+msgstr ""
+
+msgctxt "TidyCustomPre"
+msgid "pre"
+msgstr ""
+
#, c-format
msgctxt "COERCE_TO_ENDTAG"
msgid "<%s> is probably intended as %s>"
@@ -981,6 +1006,11 @@ msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
msgstr "%s n'est pas reconnue !"
+#, c-format
+msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
+msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
+msgstr ""
+
#, c-format
msgctxt "PREVIOUS_LOCATION"
msgid "<%s> previously mentioned"
@@ -3143,8 +3173,36 @@ msgstr ""
#. be translated.
msgctxt "TidyEscapeScripts"
msgid ""
-"This option causes items that look like closing tags, like </g
to be escaped "
-"to <\\/g
. Set this option to 'no' if you do not want this."
+"This option causes items that look like closing tags, like "
+"</g
to be escaped to <\\/g
. Set "
+"this option to no if you do not want this."
+msgstr ""
+
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyUseCustomTags"
+msgid ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognized "
+"accordingly, and unknown closing tags will be discarded. "
msgstr ""
msgctxt "TidyDiagnostics"
@@ -3471,8 +3529,8 @@ msgid "HTML Tidy version %s"
msgstr ""
#. This console output should be limited to 78 characters per line.
-#. - %n represents the name of the executable from the file system, and is mostly like going to be "tidy".
-#. - %2 represents a version number, typically x.x.xx.
+#. - First %s represents the name of the executable from the file system, and is mostly like going to be "tidy".
+#. - Second %s represents a version number, typically x.x.xx.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "TC_TXT_HELP_1"
diff --git a/localize/translations/language_zh_cn.po b/localize/translations/language_zh_cn.po
index 925e9b7..63b043e 100644
--- a/localize/translations/language_zh_cn.po
+++ b/localize/translations/language_zh_cn.po
@@ -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-03-10 09:04:23\n"
+"PO-Revision-Date: 2017-03-15 17:35:16\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -61,7 +61,7 @@ msgid_plural "warnings"
msgstr[0] ""
msgctxt "STRING_HELLO_ACCESS"
-msgid "Accessibility Checks:"
+msgid "\nAccessibility Checks:\n"
msgstr ""
#. This is not a formal name and can be translated.
@@ -82,8 +82,9 @@ msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
+#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
-msgid "Not all warnings/errors were shown."
+msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
@@ -126,7 +127,6 @@ msgid ""
" referenced by this attribute are inserted into the list and the \n"
" search stops for the current direction.\n"
" TD cells that set the axis attribute are also treated as header cells.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -136,7 +136,7 @@ msgid ""
"128 - 159 may not be recognized on other platforms. You are\n"
"instead recommended to use named entities, e.g. ™ rather\n"
"than Windows character code 153 (0x2122 in Unicode). Note that\n"
-"as of February 1998 few browsers support the new entities.\n\n"
+"as of February 1998 few browsers support the new entities.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -148,7 +148,6 @@ msgid ""
"work widely enough on the World Wide Web; you should avoid using the \n"
"%s character encoding, instead you are recommended to\n"
"use named entities, e.g. ™.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -162,7 +161,6 @@ msgid ""
"Tidy assumed you wanted to refer to a character with the same byte value in the \n"
"%s encoding and replaced that reference with the Unicode \n"
"equivalent.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -177,7 +175,6 @@ msgid ""
"does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n"
"(but it does allow other noncharacters). For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -187,7 +184,6 @@ msgid ""
"The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n"
"mapping of unpaired surrogates. For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -202,7 +198,6 @@ msgid ""
"scripts depend on that. If you want to depend on that, you must\n"
"escape the URI on your own. For more information please refer to\n"
"http://www.w3.org/International/O-URL-and-ident.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -214,7 +209,6 @@ msgid ""
"in one table cell and the in another. If the cannot be placed inside the\n"
"table! Note that one form can't be nested inside another!\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -234,7 +228,6 @@ msgid ""
"table cells are useful for specifying which headers apply\n"
"to each table cell, enabling non-visual browsers to provide\n"
"a meaningful context for each cell.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -244,7 +237,6 @@ msgid ""
"of an image; longer descriptions should be given with the\n"
"longdesc attribute which takes a URL linked to the description.\n"
"These measures are needed for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -254,7 +246,6 @@ msgid ""
"maps as the latter are inaccessible to people using non-\n"
"graphical browsers. In addition, client-side maps are easier\n"
"to set up and provide immediate feedback to users.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -263,7 +254,6 @@ msgid ""
"For hypertext links defined using a client-side image map, you\n"
"need to use the alt attribute to provide a textual description\n"
"of the link for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -273,20 +263,22 @@ msgid ""
"people who are either blind or using a browser that\n"
"doesn't support frames. A frames-based page should always\n"
"include an alternative layout inside a NOFRAMES element.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
+#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE1"
msgid ""
"For further advice on how to make your pages accessible\n"
-"see http://www.w3.org/WAI/GL"
+"see http://www.w3.org/WAI/GL.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE2"
-msgid " and http://www.html-tidy.org/accessibility/"
+msgid ""
+"For further advice on how to make your pages accessible\n"
+"see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -295,7 +287,6 @@ msgid ""
"The Cascading Style Sheets (CSS) Positioning mechanism\n"
"is recommended in preference to the proprietary \n"
"element due to limited vendor support for LAYER.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -304,7 +295,6 @@ msgid ""
"You are recommended to use CSS for controlling white\n"
"space (e.g. for indentation, margins and line spacing).\n"
"The proprietary element has limited vendor support.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -314,7 +304,6 @@ msgid ""
"properties such as its size and color. This will reduce\n"
"the size of HTML files and make them easier to maintain\n"
"compared with using elements.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -323,7 +312,6 @@ msgid ""
"You are recommended to use CSS to control line wrapping.\n"
"Use \"white-space: nowrap\" to inhibit wrapping in place\n"
"of inserting ... into the markup.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -337,7 +325,6 @@ msgctxt "TEXT_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -354,12 +341,12 @@ 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.
+#. - Don't terminate the last line with a newline.
msgctxt "TEXT_GENERAL_INFO_PLEA"
msgid ""
-"\n"
"Do you speak a language other than English, or a different variant of \n"
"English? Consider helping us to localize HTML Tidy. For details please see \n"
-"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
+"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md"
msgstr ""
msgctxt "TidyInfo"
@@ -390,6 +377,18 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
+msgctxt "TidyDialogueInfo"
+msgid "Information: "
+msgstr ""
+
+msgctxt "TidyDialogueSummary"
+msgid "Summary: "
+msgstr ""
+
+msgctxt "TidyDialogueDoc"
+msgid "Document: "
+msgstr ""
+
#, c-format
msgctxt "ENCODING_MISMATCH"
msgid "specified input encoding (%s) does not match actual input encoding (%s)"
@@ -490,6 +489,11 @@ msgctxt "MISMATCHED_ATTRIBUTE_WARN"
msgid "%s attribute \"%s\" not allowed for %s"
msgstr ""
+#, c-format
+msgctxt "ATTRIBUTE_IS_NOT_ALLOWED"
+msgid "%s attribute \"is\" not allowed for autonomous custom tags."
+msgstr ""
+
#, c-format
msgctxt "JOINING_ATTRIBUTE"
msgid "%s joining values of repeated attribute \"%s\""
@@ -654,6 +658,27 @@ msgctxt "REPLACING_ELEMENT"
msgid "replacing %s with %s"
msgstr ""
+#, c-format
+msgctxt "CUSTOM_TAG_DETECTED"
+msgid "detected autonomous custom tag %s; will treat as %s"
+msgstr ""
+
+msgctxt "TidyCustomBlocklevel"
+msgid "block level"
+msgstr ""
+
+msgctxt "TidyCustomEmpty"
+msgid "empty"
+msgstr ""
+
+msgctxt "TidyCustomInline"
+msgid "inline"
+msgstr ""
+
+msgctxt "TidyCustomPre"
+msgid "pre"
+msgstr ""
+
#, c-format
msgctxt "COERCE_TO_ENDTAG"
msgid "<%s> is probably intended as %s>"
@@ -838,6 +863,11 @@ msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
msgstr ""
+#, c-format
+msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
+msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
+msgstr ""
+
#, c-format
msgctxt "PREVIOUS_LOCATION"
msgid "<%s> previously mentioned"
@@ -2942,8 +2972,36 @@ msgstr ""
#. be translated.
msgctxt "TidyEscapeScripts"
msgid ""
-"This option causes items that look like closing tags, like </g
to be escaped "
-"to <\\/g
. Set this option to 'no' if you do not want this."
+"This option causes items that look like closing tags, like "
+"</g
to be escaped to <\\/g
. Set "
+"this option to no if you do not want this."
+msgstr ""
+
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyUseCustomTags"
+msgid ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognized "
+"accordingly, and unknown closing tags will be discarded. "
msgstr ""
msgctxt "TidyDiagnostics"
@@ -3268,8 +3326,8 @@ msgid "HTML Tidy version %s"
msgstr "HTML Tidy 版本 %s"
#. This console output should be limited to 78 characters per line.
-#. - %n represents the name of the executable from the file system, and is mostly like going to be "tidy".
-#. - %2 represents a version number, typically x.x.xx.
+#. - First %s represents the name of the executable from the file system, and is mostly like going to be "tidy".
+#. - Second %s represents a version number, typically x.x.xx.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "TC_TXT_HELP_1"
diff --git a/localize/translations/tidy.pot b/localize/translations/tidy.pot
index 34e2040..10696d2 100644
--- a/localize/translations/tidy.pot
+++ b/localize/translations/tidy.pot
@@ -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-03-10 09:04:23\n"
+"POT-Creation-Date: 2017-03-15 17:35:16\n"
"Last-Translator: jderry\n"
"Language-Team: \n"
@@ -63,7 +63,7 @@ msgstr[0] ""
msgstr[1] ""
msgctxt "STRING_HELLO_ACCESS"
-msgid "Accessibility Checks:"
+msgid "\nAccessibility Checks:\n"
msgstr ""
#. This is not a formal name and can be translated.
@@ -84,8 +84,9 @@ msgctxt "STRING_NO_SYSID"
msgid "No system identifier in emitted doctype"
msgstr ""
+#, c-format
msgctxt "STRING_NOT_ALL_SHOWN"
-msgid "Not all warnings/errors were shown."
+msgid "Tidy found %u %s and %u %s! Not all warnings/errors were shown."
msgstr ""
msgctxt "STRING_PLAIN_TEXT"
@@ -128,7 +129,6 @@ msgid ""
" referenced by this attribute are inserted into the list and the \n"
" search stops for the current direction.\n"
" TD cells that set the axis attribute are also treated as header cells.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -138,7 +138,7 @@ msgid ""
"128 - 159 may not be recognized on other platforms. You are\n"
"instead recommended to use named entities, e.g. ™ rather\n"
"than Windows character code 153 (0x2122 in Unicode). Note that\n"
-"as of February 1998 few browsers support the new entities.\n\n"
+"as of February 1998 few browsers support the new entities.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -150,7 +150,6 @@ msgid ""
"work widely enough on the World Wide Web; you should avoid using the \n"
"%s character encoding, instead you are recommended to\n"
"use named entities, e.g. ™.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -164,7 +163,6 @@ msgid ""
"Tidy assumed you wanted to refer to a character with the same byte value in the \n"
"%s encoding and replaced that reference with the Unicode \n"
"equivalent.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -179,7 +177,6 @@ msgid ""
"does not allow mapping of unpaired surrogates, nor U+FFFE and U+FFFF\n"
"(but it does allow other noncharacters). For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -189,7 +186,6 @@ msgid ""
"The definition of UTF-16 in Annex C of ISO/IEC 10646-1:2000 does not allow the\n"
"mapping of unpaired surrogates. For more information please refer to\n"
"http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -204,7 +200,6 @@ msgid ""
"scripts depend on that. If you want to depend on that, you must\n"
"escape the URI on your own. For more information please refer to\n"
"http://www.w3.org/International/O-URL-and-ident.html\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -216,7 +211,6 @@ msgid ""
"in one table cell and the in another. If the cannot be placed inside the\n"
"table! Note that one form can't be nested inside another!\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -236,7 +230,6 @@ msgid ""
"table cells are useful for specifying which headers apply\n"
"to each table cell, enabling non-visual browsers to provide\n"
"a meaningful context for each cell.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -246,7 +239,6 @@ msgid ""
"of an image; longer descriptions should be given with the\n"
"longdesc attribute which takes a URL linked to the description.\n"
"These measures are needed for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -256,7 +248,6 @@ msgid ""
"maps as the latter are inaccessible to people using non-\n"
"graphical browsers. In addition, client-side maps are easier\n"
"to set up and provide immediate feedback to users.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -265,7 +256,6 @@ msgid ""
"For hypertext links defined using a client-side image map, you\n"
"need to use the alt attribute to provide a textual description\n"
"of the link for people using non-graphical browsers.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -275,20 +265,22 @@ msgid ""
"people who are either blind or using a browser that\n"
"doesn't support frames. A frames-based page should always\n"
"include an alternative layout inside a NOFRAMES element.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
+#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE1"
msgid ""
"For further advice on how to make your pages accessible\n"
-"see http://www.w3.org/WAI/GL"
+"see http://www.w3.org/WAI/GL.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
#. - The URL should not be translated unless you find a matching URL in your language.
msgctxt "TEXT_ACCESS_ADVICE2"
-msgid " and http://www.html-tidy.org/accessibility/"
+msgid ""
+"For further advice on how to make your pages accessible\n"
+"see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -297,7 +289,6 @@ msgid ""
"The Cascading Style Sheets (CSS) Positioning mechanism\n"
"is recommended in preference to the proprietary \n"
"element due to limited vendor support for LAYER.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -306,7 +297,6 @@ msgid ""
"You are recommended to use CSS for controlling white\n"
"space (e.g. for indentation, margins and line spacing).\n"
"The proprietary element has limited vendor support.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -316,7 +306,6 @@ msgid ""
"properties such as its size and color. This will reduce\n"
"the size of HTML files and make them easier to maintain\n"
"compared with using elements.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -325,7 +314,6 @@ msgid ""
"You are recommended to use CSS to control line wrapping.\n"
"Use \"white-space: nowrap\" to inhibit wrapping in place\n"
"of inserting ... into the markup.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -339,7 +327,6 @@ msgctxt "TEXT_NEEDS_INTERVENTION"
msgid ""
"This document has errors that must be fixed before\n"
"using HTML Tidy to generate a tidied up version.\n"
-"\n"
msgstr ""
#. This console output should be limited to 78 characters per line.
@@ -356,12 +343,12 @@ 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.
+#. - Don't terminate the last line with a newline.
msgctxt "TEXT_GENERAL_INFO_PLEA"
msgid ""
-"\n"
"Do you speak a language other than English, or a different variant of \n"
"English? Consider helping us to localize HTML Tidy. For details please see \n"
-"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
+"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md"
msgstr ""
msgctxt "TidyInfo"
@@ -392,6 +379,18 @@ msgctxt "TidyFatal"
msgid "Panic: "
msgstr ""
+msgctxt "TidyDialogueInfo"
+msgid "Information: "
+msgstr ""
+
+msgctxt "TidyDialogueSummary"
+msgid "Summary: "
+msgstr ""
+
+msgctxt "TidyDialogueDoc"
+msgid "Document: "
+msgstr ""
+
#, c-format
msgctxt "ENCODING_MISMATCH"
msgid "specified input encoding (%s) does not match actual input encoding (%s)"
@@ -492,6 +491,11 @@ msgctxt "MISMATCHED_ATTRIBUTE_WARN"
msgid "%s attribute \"%s\" not allowed for %s"
msgstr ""
+#, c-format
+msgctxt "ATTRIBUTE_IS_NOT_ALLOWED"
+msgid "%s attribute \"is\" not allowed for autonomous custom tags."
+msgstr ""
+
#, c-format
msgctxt "JOINING_ATTRIBUTE"
msgid "%s joining values of repeated attribute \"%s\""
@@ -656,6 +660,27 @@ msgctxt "REPLACING_ELEMENT"
msgid "replacing %s with %s"
msgstr ""
+#, c-format
+msgctxt "CUSTOM_TAG_DETECTED"
+msgid "detected autonomous custom tag %s; will treat as %s"
+msgstr ""
+
+msgctxt "TidyCustomBlocklevel"
+msgid "block level"
+msgstr ""
+
+msgctxt "TidyCustomEmpty"
+msgid "empty"
+msgstr ""
+
+msgctxt "TidyCustomInline"
+msgid "inline"
+msgstr ""
+
+msgctxt "TidyCustomPre"
+msgid "pre"
+msgstr ""
+
#, c-format
msgctxt "COERCE_TO_ENDTAG"
msgid "<%s> is probably intended as %s>"
@@ -840,6 +865,11 @@ msgctxt "UNKNOWN_ELEMENT"
msgid "%s is not recognized!"
msgstr ""
+#, c-format
+msgctxt "UNKNOWN_ELEMENT_LOOKS_CUSTOM"
+msgid "%s is not recognized! Did you mean to enable the custom-tags option?"
+msgstr ""
+
#, c-format
msgctxt "PREVIOUS_LOCATION"
msgid "<%s> previously mentioned"
@@ -2944,8 +2974,36 @@ msgstr ""
#. be translated.
msgctxt "TidyEscapeScripts"
msgid ""
-"This option causes items that look like closing tags, like </g
to be escaped "
-"to <\\/g
. Set this option to 'no' if you do not want this."
+"This option causes items that look like closing tags, like "
+"</g
to be escaped to <\\/g
. Set "
+"this option to no if you do not want this."
+msgstr ""
+
+#. Important notes for translators:
+#. - Use only
, , , , and
+#.
.
+#. - Entities, tags, attributes, etc., should be enclosed in
.
+#. - Option values should be enclosed in .
+#. - It's very important that
be self-closing!
+#. - The strings "Tidy" and "HTML Tidy" are the program name and must not
+#. be translated.
+msgctxt "TidyUseCustomTags"
+msgid ""
+"This option enables the use of tags for autonomous custom elements, "
+"e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+"value is no. Other settings - blocklevel, "
+"empty, inline, and pre will treat "
+"all detected custom tags accordingly. "
+"
"
+"The use of new-blocklevel-tags
, "
+"new-empty-tags
, new-inline-tags
, or "
+"new-pre-tags
will override the treatment of custom tags "
+"by this configuration option. This may be useful if you have "
+"different types of custom tags."
+"
"
+"When enabled these tags are determined during the processing of your "
+"document using opening tags; matching closing tags will be recognized "
+"accordingly, and unknown closing tags will be discarded. "
msgstr ""
msgctxt "TidyDiagnostics"
@@ -3270,8 +3328,8 @@ msgid "HTML Tidy version %s"
msgstr ""
#. This console output should be limited to 78 characters per line.
-#. - %n represents the name of the executable from the file system, and is mostly like going to be "tidy".
-#. - %2 represents a version number, typically x.x.xx.
+#. - First %s represents the name of the executable from the file system, and is mostly like going to be "tidy".
+#. - Second %s represents a version number, typically x.x.xx.
#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated.
#, c-format
msgctxt "TC_TXT_HELP_1"
diff --git a/src/attrdict.c b/src/attrdict.c
index 1a356b4..e6c389b 100644
--- a/src/attrdict.c
+++ b/src/attrdict.c
@@ -92,6 +92,7 @@
{ TidyAttr_DROPZONE, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
{ TidyAttr_HIDDEN, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
{ TidyAttr_ID, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
+ { TidyAttr_IS, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
{ TidyAttr_LANG, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
{ TidyAttr_ROLE, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
{ TidyAttr_SPELLCHECK, xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|xxxx|HT50|XH50 }, \
diff --git a/src/attrs.c b/src/attrs.c
index 1cf27b2..467a814 100644
--- a/src/attrs.c
+++ b/src/attrs.c
@@ -31,6 +31,7 @@ static AttrCheck CheckAction;
static AttrCheck CheckScript;
static AttrCheck CheckName;
static AttrCheck CheckId;
+static AttrCheck CheckIs;
static AttrCheck CheckAlign;
static AttrCheck CheckValign;
static AttrCheck CheckBool;
@@ -75,6 +76,7 @@ static AttrCheck CheckRDFaPrefix;
#define CH_IDREFS NULL
#define CH_IDREF NULL
#define CH_IDDEF CheckId
+#define CH_ISDEF CheckIs
#define CH_NAME CheckName
#define CH_TFRAME NULL
#define CH_FBORDER NULL
@@ -160,6 +162,7 @@ static const Attribute attribute_defs [] =
{ TidyAttr_HSPACE, "hspace", CH_NUMBER }, /* APPLET, IMG, OBJECT */
{ TidyAttr_HTTP_EQUIV, "http-equiv", CH_PCDATA }, /* META */
{ TidyAttr_ID, "id", CH_IDDEF },
+ { TidyAttr_IS, "is", CH_ISDEF },
{ TidyAttr_ISMAP, "ismap", CH_BOOL }, /* IMG */
{ TidyAttr_ITEMID, "itemid", CH_PCDATA },
{ TidyAttr_ITEMPROP, "itemprop", CH_PCDATA },
@@ -1718,6 +1721,40 @@ void CheckId( TidyDocImpl* doc, Node *node, AttVal *attval )
AddAnchor( doc, attval->value, node );
}
+void CheckIs( TidyDocImpl* doc, Node *node, AttVal *attval )
+{
+ const char *ptr;
+ Bool go = yes;
+
+ /* `is` MUST NOT be in an autonomous custom tag */
+ ptr = strchr(node->element, '-');
+ if ( ( ptr && (ptr - node->element > 0) ) )
+ {
+ TY_(ReportAttrError)( doc, node, attval, ATTRIBUTE_IS_NOT_ALLOWED);
+ }
+
+ /* Even if we fail the above test, we'll continue to emit reports because
+ the user should *also* know that his attribute values are wrong, even
+ if they should't be in custom tags anyway. */
+
+ /* `is` MUST have a value */
+ if (!AttrHasValue(attval))
+ {
+ TY_(ReportAttrError)( doc, node, attval, MISSING_ATTR_VALUE);
+ return;
+ }
+
+ /* `is` MUST contain a hyphen and no space. */
+ ptr = strchr(attval->value, '-');
+ go = ( ptr && (ptr - attval->value > 0) );
+ ptr = strchr(attval->value, ' ');
+ go = go & (ptr == NULL);
+ if ( !go )
+ {
+ TY_(ReportAttrError)( doc, node, attval, BAD_ATTRIBUTE_VALUE);
+ }
+}
+
void CheckBool( TidyDocImpl* doc, Node *node, AttVal *attval)
{
if (!AttrHasValue(attval))
diff --git a/src/config.c b/src/config.c
index 2a43601..221b475 100644
--- a/src/config.c
+++ b/src/config.c
@@ -143,6 +143,16 @@ static const ctmbstr sorterPicks[] =
NULL
};
+static const ctmbstr customTagsPicks[] =
+{
+ "no",
+ "blocklevel",
+ "empty",
+ "inline",
+ "pre",
+ NULL
+};
+
#define MU TidyMarkup
#define DG TidyDiagnostics
#define PP TidyPrettyPrint
@@ -213,6 +223,10 @@ static ParseProperty ParseRepeatAttr;
\*/
static ParseProperty ParseTabs;
+/* Parse the value of TidyUseCustomTags */
+static ParseProperty ParseUseCustomTags;
+
+
/* Ensure struct order is same order as tidyenum.h:TidyOptionId! */
static const TidyOptionImpl option_defs[] =
{
@@ -227,6 +241,7 @@ static const TidyOptionImpl option_defs[] =
{ TidyCharEncoding, CE, "char-encoding", IN, UTF8, ParseCharEnc, charEncPicks },
{ TidyCoerceEndTags, MU, "coerce-endtags", BL, yes, ParseBool, boolPicks },
{ TidyCSSPrefix, MU, "css-prefix", ST, 0, ParseCSS1Selector, NULL },
+ { TidyCustomTags, IR, "new-custom-tags", ST, 0, ParseTagNames, NULL }, /* 20170309 - Issue #119 */
{ TidyDecorateInferredUL, MU, "decorate-inferred-ul", BL, no, ParseBool, boolPicks },
{ TidyDoctype, MU, "doctype", ST, 0, ParseDocType, doctypePicks },
#ifndef DOXYGEN_SHOULD_SKIP_THIS
@@ -305,6 +320,7 @@ static const TidyOptionImpl option_defs[] =
{ TidyTabSize, PP, "tab-size", IN, 8, ParseInt, NULL },
{ TidyUpperCaseAttrs, MU, "uppercase-attributes", BL, no, ParseBool, boolPicks },
{ TidyUpperCaseTags, MU, "uppercase-tags", BL, no, ParseBool, boolPicks },
+ { TidyUseCustomTags, MU, "custom-tags", IN, TidyCustomNo, ParseUseCustomTags,customTagsPicks }, /* 20170309 - Issue #119 */
{ TidyVertSpace, PP, "vertical-space", IN, no, ParseAutoBool, autoBoolPicks }, /* #228 - tri option */
{ TidyWord2000, MU, "word-2000", BL, no, ParseBool, boolPicks },
{ TidyWrapAsp, PP, "wrap-asp", BL, yes, ParseBool, boolPicks },
@@ -465,7 +481,8 @@ static Bool OptionValueIdentical( const TidyOptionImpl* option,
return val1->v == val2->v;
}
-static Bool NeedReparseTagDecls( const TidyOptionValue* current,
+static Bool NeedReparseTagDecls( TidyDocImpl* doc,
+ const TidyOptionValue* current,
const TidyOptionValue* new,
uint *changedUserTags )
{
@@ -549,7 +566,7 @@ void TY_(ResetConfigToSnapshot)( TidyDocImpl* doc )
TidyOptionValue* value = &doc->config.value[ 0 ];
const TidyOptionValue* snap = &doc->config.snapshot[ 0 ];
uint changedUserTags;
- Bool needReparseTagsDecls = NeedReparseTagDecls( value, snap,
+ Bool needReparseTagsDecls = NeedReparseTagDecls( doc, value, snap,
&changedUserTags );
for ( ixVal=0; ixVal < N_TIDY_OPTIONS; ++option, ++ixVal )
@@ -570,7 +587,7 @@ void TY_(CopyConfig)( TidyDocImpl* docTo, TidyDocImpl* docFrom )
const TidyOptionValue* from = &docFrom->config.value[ 0 ];
TidyOptionValue* to = &docTo->config.value[ 0 ];
uint changedUserTags;
- Bool needReparseTagsDecls = NeedReparseTagDecls( to, from,
+ Bool needReparseTagsDecls = NeedReparseTagDecls( docTo, to, from,
&changedUserTags );
TY_(TakeConfigSnapshot)( docTo );
@@ -1247,9 +1264,55 @@ Bool ParseTabs( TidyDocImpl* doc, const TidyOptionImpl* entry )
return status;
}
+/* Parse the value of TidyUseCustomTags. Like other option values, we will
+ * look for the first character only, of no, blocklevel, empty, inline, pre.
+ */
+Bool ParseUseCustomTags( TidyDocImpl* doc, const TidyOptionImpl* entry )
+{
+ uint value;
+ TidyConfigImpl* cfg = &doc->config;
+ tchar c = SkipWhite( cfg );
+
+ switch (c)
+ {
+ case 'n':
+ case 'N':
+ value = TidyCustomNo;
+ break;
+
+ case 'b':
+ value = TidyCustomBlocklevel;
+ break;
+
+ case 'e':
+ case 'E':
+ value = TidyCustomEmpty;
+ break;
+
+ case 'y':
+ case 'Y':
+ case 'i':
+ case 'I':
+ value = TidyCustomInline;
+ break;
+
+ case 'p':
+ case 'P':
+ value = TidyCustomPre;
+ break;
+
+ default:
+ TY_(ReportBadArgument)( doc, entry->name );
+ return no;
+ }
+
+ TY_(SetOptionInt)( doc, TidyUseCustomTags, value );
+ return yes;
+}
+
/* Coordinates Config update and Tags data */
-static void DeclareUserTag( TidyDocImpl* doc, TidyOptionId optId,
+void TY_(DeclareUserTag)( TidyDocImpl* doc, TidyOptionId optId,
UserTagType tagType, ctmbstr name )
{
ctmbstr prvval = cfgStr( doc, optId );
@@ -1280,13 +1343,14 @@ Bool ParseTagNames( TidyDocImpl* doc, const TidyOptionImpl* option )
switch ( option->id )
{
- case TidyInlineTags: ttyp = tagtype_inline; break;
- case TidyBlockTags: ttyp = tagtype_block; break;
- case TidyEmptyTags: ttyp = tagtype_empty; break;
- case TidyPreTags: ttyp = tagtype_pre; break;
- default:
- TY_(ReportUnknownOption)( doc, option->name );
- return no;
+ case TidyInlineTags: ttyp = tagtype_inline; break;
+ case TidyBlockTags: ttyp = tagtype_block; break;
+ case TidyEmptyTags: ttyp = tagtype_empty; break;
+ case TidyPreTags: ttyp = tagtype_pre; break;
+ case TidyCustomTags: ttyp = cfg(doc, TidyUseCustomTags); break;
+ default:
+ TY_(ReportUnknownOption)( doc, option->name );
+ return no;
}
SetOptionValue( doc, option->id, NULL );
@@ -1343,14 +1407,14 @@ Bool ParseTagNames( TidyDocImpl* doc, const TidyOptionImpl* option )
continue; /* there is a trailing space on the line. */
/* add tag to dictionary */
- DeclareUserTag( doc, option->id, ttyp, buf );
+ TY_(DeclareUserTag)( doc, option->id, ttyp, buf );
i = 0;
++nTags;
}
while ( c != EndOfStream );
if ( i > 0 )
- DeclareUserTag( doc, option->id, ttyp, buf );
+ TY_(DeclareUserTag)( doc, option->id, ttyp, buf );
return ( nTags > 0 );
}
diff --git a/src/config.h b/src/config.h
index 0a4864d..e35bf32 100644
--- a/src/config.h
+++ b/src/config.h
@@ -119,6 +119,10 @@ int TY_(CharEncodingId)( TidyDocImpl* doc, ctmbstr charenc );
ctmbstr TY_(CharEncodingName)( int encoding );
ctmbstr TY_(CharEncodingOptName)( int encoding );
+/* Coordinates Config update and Tags data */
+void TY_(DeclareUserTag)( TidyDocImpl* doc, TidyOptionId optId,
+ uint tagType, ctmbstr name );
+
#ifdef _DEBUG
diff --git a/src/language_en.h b/src/language_en.h
index c074a67..aac3a3c 100644
--- a/src/language_en.h
+++ b/src/language_en.h
@@ -227,13 +227,13 @@ static languageDefinition language_en = { whichPluralForm_en, {
- The URL should not be translated unless you find a matching URL in your language. */
TEXT_ACCESS_ADVICE1, 0,
"For further advice on how to make your pages accessible\n"
- "see http://www.w3.org/WAI/GL.\n"
+ "see http://www.w3.org/WAI/GL."
},
{/* This console output should be limited to 78 characters per line.
- The URL should not be translated unless you find a matching URL in your language. */
TEXT_ACCESS_ADVICE2, 0,
"For further advice on how to make your pages accessible\n"
- "see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/.\n"
+ "see http://www.w3.org/WAI/GL and http://www.html-tidy.org/accessibility/."
},
{/* This console output should be limited to 78 characters per line. */
TEXT_USING_LAYER, 0,
@@ -262,7 +262,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
},
{/* This console output should be limited to 78 characters per line. */
TEXT_USING_BODY, 0,
- "You are recommended to use CSS to specify page and link colors\n"
+ "You are recommended to use CSS to specify page and link colors"
},
{/* 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. */
@@ -337,6 +337,7 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ PROPRIETARY_ATTRIBUTE, 0, "%s proprietary attribute \"%s\"" }, /* Error */
{ MISMATCHED_ATTRIBUTE_ERROR, 0, "%s attribute \"%s\" not allowed for %s" }, /* Error */
{ MISMATCHED_ATTRIBUTE_WARN, 0, "%s attribute \"%s\" not allowed for %s" }, /* Warning */
+ { ATTRIBUTE_IS_NOT_ALLOWED, 0, "%s attribute \"is\" not allowed for autonomous custom tags." }, /* Warning */
{ JOINING_ATTRIBUTE, 0, "%s joining values of repeated attribute \"%s\"" }, /* Error */
{ XML_ATTRIBUTE_VALUE, 0, "%s has XML attribute \"%s\"" }, /* Error (but deprecated) */
@@ -384,6 +385,11 @@ static languageDefinition language_en = { whichPluralForm_en, {
/* ReportNotice */
{ TRIM_EMPTY_ELEMENT, 0, "trimming empty %s" }, /* Notice */
{ REPLACING_ELEMENT, 0, "replacing %s with %s" }, /* Notice */
+ { CUSTOM_TAG_DETECTED, 0, "detected autonomous custom tag %s; will treat as %s" }, /* Notice */
+ { TidyCustomBlocklevel, 0, "block level" },
+ { TidyCustomEmpty, 0, "empty" },
+ { TidyCustomInline, 0, "inline" },
+ { TidyCustomPre, 0, "pre" },
/* ReportError */
{ COERCE_TO_ENDTAG, 0, "<%s> is probably intended as %s>" }, /* Error */
@@ -430,7 +436,9 @@ static languageDefinition language_en = { whichPluralForm_en, {
{ SUSPECTED_MISSING_QUOTE, 0, "missing quote mark for attribute value" }, /* Error? (not really sometimes) */
{ DUPLICATE_FRAMESET, 0, "repeated FRAMESET element" }, /* Error */
{ UNKNOWN_ELEMENT, 0, "%s is not recognized!" }, /* Error */
-
+ { UNKNOWN_ELEMENT_LOOKS_CUSTOM, 0, "%s is not recognized! Did you mean to enable the custom-tags option?" }, /* Error */
+
+
/* Info */
{ PREVIOUS_LOCATION, 0, "<%s> previously mentioned" }, /* Info */
@@ -2015,8 +2023,34 @@ static languageDefinition language_en = { whichPluralForm_en, {
- The strings "Tidy" and "HTML Tidy" are the program name and must not
be translated. */
TidyEscapeScripts, 0,
- "This option causes items that look like closing tags, like </g
to be escaped "
- "to <\\/g
. Set this option to 'no' if you do not want this."
+ "This option causes items that look like closing tags, like "
+ "</g
to be escaped to <\\/g
. Set "
+ "this option to no if you do not want this."
+ },
+ {/* Important notes for translators:
+ - Use only
, , , , and
+
.
+ - Entities, tags, attributes, etc., should be enclosed in
.
+ - Option values should be enclosed in .
+ - It's very important that
be self-closing!
+ - The strings "Tidy" and "HTML Tidy" are the program name and must not
+ be translated. */
+ TidyUseCustomTags, 0,
+ "This option enables the use of tags for autonomous custom elements, "
+ "e.g. <flag-icon> with Tidy. Custom tags are disabled if this "
+ "value is no. Other settings - blocklevel, "
+ "empty, inline, and pre will treat "
+ "all detected custom tags accordingly. "
+ "
"
+ "The use of new-blocklevel-tags
, "
+ "new-empty-tags
, new-inline-tags
, or "
+ "new-pre-tags
will override the treatment of custom tags "
+ "by this configuration option. This may be useful if you have "
+ "different types of custom tags."
+ "
"
+ "When enabled these tags are determined during the processing of your "
+ "document using opening tags; matching closing tags will be recognized "
+ "accordingly, and unknown closing tags will be discarded. "
},
#if SUPPORT_CONSOLE_APP
diff --git a/src/language_en_gb.h b/src/language_en_gb.h
index 76773c3..46966ae 100644
--- a/src/language_en_gb.h
+++ b/src/language_en_gb.h
@@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
- * PO_REVISION_DATE=2017-03-10 09:04:23
+ * PO_REVISION_DATE=2017-03-15 17:35:16
*/
#ifdef _MSC_VER
diff --git a/src/language_es.h b/src/language_es.h
index ac17ba2..924ed89 100644
--- a/src/language_es.h
+++ b/src/language_es.h
@@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
- * PO_REVISION_DATE=2017-03-10 09:04:23
+ * PO_REVISION_DATE=2017-03-15 17:35:16
*/
#ifdef _MSC_VER
diff --git a/src/language_es_mx.h b/src/language_es_mx.h
index 0ee4d5a..d3ace4e 100644
--- a/src/language_es_mx.h
+++ b/src/language_es_mx.h
@@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
- * PO_REVISION_DATE=2017-03-10 09:04:23
+ * PO_REVISION_DATE=2017-03-15 17:35:16
*/
#ifdef _MSC_VER
diff --git a/src/language_fr.h b/src/language_fr.h
index 0398c61..3993dc4 100644
--- a/src/language_fr.h
+++ b/src/language_fr.h
@@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
- * PO_REVISION_DATE=2017-03-10 09:04:23
+ * PO_REVISION_DATE=2017-03-15 17:35:16
*/
#ifdef _MSC_VER
diff --git a/src/language_zh_cn.h b/src/language_zh_cn.h
index 0ebfa90..e3579d8 100644
--- a/src/language_zh_cn.h
+++ b/src/language_zh_cn.h
@@ -28,7 +28,7 @@
*
* Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry
- * PO_REVISION_DATE=2017-03-10 09:04:23
+ * PO_REVISION_DATE=2017-03-15 17:35:16
*/
#ifdef _MSC_VER
diff --git a/src/lexer.c b/src/lexer.c
index efefe74..ea42eec 100644
--- a/src/lexer.c
+++ b/src/lexer.c
@@ -3000,7 +3000,17 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
if (lexer->token->tag == NULL)
{
if (mode != OtherNamespace) /* [i_a]2 only issue warning if NOT 'OtherNamespace', and tag null */
- TY_(ReportFatal)( doc, NULL, lexer->token, UNKNOWN_ELEMENT );
+ {
+ /* Special case for HTML5 unknown tags: if it looks
+ like an autonomous custom tag, then emit a variation
+ of the standard message. We don't want to do this
+ for older HTML, because it's not truly supported
+ by the standard, although Tidy will allow it. */
+ if ( (doc->lexer->doctype & VERS_HTML5) > 0 && TY_(elementIsAutonomousCustomFormat)( lexer->token->element ) )
+ TY_(ReportFatal)( doc, NULL, lexer->token, UNKNOWN_ELEMENT_LOOKS_CUSTOM );
+ else
+ TY_(ReportFatal)( doc, NULL, lexer->token, UNKNOWN_ELEMENT );
+ }
}
else if ( !cfgBool(doc, TidyXmlTags) )
{
diff --git a/src/message.c b/src/message.c
index e4d9cd2..794c079 100755
--- a/src/message.c
+++ b/src/message.c
@@ -211,7 +211,8 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code)
Node* rpt = ( element ? element : node );
char nodedesc[256] = { 0 };
char elemdesc[256] = { 0 };
-
+ ctmbstr tagtype;
+
TagToString(node, nodedesc, sizeof(nodedesc));
switch (code)
@@ -225,6 +226,12 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code)
TagToString(element, elemdesc, sizeof(elemdesc));
message = TY_(tidyMessageCreateWithNode)(doc, rpt, code, TidyWarning, elemdesc, nodedesc );
break;
+
+ case CUSTOM_TAG_DETECTED:
+ TagToString(element, elemdesc, sizeof(elemdesc));
+ tagtype = tidyLocalizedString( cfg( doc, TidyUseCustomTags ) );
+ message = TY_(tidyMessageCreateWithNode)(doc, element, code, TidyInfo, elemdesc, tagtype );
+ break;
}
messageOut( message );
@@ -406,6 +413,7 @@ void TY_(ReportFatal)( TidyDocImpl* doc, Node *element, Node *node, uint code)
break;
case UNKNOWN_ELEMENT:
+ case UNKNOWN_ELEMENT_LOOKS_CUSTOM:
TagToString(node, nodedesc, sizeof(nodedesc));
message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyError, nodedesc );
break;
@@ -468,6 +476,10 @@ void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code)
message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, tagdesc, name );
break;
+ case ATTRIBUTE_IS_NOT_ALLOWED:
+ message = TY_(tidyMessageCreateWithNode)(doc, node, code, TidyWarning, tagdesc, name );
+ break;
+
case MISMATCHED_ATTRIBUTE_WARN:
version = doc->lexer->versionEmitted == 0 ? doc->lexer->doctype : doc->lexer->versionEmitted;
extra_string = TY_(HTMLVersionNameFromCode)(version, 0);
@@ -1040,21 +1052,22 @@ void TY_(ReportAccessWarning)( TidyDocImpl* doc, Node* node, uint code )
* Note that each list must be terminated with `TidyUnknownOption`.
*/
static const TidyOptionId TidyAsciiCharsLinks[] = { TidyMakeClean, TidyUnknownOption };
-static const TidyOptionId TidyBlockTagsLinks[] = { TidyEmptyTags, TidyInlineTags, TidyPreTags, TidyUnknownOption };
+static const TidyOptionId TidyBlockTagsLinks[] = { TidyEmptyTags, TidyInlineTags, TidyPreTags, TidyUseCustomTags, TidyUnknownOption };
static const TidyOptionId TidyCharEncodingLinks[] = { TidyInCharEncoding, TidyOutCharEncoding, TidyUnknownOption };
static const TidyOptionId TidyDuplicateAttrsLinks[] = { TidyJoinClasses, TidyJoinStyles, TidyUnknownOption };
-static const TidyOptionId TidyEmptyTagsLinks[] = { TidyBlockTags, TidyInlineTags, TidyPreTags, TidyUnknownOption };
+static const TidyOptionId TidyEmptyTagsLinks[] = { TidyBlockTags, TidyInlineTags, TidyPreTags, TidyUseCustomTags, TidyUnknownOption };
static const TidyOptionId TidyErrFileLinks[] = { TidyOutFile, TidyUnknownOption };
static const TidyOptionId TidyInCharEncodingLinks[] = { TidyCharEncoding, TidyUnknownOption };
static const TidyOptionId TidyIndentContentLinks[] = { TidyIndentSpaces, TidyUnknownOption };
static const TidyOptionId TidyIndentSpacesLinks[] = { TidyIndentContent, TidyUnknownOption };
-static const TidyOptionId TidyInlineTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyPreTags, TidyUnknownOption };
+static const TidyOptionId TidyInlineTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyPreTags, TidyUseCustomTags, TidyUnknownOption };
static const TidyOptionId TidyMergeDivsLinks[] = { TidyMakeClean, TidyMergeSpans, TidyUnknownOption };
static const TidyOptionId TidyMergeSpansLinks[] = { TidyMakeClean, TidyMergeDivs, TidyUnknownOption };
static const TidyOptionId TidyNumEntitiesLinks[] = { TidyDoctype, TidyPreserveEntities, TidyUnknownOption };
static const TidyOptionId TidyOutCharEncodingLinks[] = { TidyCharEncoding, TidyUnknownOption };
static const TidyOptionId TidyOutFileLinks[] = { TidyErrFile, TidyUnknownOption };
-static const TidyOptionId TidyPreTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyInlineTags, TidyUnknownOption };
+static const TidyOptionId TidyPreTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyInlineTags, TidyUseCustomTags, TidyUnknownOption };
+static const TidyOptionId TidyUseCustomTagsLinks[] = { TidyBlockTags, TidyEmptyTags, TidyInlineTags, TidyPreTags, TidyUnknownOption };
static const TidyOptionId TidyWrapAttValsLinks[] = { TidyWrapScriptlets, TidyLiteralAttribs, TidyUnknownOption };
static const TidyOptionId TidyWrapScriptletsLinks[] = { TidyWrapAttVals, TidyUnknownOption };
static const TidyOptionId TidyXmlDeclLinks[] = { TidyCharEncoding, TidyOutCharEncoding, TidyUnknownOption };
@@ -1081,6 +1094,7 @@ static const TidyOptionDoc docs_xrefs[] =
{ TidyOutCharEncoding, TidyOutCharEncodingLinks },
{ TidyOutFile, TidyOutFileLinks },
{ TidyPreTags, TidyPreTagsLinks },
+ { TidyUseCustomTags, TidyUseCustomTagsLinks },
{ TidyWrapAttVals, TidyWrapAttValsLinks },
{ TidyWrapScriptlets, TidyWrapScriptletsLinks },
{ TidyXmlDecl, TidyXmlDeclLinks },
diff --git a/src/tags.c b/src/tags.c
index 5685a54..50a931f 100644
--- a/src/tags.c
+++ b/src/tags.c
@@ -546,7 +546,9 @@ void show_have_html5(void)
/* public interface for finding tag by name */
Bool TY_(FindTag)( TidyDocImpl* doc, Node *node )
{
+ TidyUseCustomTagsState configtype = cfg( doc, TidyUseCustomTags );
const Dict *np = NULL;
+
if ( cfgBool(doc, TidyXmlTags) )
{
node->tag = doc->tags.xml_tags;
@@ -558,7 +560,32 @@ Bool TY_(FindTag)( TidyDocImpl* doc, Node *node )
node->tag = np;
return yes;
}
+
+ /* Add autonomous custom tag. This can be done in both HTML5 mode and
+ earlier, although if it's earlier we will complain about it elsewhere. */
+ if ( TY_(nodeIsAutonomousCustomTag)( doc, node) )
+ {
+ UserTagType type;
+ if ( configtype == TidyCustomEmpty )
+ type = tagtype_empty;
+ else if ( configtype == TidyCustomInline )
+ type = tagtype_inline;
+ else if ( configtype == TidyCustomPre )
+ type = tagtype_pre;
+ else
+ type = tagtype_block;
+
+ TY_(DeclareUserTag)( doc, TidyCustomTags, type, node->element );
+ node->tag = tagsLookup(doc, &doc->tags, node->element);
+
+ /* Output a message the first time we encounter an autonomous custom
+ tag. This applies despite the HTML5 mode. */
+ TY_(ReportNotice)(doc, node, node, CUSTOM_TAG_DETECTED);
+
+ return yes;
+ }
+
return no;
}
@@ -1020,6 +1047,39 @@ Bool nodeMatchCM( Node* node, uint contentModel )
}
#endif
+
+Bool TY_(elementIsAutonomousCustomFormat)( ctmbstr element )
+{
+ if ( element )
+ {
+ const char *ptr = strchr(element, '-');
+
+ /* Tag must contain hyphen not in first character. */
+ if ( ptr && (ptr - element > 0) )
+ {
+ return yes;
+ }
+ }
+
+ return no;
+}
+
+Bool TY_(nodeIsAutonomousCustomFormat)( Node* node )
+{
+ if ( node->element )
+ return TY_(elementIsAutonomousCustomFormat)( node->element );
+
+ return no;
+}
+
+Bool TY_(nodeIsAutonomousCustomTag)( TidyDocImpl* doc, Node* node )
+{
+ return TY_(nodeIsAutonomousCustomFormat)( node )
+ && ( cfg( doc, TidyUseCustomTags ) != TidyCustomNo );
+}
+
+
+
/* True if any of the bits requested are set.
*/
Bool TY_(nodeHasCM)( Node* node, uint contentModel )
diff --git a/src/tags.h b/src/tags.h
index de75809..ba746ed 100644
--- a/src/tags.h
+++ b/src/tags.h
@@ -133,6 +133,20 @@ Bool TY_(nodeHasText)( TidyDocImpl* doc, Node* node );
Bool nodeMatchCM( Node* node, uint contentModel );
#endif
+
+/* True if the element looks like it's an autonomous custom element tag. */
+Bool TY_(elementIsAutonomousCustomFormat)( ctmbstr element );
+
+/* True if the node looks like it's an autonomous custom element tag. */
+Bool TY_(nodeIsAutonomousCustomFormat)( Node* node );
+
+/* True if the node looks like it's an autonomous custom element tag, and
+ TidyCustomTags is not disabled, and we're in HTML5 mode, which are all
+ requirements for valid autonomous custom tags.
+*/
+Bool TY_(nodeIsAutonomousCustomTag)( TidyDocImpl* doc, Node* node );
+
+
/* True if any of the bits requested are set.
*/
Bool TY_(nodeHasCM)( Node* node, uint contentModel );
diff --git a/src/tidylib.c b/src/tidylib.c
index 2187d97..8b8acfd 100755
--- a/src/tidylib.c
+++ b/src/tidylib.c
@@ -1747,6 +1747,8 @@ void TY_(CheckHTMLTagsAttribsVersions)( TidyDocImpl* doc, Node* node )
AttVal *next_attr, *attval;
Bool attrIsProprietary = no;
Bool attrIsMismatched = yes;
+ Bool tagLooksCustom = no;
+ Bool htmlIs5 = (doc->lexer->doctype & VERS_HTML5) > 0;
while (node)
{
@@ -1767,7 +1769,20 @@ void TY_(CheckHTMLTagsAttribsVersions)( TidyDocImpl* doc, Node* node )
if ( !cfgBool(doc, TidyMakeClean) ||
( !nodeIsNOBR(node) && !nodeIsWBR(node) ) )
{
- TY_(ReportError)(doc, NULL, node, PROPRIETARY_ELEMENT );
+ /* It looks custom, despite whether it's a known tag. */
+ tagLooksCustom = TY_(nodeIsAutonomousCustomFormat)( node );
+
+ /* If we're in HTML5 mode and the tag does not look
+ like a valid custom tag, then issue a warning.
+ Appearance is good enough because invalid tags have
+ been dropped. Also, if we're not in HTML5 mode, then
+ then everything that reaches here gets the warning.
+ Everything else can be ignored. */
+
+ if ( (htmlIs5 && !tagLooksCustom) || !htmlIs5 )
+ {
+ TY_(ReportError)(doc, NULL, node, PROPRIETARY_ELEMENT );
+ }
if ( nodeIsLAYER(node) )
doc->badLayout |= USING_LAYER;