Changed the XML classes to use the string representation of the key rather than

the translated string of they key, which fix manpage and quickref generation in
non-default locales.

As a result the translated strings are no longer used and have been deleted.
This commit is contained in:
Jim Derry 2017-10-05 09:26:11 -04:00
parent 9565a15f48
commit bd3503eea5
13 changed files with 27 additions and 251 deletions

View file

@ -487,15 +487,15 @@ static Bool hasPickList( TidyOption topt )
return tidyOptGetNextPick( topt, &pos ) != NULL; return tidyOptGetNextPick( topt, &pos ) != NULL;
} }
/** Returns the configuration category name for the specified configuration /** Returns the configuration category id for the specified configuration
** category id. This will be used as an XML class attribute value. ** category id. This will be used as an XML class attribute value.
** @param id The TidyConfigCategory for which to lookup the category name. ** @param id The TidyConfigCategory for which to lookup the category name.
** @result Returns the configuration category, such as "diagnostics". ** @result Returns the configuration category, such as "diagnostics".
*/ */
static ctmbstr ConfigCategoryName( TidyConfigCategory id ) static ctmbstr ConfigCategoryId( TidyConfigCategory id )
{ {
if (id >= TidyDiagnostics && id <= TidyInternalCategory) if (id >= TidyDiagnostics && id <= TidyInternalCategory)
return tidyLocalizedString(id); return tidyErrorCodeAsKey( id );
fprintf(stderr, tidyLocalizedString(TC_STRING_FATAL_ERROR), (int)id); fprintf(stderr, tidyLocalizedString(TC_STRING_FATAL_ERROR), (int)id);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
@ -538,7 +538,7 @@ static void GetOption(TidyDoc tdoc, /**< The tidy document. */
TidyOptionType optTyp = tidyOptGetType( topt ); TidyOptionType optTyp = tidyOptGetType( topt );
d->name = tidyOptGetName( topt ); d->name = tidyOptGetName( topt );
d->cat = ConfigCategoryName( tidyOptGetCategory( topt ) ); d->cat = ConfigCategoryId( tidyOptGetCategory( topt ) );
d->catid = tidyOptGetCategory( topt ); d->catid = tidyOptGetCategory( topt );
d->vals = NULL; d->vals = NULL;
d->def = NULL; d->def = NULL;

View file

@ -98,7 +98,7 @@ extern "C" {
FN(TidyMarkupTeach) /**< Teach tidy new things */ \ FN(TidyMarkupTeach) /**< Teach tidy new things */ \
FN(TidyMarkupXForm) /**< Transform HTML one way or another */ \ FN(TidyMarkupXForm) /**< Transform HTML one way or another */ \
FN(TidyPrettyPrint) /**< Pretty printing options */ \ FN(TidyPrettyPrint) /**< Pretty printing options */ \
FN(TidyInternalCategory) /**< Option is internal only. */ FN(TidyInternalCategory) /**< Option is internal only. */ \
/** These message codes comprise every possible message that can be output by /** These message codes comprise every possible message that can be output by

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:44:37\n" "PO-Revision-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -1755,34 +1755,6 @@ msgid ""
"head of the document. " "head of the document. "
msgstr "" msgstr ""
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr ""
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr ""
msgctxt "TidyEncoding"
msgid "encoding"
msgstr ""
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr ""
msgctxt "TidyMarkup"
msgid "markup"
msgstr ""
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr ""
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr ""
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "" msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:44:37\n" "PO-Revision-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -1703,34 +1703,6 @@ msgid ""
"head of the document. " "head of the document. "
msgstr "" msgstr ""
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr ""
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr ""
msgctxt "TidyEncoding"
msgid "encoding"
msgstr ""
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr ""
msgctxt "TidyMarkup"
msgid "markup"
msgstr ""
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr ""
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr ""
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "" msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:44:37\n" "PO-Revision-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -1698,34 +1698,6 @@ msgid ""
"head of the document. " "head of the document. "
msgstr "" msgstr ""
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr ""
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr ""
msgctxt "TidyEncoding"
msgid "encoding"
msgstr ""
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr ""
msgctxt "TidyMarkup"
msgid "markup"
msgstr ""
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr ""
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr ""
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "" msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:44:37\n" "PO-Revision-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -2017,34 +2017,6 @@ msgid ""
"head of the document. " "head of the document. "
msgstr "" msgstr ""
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr "catégorie inconnue!"
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr ""
msgctxt "TidyEncoding"
msgid "encoding"
msgstr "encodage"
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr "interne (privée)"
msgctxt "TidyMarkup"
msgid "markup"
msgstr "structure de balises"
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr "divers"
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr "affichage"
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "Info:" msgstr "Info:"

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:44:37\n" "PO-Revision-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -2097,34 +2097,6 @@ msgstr ""
"Esta opção especifica se o Tidy deve mover todas as tags de estilo para o " "Esta opção especifica se o Tidy deve mover todas as tags de estilo para o "
"cabeçalho do documento. " "cabeçalho do documento. "
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr "categoria desconhecida!"
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr "diagnósticos"
msgctxt "TidyEncoding"
msgid "encoding"
msgstr "codificação"
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr "interna (privada)"
msgctxt "TidyMarkup"
msgid "markup"
msgstr "marcação"
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr "miscelânea"
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr "impressão"
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "" msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=1; plural=0;\n" "Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"PO-Revision-Date: 2017-10-03 12:44:37\n" "PO-Revision-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -1698,34 +1698,6 @@ msgid ""
"head of the document. " "head of the document. "
msgstr "" msgstr ""
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr ""
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr ""
msgctxt "TidyEncoding"
msgid "encoding"
msgstr ""
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr ""
msgctxt "TidyMarkup"
msgid "markup"
msgstr ""
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr ""
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr ""
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "" msgstr ""

View file

@ -5,7 +5,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n" "Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: HTML Tidy poconvert.rb\n" "X-Generator: HTML Tidy poconvert.rb\n"
"Project-Id-Version: \n" "Project-Id-Version: \n"
"POT-Creation-Date: 2017-10-03 12:44:37\n" "POT-Creation-Date: 2017-10-05 09:29:27\n"
"Last-Translator: jderry\n" "Last-Translator: jderry\n"
"Language-Team: \n" "Language-Team: \n"
@ -1698,34 +1698,6 @@ msgid ""
"head of the document. " "head of the document. "
msgstr "" msgstr ""
msgctxt "TidyUnknownCategory"
msgid "unknown category!"
msgstr ""
msgctxt "TidyDiagnostics"
msgid "diagnostics"
msgstr ""
msgctxt "TidyEncoding"
msgid "encoding"
msgstr ""
msgctxt "TidyInternalCategory"
msgid "internal (private)"
msgstr ""
msgctxt "TidyMarkup"
msgid "markup"
msgstr ""
msgctxt "TidyMiscellaneous"
msgid "misc"
msgstr ""
msgctxt "TidyPrettyPrint"
msgid "print"
msgstr ""
msgctxt "TidyInfo" msgctxt "TidyInfo"
msgid "Info: " msgid "Info: "
msgstr "" msgstr ""

View file

@ -253,47 +253,47 @@ There were errors.
<xsl:template name="show-config-options"> <xsl:template name="show-config-options">
.SS Document Display options<xsl:text/> .SS Document Display options<xsl:text/>
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">display</xsl:with-param> <xsl:with-param name="category">TidyDisplay</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Document In and Out options .SS Document In and Out options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">document</xsl:with-param> <xsl:with-param name="category">TidyDocumentIO</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS File Input-Output options .SS File Input-Output options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">file</xsl:with-param> <xsl:with-param name="category">TidyFileIO</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Diagnostics options .SS Diagnostics options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">diagnostics</xsl:with-param> <xsl:with-param name="category">TidyDiagnostics</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Encoding options .SS Encoding options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">encoding</xsl:with-param> <xsl:with-param name="category">TidyEncoding</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Cleanup options .SS Cleanup options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">cleanup</xsl:with-param> <xsl:with-param name="category">TidyMarkupCleanup</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Entities options .SS Entities options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">entities</xsl:with-param> <xsl:with-param name="category">TidyMarkupEntities</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Repair options .SS Repair options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">repair</xsl:with-param> <xsl:with-param name="category">TidyMarkupRepair</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Transformation options .SS Transformation options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">transform</xsl:with-param> <xsl:with-param name="category">TidyMarkupXForm</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Teaching Tidy options .SS Teaching Tidy options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">teach</xsl:with-param> <xsl:with-param name="category">TidyMarkupTeach</xsl:with-param>
</xsl:call-template> </xsl:call-template>
.SS Pretty Print options .SS Pretty Print options
<xsl:call-template name="config-detail"> <xsl:call-template name="config-detail">
<xsl:with-param name="category">print</xsl:with-param> <xsl:with-param name="category">TidyPrettyPrint</xsl:with-param>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>

View file

@ -1572,25 +1572,6 @@ static languageDefinition language_en = { whichPluralForm_en, {
}, },
/********************************************
** TidyConfigCategory enumeration
** @remark enum source TidyConfigCategory
********************************************/
{ TidyUnknownCategory, 0, "unknown category!" },
{ TidyDiagnostics, 0, "diagnostics" },
{ TidyDisplay, 0, "display" },
{ TidyDocumentIO, 0, "document" },
{ TidyEncoding, 0, "encoding" },
{ TidyFileIO, 0, "file" },
{ TidyInternalCategory, 0, "internal (private)" },
{ TidyMarkupCleanup, 0, "cleanup" },
{ TidyMarkupEntities, 0, "entities" },
{ TidyMarkupRepair, 0, "repair" },
{ TidyMarkupTeach, 0, "teach" },
{ TidyMarkupXForm, 0, "transform" },
{ TidyPrettyPrint, 0, "print" },
/******************************************** /********************************************
** Message Severity Level ** Message Severity Level
** @remark enum source TidyConfigCategory ** @remark enum source TidyConfigCategory

View file

@ -1,4 +1,4 @@
#ifndef language_fr_h #ifndef language_fr_h
#define language_fr_h #define language_fr_h
/* /*
* language_fr.h * language_fr.h
@ -28,7 +28,7 @@
* *
* Orginating PO file metadata: * Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry * PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:44:37 * PO_REVISION_DATE=2017-10-05 09:29:27
*/ */
#ifdef _MSC_VER #ifdef _MSC_VER
@ -554,10 +554,6 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
"Cette option précise si Tidy doit utiliser l'analyseur XML plutôt que l'analyseur de correction " "Cette option précise si Tidy doit utiliser l'analyseur XML plutôt que l'analyseur de correction "
"d'erreur HTML." "d'erreur HTML."
}, },
{ TidyUnknownCategory, 0, "catégorie inconnue!" },
{ TidyEncoding, 0, "encodage" },
{ TidyInternalCategory, 0, "interne (privée)" },
{ TidyPrettyPrint, 0, "affichage" },
{ TidyInfo, 0, "Info:" }, { TidyInfo, 0, "Info:" },
{ TidyWarning, 0, "Avertissement:" }, { TidyWarning, 0, "Avertissement:" },
{ TidyConfig, 0, "Config:" }, { TidyConfig, 0, "Config:" },

View file

@ -1,4 +1,4 @@
#ifndef language_pt_br_h #ifndef language_pt_br_h
#define language_pt_br_h #define language_pt_br_h
/* /*
* language_pt_br.h * language_pt_br.h
@ -28,7 +28,7 @@
* *
* Orginating PO file metadata: * Orginating PO file metadata:
* PO_LAST_TRANSLATOR=jderry * PO_LAST_TRANSLATOR=jderry
* PO_REVISION_DATE=2017-10-03 12:44:37 * PO_REVISION_DATE=2017-10-05 09:29:27
*/ */
#ifdef _MSC_VER #ifdef _MSC_VER
@ -646,11 +646,6 @@ static languageDefinition language_pt_br = { whichPluralForm_pt_br, {
"Esta opção especifica se o Tidy deve mover todas as tags de estilo para o " "Esta opção especifica se o Tidy deve mover todas as tags de estilo para o "
"cabeçalho do documento. " "cabeçalho do documento. "
}, },
{ TidyUnknownCategory, 0, "categoria desconhecida!" },
{ TidyDiagnostics, 0, "diagnósticos" },
{ TidyEncoding, 0, "codificação" },
{ TidyInternalCategory, 0, "interna (privada)" },
{ TidyPrettyPrint, 0, "impressão" },
{ TidyWarning, 0, "Acesso: " }, { TidyWarning, 0, "Acesso: " },
{ TidyAccess, 0, "Acesso: " }, { TidyAccess, 0, "Acesso: " },
{ TidyError, 0, "Erro: " }, { TidyError, 0, "Erro: " },