From edc548095c7d1464be743339fe3f7d542ca92e18 Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Sat, 18 Feb 2017 17:16:35 -0500 Subject: [PATCH] Removed language as tidy config option; it is only CLI option. --- include/tidyenum.h | 2 -- src/config.c | 1 - src/language_en.h | 18 ++---------------- src/language_es.h | 4 ++-- src/language_fr.h | 4 ++-- src/pprint.c | 22 ---------------------- 6 files changed, 6 insertions(+), 45 deletions(-) diff --git a/include/tidyenum.h b/include/tidyenum.h index c9cbb3e..882bd5b 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -143,10 +143,8 @@ typedef enum TidyEscapeCdata, /**< Replace sections with escaped text */ #if SUPPORT_ASIAN_ENCODINGS - TidyLanguage, /**< Language property: not used for anything yet */ TidyNCR, /**< Allow numeric character references */ #else - TidyLanguageNotUsed, TidyNCRNotUsed, #endif #if SUPPORT_UTF16_ENCODINGS diff --git a/src/config.c b/src/config.c index ddb677c..c138698 100644 --- a/src/config.c +++ b/src/config.c @@ -296,7 +296,6 @@ static const TidyOptionImpl option_defs[] = { TidyJoinStyles, MU, "join-styles", BL, yes, ParseBool, boolPicks }, { TidyEscapeCdata, MU, "escape-cdata", BL, no, ParseBool, boolPicks }, #if SUPPORT_ASIAN_ENCODINGS - { TidyLanguage, CE, "language", ST, 0, ParseName, NULL }, { TidyNCR, MU, "ncr", BL, yes, ParseBool, boolPicks }, #endif #if SUPPORT_UTF16_ENCODINGS diff --git a/src/language_en.h b/src/language_en.h index 16d9b28..67fd8c4 100644 --- a/src/language_en.h +++ b/src/language_en.h @@ -1752,20 +1752,6 @@ static languageDefinition language_en = { whichPluralForm_en, { "This option specifies the character encoding Tidy uses for the input. See " "char-encoding for more info. " }, -#if SUPPORT_ASIAN_ENCODINGS - {/* 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. */ - TidyLanguage, 0, - "Currently not used, but this option specifies the language Tidy would use " - "if it were properly localized. For example: en. " - }, -#endif #if SUPPORT_UTF16_ENCODINGS {/* Important notes for translators: - Use only , , , , and @@ -2297,12 +2283,12 @@ static languageDefinition language_en = { whichPluralForm_en, { - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. */ TC_TXT_HELP_LANG_1, 0, "\n" - "The --language (or --lang) option indicates which language Tidy \n" + "The -language (or -lang) option indicates which language Tidy \n" "should use to communicate its output. Please note that this is not \n" "a document translation service, and only affects the messages that \n" "Tidy communicates to you. \n" "\n" - "When used from the command line the --language argument must \n" + "When used from the command line the -language argument must \n" "be used before any arguments that result in output, otherwise Tidy \n" "will produce output before it knows which language to use. \n" "\n" diff --git a/src/language_es.h b/src/language_es.h index d6bc8ea..83fb422 100644 --- a/src/language_es.h +++ b/src/language_es.h @@ -83,12 +83,12 @@ static languageDefinition language_es = { whichPluralForm_es, { #if SUPPORT_CONSOLE_APP { TC_TXT_HELP_LANG_1, 0, "\n" - "La opción --language (o --lang) indica el lenguaje Tidy debe \n" + "La opción -language (o -lang) indica el lenguaje Tidy debe \n" "utilizar para comunicar su salida. Tenga en cuenta que esto no es \n" "un servicio de traducción de documentos, y sólo afecta a los mensajes \n" "que Tidy comunica a usted. \n" "\n" - "Cuando se utiliza la línea de comandos el argumento --language debe \n" + "Cuando se utiliza la línea de comandos el argumento -language debe \n" "utilizarse antes de cualquier argumento que dan lugar a la producción, \n" "de lo contrario Tidy producirá la salida antes de que se conozca el \n" "idioma a utilizar. \n" diff --git a/src/language_fr.h b/src/language_fr.h index 8d3931f..3b9d96a 100644 --- a/src/language_fr.h +++ b/src/language_fr.h @@ -521,13 +521,13 @@ static languageDefinition language_fr = { whichPluralForm_fr, { { TC_TXT_HELP_CONFIG_ALLW, 0, "Les valeurs autorisées" }, { TC_TXT_HELP_LANG_1, 0, "\n" - "L'option --language (ou --lang) indique la langue Tidy\n" + "L'option -language (ou -lang) indique la langue Tidy\n" "doit utiliser pour communiquer sa sortie. S'il vous plaît noter que ce ne sont pas " "un service de traduction de documents, et affecte uniquement les messages qui Tidy " "communique à vous.\n" "\n" "Lorsqu'il est utilisé à partir de la ligne de commande de l'argument doit \n" - "--language être utilisé avant des arguments qui résultent de la production, sinon " + "-language être utilisé avant des arguments qui résultent de la production, sinon " "Tidy\n" "va produire une sortie avant qu'il connaît la langue à utiliser.\n" "\n" diff --git a/src/pprint.c b/src/pprint.c index 110cfbe..11c5c64 100644 --- a/src/pprint.c +++ b/src/pprint.c @@ -72,28 +72,6 @@ void TY_(PPrintSpaces)(void) #if SUPPORT_ASIAN_ENCODINGS /* #431953 - start RJ Wraplen adjusted for smooth international ride */ -#if 0 -uint CWrapLen( TidyDocImpl* doc, uint ind ) -{ - ctmbstr lang = cfgStr( doc, TidyLanguage ); - uint wraplen = cfg( doc, TidyWrapLen ); - - if ( !TY_(tmbstrcasecmp)(lang, "zh") ) - /* Chinese characters take two positions on a fixed-width screen */ - /* It would be more accurate to keep a parallel linelen and wraphere - incremented by 2 for Chinese characters and 1 otherwise, but this - is way simpler. - */ - return (ind + (( wraplen - ind ) / 2)) ; - - if ( !TY_(tmbstrcasecmp)(lang, "ja") ) - /* average Japanese text is 30% kanji */ - return (ind + ((( wraplen - ind ) * 7) / 10)) ; - - return wraplen; -} -#endif - typedef enum { UC00, /* None */