Picklist enums should all start at zero for external LibTidy user compatibility.
Restore the new custom-tags enum to this state, and add separate string keys. Updated PO's to reflect; no change to headers.
This commit is contained in:
parent
0be7ed8e33
commit
929575afb4
|
@ -199,11 +199,12 @@ typedef enum
|
|||
|
||||
/** 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.
|
||||
* associated localized strings to describe them in tidyMessagesMisc in
|
||||
* the form MEMBER_STRING, e.g., TIDYCUSTOMBLOCKLEVEL_STRING
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
TidyCustomNo = 300,
|
||||
TidyCustomNo,
|
||||
TidyCustomBlocklevel,
|
||||
TidyCustomEmpty,
|
||||
TidyCustomInline,
|
||||
|
@ -983,7 +984,12 @@ typedef enum
|
|||
FN(STRING_HTML_PROPRIETARY) /* `HTML Proprietary`/ */ \
|
||||
FN(STRING_MISSING_MALFORMED) /* For `missing or malformed argument for option: %s`. */ \
|
||||
FN(STRING_NO_SYSID) /* `No system identifier in emitted doctype`. */ \
|
||||
FN(STRING_UNKNOWN_OPTION) /* For retrieving a string `unknown option: %s`. */
|
||||
FN(STRING_UNKNOWN_OPTION) /* For retrieving a string `unknown option: %s`. */ \
|
||||
FN(TIDYCUSTOMNO_STRING) \
|
||||
FN(TIDYCUSTOMBLOCKLEVEL_STRING) \
|
||||
FN(TIDYCUSTOMEMPTY_STRING) \
|
||||
FN(TIDYCUSTOMINLINE_STRING) \
|
||||
FN(TIDYCUSTOMPRE_STRING) \
|
||||
|
||||
/* accessibility module contributions */
|
||||
#define FOREACH_MSG_ACCESS(FN) \
|
||||
|
|
|
@ -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-19 13:23:38\n"
|
||||
"PO-Revision-Date: 2017-03-20 12:20:02\n"
|
||||
"Last-Translator: jderry\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
|
@ -677,19 +677,19 @@ msgctxt "CUSTOM_TAG_DETECTED"
|
|||
msgid "detected autonomous custom tag %s; will treat as %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomBlocklevel"
|
||||
msgctxt "TIDYCUSTOMBLOCKLEVEL_STRING"
|
||||
msgid "block level"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomEmpty"
|
||||
msgctxt "TIDYCUSTOMEMPTY_STRING"
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomInline"
|
||||
msgctxt "TIDYCUSTOMINLINE_STRING"
|
||||
msgid "inline"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomPre"
|
||||
msgctxt "TIDYCUSTOMPRE_STRING"
|
||||
msgid "pre"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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-19 13:23:38\n"
|
||||
"PO-Revision-Date: 2017-03-20 12:20:02\n"
|
||||
"Last-Translator: jderry\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
|
@ -673,19 +673,19 @@ msgctxt "CUSTOM_TAG_DETECTED"
|
|||
msgid "detected autonomous custom tag %s; will treat as %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomBlocklevel"
|
||||
msgctxt "TIDYCUSTOMBLOCKLEVEL_STRING"
|
||||
msgid "block level"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomEmpty"
|
||||
msgctxt "TIDYCUSTOMEMPTY_STRING"
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomInline"
|
||||
msgctxt "TIDYCUSTOMINLINE_STRING"
|
||||
msgid "inline"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomPre"
|
||||
msgctxt "TIDYCUSTOMPRE_STRING"
|
||||
msgid "pre"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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-19 13:23:38\n"
|
||||
"PO-Revision-Date: 2017-03-20 12:20:02\n"
|
||||
"Last-Translator: jderry\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
|
@ -673,19 +673,19 @@ msgctxt "CUSTOM_TAG_DETECTED"
|
|||
msgid "detected autonomous custom tag %s; will treat as %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomBlocklevel"
|
||||
msgctxt "TIDYCUSTOMBLOCKLEVEL_STRING"
|
||||
msgid "block level"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomEmpty"
|
||||
msgctxt "TIDYCUSTOMEMPTY_STRING"
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomInline"
|
||||
msgctxt "TIDYCUSTOMINLINE_STRING"
|
||||
msgid "inline"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomPre"
|
||||
msgctxt "TIDYCUSTOMPRE_STRING"
|
||||
msgid "pre"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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-19 13:23:38\n"
|
||||
"PO-Revision-Date: 2017-03-20 12:20:02\n"
|
||||
"Last-Translator: jderry\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
|
@ -810,19 +810,19 @@ msgctxt "CUSTOM_TAG_DETECTED"
|
|||
msgid "detected autonomous custom tag %s; will treat as %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomBlocklevel"
|
||||
msgctxt "TIDYCUSTOMBLOCKLEVEL_STRING"
|
||||
msgid "block level"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomEmpty"
|
||||
msgctxt "TIDYCUSTOMEMPTY_STRING"
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomInline"
|
||||
msgctxt "TIDYCUSTOMINLINE_STRING"
|
||||
msgid "inline"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomPre"
|
||||
msgctxt "TIDYCUSTOMPRE_STRING"
|
||||
msgid "pre"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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-19 13:23:38\n"
|
||||
"PO-Revision-Date: 2017-03-20 12:20:02\n"
|
||||
"Last-Translator: jderry\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
|
@ -667,19 +667,19 @@ msgctxt "CUSTOM_TAG_DETECTED"
|
|||
msgid "detected autonomous custom tag %s; will treat as %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomBlocklevel"
|
||||
msgctxt "TIDYCUSTOMBLOCKLEVEL_STRING"
|
||||
msgid "block level"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomEmpty"
|
||||
msgctxt "TIDYCUSTOMEMPTY_STRING"
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomInline"
|
||||
msgctxt "TIDYCUSTOMINLINE_STRING"
|
||||
msgid "inline"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomPre"
|
||||
msgctxt "TIDYCUSTOMPRE_STRING"
|
||||
msgid "pre"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -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-19 13:23:38\n"
|
||||
"POT-Creation-Date: 2017-03-20 12:20:02\n"
|
||||
"Last-Translator: jderry\n"
|
||||
"Language-Team: \n"
|
||||
|
||||
|
@ -669,19 +669,19 @@ msgctxt "CUSTOM_TAG_DETECTED"
|
|||
msgid "detected autonomous custom tag %s; will treat as %s"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomBlocklevel"
|
||||
msgctxt "TIDYCUSTOMBLOCKLEVEL_STRING"
|
||||
msgid "block level"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomEmpty"
|
||||
msgctxt "TIDYCUSTOMEMPTY_STRING"
|
||||
msgid "empty"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomInline"
|
||||
msgctxt "TIDYCUSTOMINLINE_STRING"
|
||||
msgid "inline"
|
||||
msgstr ""
|
||||
|
||||
msgctxt "TidyCustomPre"
|
||||
msgctxt "TIDYCUSTOMPRE_STRING"
|
||||
msgid "pre"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -386,10 +386,10 @@ static languageDefinition language_en = { whichPluralForm_en, {
|
|||
{ 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" },
|
||||
{ TIDYCUSTOMBLOCKLEVEL_STRING, 0, "block level" },
|
||||
{ TIDYCUSTOMEMPTY_STRING, 0, "empty" },
|
||||
{ TIDYCUSTOMINLINE_STRING, 0, "inline" },
|
||||
{ TIDYCUSTOMPRE_STRING, 0, "pre" },
|
||||
|
||||
/* ReportError */
|
||||
{ COERCE_TO_ENDTAG, 0, "<%s> is probably intended as </%s>" }, /* Error */
|
||||
|
|
|
@ -230,7 +230,22 @@ void TY_(ReportNotice)(TidyDocImpl* doc, Node *element, Node *node, uint code)
|
|||
|
||||
case CUSTOM_TAG_DETECTED:
|
||||
TagToString(element, elemdesc, sizeof(elemdesc));
|
||||
tagtype = tidyLocalizedString( cfg( doc, TidyUseCustomTags ) );
|
||||
|
||||
switch ( cfg( doc, TidyUseCustomTags ) )
|
||||
{
|
||||
case TidyCustomBlocklevel:
|
||||
tagtype = tidyLocalizedString( TIDYCUSTOMBLOCKLEVEL_STRING );
|
||||
break;
|
||||
case TidyCustomEmpty:
|
||||
tagtype = tidyLocalizedString( TIDYCUSTOMEMPTY_STRING );
|
||||
break;
|
||||
case TidyCustomInline:
|
||||
tagtype = tidyLocalizedString( TIDYCUSTOMINLINE_STRING );
|
||||
break;
|
||||
case TidyCustomPre:
|
||||
tagtype = tidyLocalizedString( TIDYCUSTOMPRE_STRING );
|
||||
break;
|
||||
}
|
||||
message = TY_(tidyMessageCreateWithNode)(doc, element, code, TidyInfo, elemdesc, tagtype );
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue