From 165acc4f3e9dd5271af68b8819df59f94639630f Mon Sep 17 00:00:00 2001 From: Jim Derry Date: Mon, 13 Feb 2017 14:29:47 -0500 Subject: [PATCH] Several foundational changes preparing for release of 5.4 and future 5.5: - Consolidated all output string definitions enums into `tidyenum.h`, which is where they belong, and where they have proper visibility. - Re-arranged `messages.c/h` with several comments useful to developers. - Properly added the key lookup functions and the language localization functions into tidy.h/tidylib.c with proper name-spacing. - Previous point restored a *lot* of sanity to the #include pollution that's been introduced in light of these. - Note that opaque types have been (properly) introduced. Look at the updated headers for `language.h`. In particular only an opaque structure is passed outside of LibTidy, and so use TidyLangWindowsName and TidyLangPosixName to poll these objects. - Console application updated as a result of this. - Removed dead code: - void TY_(UnknownOption)( TidyDocImpl* doc, char c ); - void TY_(UnknownFile)( TidyDocImpl* doc, ctmbstr program, ctmbstr file ); - Redundant strings were removed with the removal of this dead code. - Several enums were given fixed starting values. YOUR PROGRAMS SHOULD NEVER depend on enum values. `TidyReportLevel` is an example of such. - Some enums were removed as a result of this. `TidyReportLevel` now has matching strings, so the redundant `TidyReportLevelStrings` was removed. - All of the PO's and language header files were regenerated as a result of the string cleanup and header cleanup. - Made the interface to the library version and release date consistent. - CMakeLists.txt now supports SUPPORT_CONSOLE_APP. The intention is to be able to remove console-only code from LibTidy (for LibTidy users). - Updated README/MESSAGES.md, which is *vastly* more simple now. --- CMakeLists.txt | 38 +- README/MESSAGES.md | 24 +- console/tidy.c | 43 +- include/tidy.h | 360 ++-- include/tidyenum.h | 755 ++++++-- include/tidyplatform.h | 5 + localize/language_ll_cc.h.erb | 6 +- localize/poconvert.rb | 5 +- localize/translations/language_en_gb.po | 49 +- localize/translations/language_es.po | 49 +- localize/translations/language_es_mx.po | 49 +- localize/translations/language_fr.po | 2232 ++++++++++++++++------- localize/translations/language_zh_cn.po | 49 +- localize/translations/tidy.pot | 47 +- src/access.c | 22 - src/access.h | 251 +-- src/config.h | 2 + src/language.c | 419 +---- src/language.h | 240 +-- src/language_en.h | 35 +- src/language_en_gb.h | 8 +- src/language_es.h | 11 +- src/language_es_mx.h | 8 +- src/language_fr.h | 279 ++- src/language_zh_cn.h | 11 +- src/message.c | 1069 ++++++----- src/message.h | 322 +--- src/tidylib.c | 120 +- 28 files changed, 3700 insertions(+), 2808 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 210a4f7..3c248b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,6 +60,16 @@ else () add_definitions ( -DSUPPORT_LOCALIZATIONS=0 ) endif () +# Allow building without console support, which mostly prevents console strings +# from existing in the library. Note that this will prevent the console +# application from being built, since it can't be linked. +option( SUPPORT_CONSOLE_APP "Set OFF to libraries only without console application support." ON ) +if (SUPPORT_CONSOLE_APP) +add_definitions ( -DSUPPORT_CONSOLE_APP=1 ) +else () +add_definitions ( -DSUPPORT_CONSOLE_APP=0 ) +endif () + if(CMAKE_COMPILER_IS_GNUCXX) set( WARNING_FLAGS -Wall ) endif(CMAKE_COMPILER_IS_GNUCXX) @@ -136,7 +146,7 @@ set ( CFILES ${SRCDIR}/buffio.c ${SRCDIR}/fileio.c ${SRCDIR}/streamio.c ${SRCDIR}/tagask.c ${SRCDIR}/tmbstr.c ${SRCDIR}/utf8.c ${SRCDIR}/tidylib.c ${SRCDIR}/mappedio.c ${SRCDIR}/gdoc.c - ${SRCDIR}/language.c ) + ${SRCDIR}/language.c ) set ( HFILES ${INCDIR}/tidyplatform.h ${INCDIR}/tidy.h ${INCDIR}/tidyenum.h ${INCDIR}/tidybuffio.h ) @@ -214,18 +224,20 @@ endif () ########################################################## ### main executable - linked with STATIC/SHARED library -set(name ${LIB_NAME}) -set ( BINDIR console ) -add_executable( ${name} ${BINDIR}/tidy.c ) -target_link_libraries( ${name} ${add_LIBS} ) -if (MSVC) - set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d ) +if (SUPPORT_CONSOLE_APP) + set(name ${LIB_NAME}) + set ( BINDIR console ) + add_executable( ${name} ${BINDIR}/tidy.c ) + target_link_libraries( ${name} ${add_LIBS} ) + if (MSVC) + set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d ) + endif () + if (NOT TIDY_CONSOLE_SHARED) + set_target_properties( ${name} PROPERTIES + COMPILE_FLAGS "-DTIDY_STATIC" ) + endif () + install (TARGETS ${name} DESTINATION bin) endif () -if (NOT TIDY_CONSOLE_SHARED) - set_target_properties( ${name} PROPERTIES - COMPILE_FLAGS "-DTIDY_STATIC" ) -endif () -install (TARGETS ${name} DESTINATION bin) if (BUILD_TAB2SPACE) set(name tab2space) @@ -250,7 +262,7 @@ endif () #========================================================== # Create man pages #========================================================== -if (UNIX) +if (UNIX AND SUPPORT_CONSOLE_APP) find_program( XSLTPROC_FOUND xsltproc ) if (XSLTPROC_FOUND) ## NOTE: man name must match exe ie currently `${LIB_NAME}.1` not `tidy.1` diff --git a/README/MESSAGES.md b/README/MESSAGES.md index 5b775f1..b890aa8 100644 --- a/README/MESSAGES.md +++ b/README/MESSAGES.md @@ -2,40 +2,28 @@ Tidy has quite complex warning/error messaging system. This is all about adding a **new** warning or error message to **libTidy**. -First assign the message a key value. This is done in `message.h`, in one of the two enumerations that are listed there. +First assign the message a key value. This is done in `tidyenum.h`, in one of the two enumerations that are listed there. - 1. `tidyErrorCodes` - starts with the value `CODES_TIDY_ERROR_FIRST = 200`, and it must be first. - - 2. `tidyMessagesMisc` - starts with the value ACCESS_URL = 2048 - so, at present the above `tidyErrorCodes` must not exceed this. - - 3. For the sake of completeness, there's also a third enum present in `access.h` called `accessErrorCodes`; you should only ever be concerned about this if you are working on new strings for Tidy's accessibility module. - -If your message is something that will appear in the error list, then its key should be defined in the `tidyErrorCodes` enum, unless you are adding errors to the accessibility module (see point 3, above). If you are adding strings that are _not_ intended for the error list, then they belong in `tidyMessagesMisc`. These are strings that are typically output with Tidy's CLI. + 1. `tidyMessageCodes` - starts with the value `tidyMessageCodes_first = 500`, and it must be first. These are messages that appear in Tidy's report list, the list that's emitted telling you what Tidy did to your code. **However** don't modify this enum directly. You'll modify a preprocessor macro instead. + 2. `tidyMessagesMisc` - starts with the value `tidyMessagesMisc_first = tidyMessageCodes_last`. These are messages that are emitted that tell you general information, such as further advice. + All enum values are only ever used by name within **libTidy** (and incidentally, should only ever be used by name in your client applications; never trust the value!), so feel free to enter new strings wherever they make the most sense. There are already existing categories (marked by comments), or feel free to create a new category if that's best. -Because some clients retrieve error information via `libTidy`’s callback mechanism, it's also important to update the `language.c:tidyErrorFilterKeysStruct[]`, as well, if your new messages are intended for the error list. +As mentioned above, `tidyMessageCodes` messaged must be defined in one of the existing macros named like `FOREACH_...(FN)`, such as `FOREACH_MSG_ENTITIES(FN)`. These macros ensure that another data structure used for localization and key lookup is updated automatically any time strings are added or removed, thus limiting the possibility of developer error. ## Step 1 -So in this case I want to add 3 warning messages: `BAD_SURROGATE_PAIR`, `BAD_SURROGATE_TAIL`, and `BAD_SURROGATE_LEAD`. Because these are error messages, they belong in the `tidyErrorCodes` enum, and they fit into nicely into the "character encoding errors" category just before the **last** `CODES_TIDY_ERROR_LAST`. +So in this case I want to add 3 warning messages: `BAD_SURROGATE_PAIR`, `BAD_SURROGATE_TAIL`, and `BAD_SURROGATE_LEAD`. Because these are error messages, they belong in the `tidyErrorCodes` enum, and they fit into nicely into the macro beginning `FOREACH_MSG_ENCODING(FN)`. ## Step 2 -Because the new messages are error code, update the `tidyErrorFilterKeysStruct` in `language.c` with the same key values, and with string representations thereof. You should put them in the same logical order as you inserted them into `tidyErrorCodes` enum. - -Note that at some point when all of the error enums are merged (probably Tidy 5.5) this kludge won't have to be used and we can have a nice, single enum exported to clients. - -## Step 3 - The next step is adding a `format` string to `language_en.h`. This string may later be translated to various supported language strings, but at present it is important that the other language translated strings, like `language_fr.h`, `language_es.h`, etc, keep the same format order. Where to add this seems a bit of a mess, but in general things are grouped by where they're used in `libTidy`, and often in alphabetical order within those groups. Here I've added them relative to where they were placed in the other enums and structs. Depending on which of the output routines you use (consult `message.c`) you may be able to use parameters such as `%u` and `%s` in your format strings. The available data is currently limited to the available message output routines, but perhaps generalizing this in order to make more data available will be a nice focus of Tidy 5.5. Please don't use `printf` for message output within **libTidy**. -In this case I want to add showing the code point(s) in hex, so I need to add that also. **(jim --??)** - eof; diff --git a/console/tidy.c b/console/tidy.c index 6ae6033..58d8ac3 100644 --- a/console/tidy.c +++ b/console/tidy.c @@ -9,7 +9,6 @@ */ #include "tidy.h" -#include "language.h" #include "locale.h" #if defined(_WIN32) #include /* Force console to UTF8. */ @@ -554,19 +553,9 @@ static Bool isAutoBool( TidyOption topt ) */ static ctmbstr ConfigCategoryName( TidyConfigCategory id ) { - switch( id ) - { - case TidyMarkup: - return tidyLocalizedString( TC_CAT_MARKUP ); - case TidyDiagnostics: - return tidyLocalizedString( TC_CAT_DIAGNOSTICS ); - case TidyPrettyPrint: - return tidyLocalizedString( TC_CAT_PRETTYPRINT ); - case TidyEncoding: - return tidyLocalizedString( TC_CAT_ENCODING ); - case TidyMiscellaneous: - return tidyLocalizedString( TC_CAT_MISC ); - } + if (id >= TidyMarkup && id <= TidyMiscellaneous) + return tidyLocalizedString(id); + fprintf(stderr, tidyLocalizedString(TC_STRING_FATAL_ERROR), (int)id); fprintf(stderr, "\n"); @@ -884,13 +873,17 @@ void tidyPrintWindowsLanguageNames( ctmbstr format ) { const tidyLocaleMapItem *item; TidyIterator i = getWindowsLanguageList(); + ctmbstr winName; + ctmbstr posixName; while (i) { item = getNextWindowsLanguage(&i); + winName = TidyLangWindowsName( item ); + posixName = TidyLangPosixName( item ); if ( format ) - printf( format, item->winName, item->POSIXName ); + printf( format, winName, posixName ); else - printf( "%-20s -> %s\n", item->winName, item->POSIXName ); + printf( "%-20s -> %s\n", winName, posixName ); } } @@ -1424,7 +1417,7 @@ static void xml_options_strings( TidyDoc tdoc ) **/ static void xml_error_strings( TidyDoc tdoc ) { - const tidyErrorFilterKeyItem *item; + uint errorCode; ctmbstr localizedString; TidyIterator j = getErrorCodeList(); @@ -1432,10 +1425,10 @@ static void xml_error_strings( TidyDoc tdoc ) printf( "\n", tidyLibraryVersion()); while (j) { - item = getNextErrorCode(&j); - localizedString = tidyLocalizedString(item->value); + errorCode = getNextErrorCode(&j); + localizedString = tidyLocalizedString(errorCode); printf( " \n" ); - printf( " %s\n",item->key); + printf( " %s\n", tidyErrorCodeAsKey(errorCode)); if ( localizedString ) printf( " \n", tidyGetLanguage(), localizedString ); else @@ -1457,7 +1450,9 @@ static void xml_error_strings( TidyDoc tdoc ) ** better to use our POT/PO workflow with your favorite tools, or simply ** diff the language header files directly. ** **Important:** The attribute `id` is not a specification, promise, or - ** part of an API. You must not depend on this value. + ** part of an API. You must not depend on this value. For strings meant + ** for error output, the `label` attribute will contain the stringified + ** version of the internal key for the string. */ static void xml_strings( void ) { @@ -1465,6 +1460,7 @@ static void xml_strings( void ) TidyIterator j; ctmbstr current_language = tidyGetLanguage(); + ctmbstr current_label; Bool skip_current = strcmp( current_language, "en" ) == 0; Bool matches_base; @@ -1474,7 +1470,10 @@ static void xml_strings( void ) j = getStringKeyList(); while (j) { i = getNextStringKey(&j); - printf( "\n", i ); + current_label = tidyErrorCodeAsKey(i); + if (!strcmp(current_label, "UNDEFINED")) + current_label = ""; + printf( "\n", i, current_label ); printf( " ", "en" ); printf("%s", tidyDefaultString(i)); printf( "\n" ); diff --git a/include/tidy.h b/include/tidy.h index f89b0ba..1da8906 100644 --- a/include/tidy.h +++ b/include/tidy.h @@ -1,15 +1,11 @@ #ifndef __TIDY_H__ #define __TIDY_H__ -/** @file tidy.h - Defines HTML Tidy API implemented by tidy library. - - Public interface is const-correct and doesn't explicitly depend - on any globals. Thus, thread-safety may be introduced w/out - changing the interface. - - Looking ahead to a C++ wrapper, C functions always pass - this-equivalent as 1st arg. +/** @file tidy.h - Defines HTML Tidy API implemented by LibTidy. + Public interface is const-correct and doesn't explicitly depend on any + globals. Thus, thread-safety may be introduced without changing the + interface. Copyright (c) 1998-2016 World Wide Web Consortium (Massachusetts Institute of Technology, European Research @@ -20,45 +16,43 @@ Dave Raggett - The contributing author(s) would like to thank all those who - helped with testing, bug fixes and suggestions for improvements. - This wouldn't have been possible without your help. + The contributing author(s) would like to thank all those who helped with + testing, bug fixes and suggestions for improvements. This wouldn't have been + possible without your help. COPYRIGHT NOTICE: - This software and documentation is provided "as is," and - the copyright holders and contributing author(s) make no - representations or warranties, express or implied, including - but not limited to, warranties of merchantability or fitness - for any particular purpose or that the use of the software or - documentation will not infringe any third party patents, - copyrights, trademarks or other rights. + This software and documentation is provided "as is," and the copyright holders + and contributing author(s) make no representations or warranties, express or + implied, including but not limited to, warranties of merchantability or + fitness for any particular purpose or that the use of the software or + documentation will not infringe any third party patents, copyrights, + trademarks or other rights. - The copyright holders and contributing author(s) will not be held - liable for any direct, indirect, special or consequential damages - arising out of any use of the software or documentation, even if - advised of the possibility of such damage. + The copyright holders and contributing author(s) will not be held liable for + any direct, indirect, special or consequential damages arising out of any use + of the software or documentation, even if advised of the possibility of such + damage. - Permission is hereby granted to use, copy, modify, and distribute - this source code, or portions hereof, documentation and executables, - for any purpose, without fee, subject to the following restrictions: + Permission is hereby granted to use, copy, modify, and distribute this source + code, or portions hereof, documentation and executables, for any purpose, + without fee, subject to the following restrictions: 1. The origin of this source code must not be misrepresented. - 2. Altered versions must be plainly marked as such and must - not be misrepresented as being the original source. - 3. This Copyright notice may not be removed or altered from any - source or altered source distribution. + 2. Altered versions must be plainly marked as such and must not be + misrepresented as being the original source. + 3. This Copyright notice may not be removed or altered from any source or + altered source distribution. - The copyright holders and contributing author(s) specifically - permit, without fee, and encourage the use of this source code - as a component for supporting the Hypertext Markup Language in - commercial products. If you use this source code in a product, - acknowledgment is not required but would be appreciated. - + The copyright holders and contributing author(s) specifically permit, without +  fee, and encourage the use of this source code as a component for supporting + the Hypertext Markup Language in commercial products. If you use this source + code in a product, acknowledgment is not required but would be appreciated. Created 2001-05-20 by Charles Reitzel Updated 2002-07-01 by Charles Reitzel - 1st Implementation Updated 2015-06-09 by Geoff R. McLane - Add more doxygen syntax + Additional updates: consult git log */ @@ -71,8 +65,14 @@ extern "C" { /** @defgroup Opaque Opaque Types ** +** These instances of these types are available for use in your programs, +** however their internal details are opaque. These items should be accessed +** with LibTidy's accessor functions. +** +** Internally LibTidy will cast these to internal implementation types. ** Cast to implementation types within lib. -** Reduces inter-dependencies/conflicts w/ application code. +** +** This reduces inter-dependencies and conflicts with application code. ** @{ */ @@ -98,55 +98,46 @@ opaque_type( TidyAttr ); /** @} end Opaque group */ + TIDY_STRUCT struct _TidyBuffer; typedef struct _TidyBuffer TidyBuffer; /** @defgroup Memory Memory Allocation ** -** Tidy uses a user provided allocator for all -** memory allocations. If this allocator is -** not provided, then a default allocator is -** used which simply wraps standard C malloc/free -** calls. These wrappers call the panic function -** upon any failure. The default panic function -** prints an out of memory message to stderr, and -** calls exit(2). +** Tidy uses a user provided allocator for all memory allocations. If this +** allocator is not provided, then a default allocator is used which simply +** wraps standard C malloc/free calls. These wrappers call the panic function +** upon any failure. The default panic function prints an out of memory message +** to stderr, and calls exit(2). ** -** For applications in which it is unacceptable to -** abort in the case of memory allocation, then the -** panic function can be replaced with one which -** longjmps() out of the tidy code. For this to -** clean up completely, you should be careful not -** to use any tidy methods that open files as these -** will not be closed before panic() is called. +** For applications in which it is unacceptable to abort in the case of memory +** allocation, then the panic function can be replaced with one which longjmps() +** out of the LibTidy code. For this to clean up completely, you should be +** careful not to use any tidy methods that open files as these will not be +** closed before panic() is called. ** -** TODO: associate file handles with tidyDoc and -** ensure that tidyDocRelease() can close them all. +** TODO: associate file handles with tidyDoc and ensure that tidyDocRelease() +** can close them all. ** -** Calling the withAllocator() family ( -** tidyCreateWithAllocator, tidyBufInitWithAllocator, -** tidyBufAllocWithAllocator) allow settings custom -** allocators). +** Calling the xWithAllocator() family (tidyCreateWithAllocator, +** tidyBufInitWithAllocator, tidyBufAllocWithAllocator) allow setting custom +** allocators. ** -** All parts of the document use the same allocator. -** Calls that require a user provided buffer can -** optionally use a different allocator. +** All parts of the document use the same allocator. Calls that require a user +** provided buffer can optionally use a different allocator. ** -** For reference in designing a plug-in allocator, -** most allocations made by tidy are less than 100 -** bytes, corresponding to attribute names/values, etc. +** For reference in designing a plug-in allocator, most allocations made by +** LibTidy are less than 100 bytes, corresponding to attribute names and +** values, etc. ** -** There is also an additional class of much larger -** allocations which are where most of the data from -** the lexer is stored. (It is not currently possible -** to use a separate allocator for the lexer, this -** would be a useful extension). +** There is also an additional class of much larger allocations which are where +** most of the data from the lexer is stored. It is not currently possible to +** use a separate allocator for the lexer; this would be a useful extension. ** -** In general, approximately 1/3rd of the memory -** used by tidy is freed during the parse, so if -** memory usage is an issue then an allocator that -** can reuse this memory is a good idea. +** In general, approximately 1/3rd of the memory used by LibTidy is freed during +** the parse, so if memory usage is an issue then an allocator that can reuse +** this memory is a good idea. ** ** @{ */ @@ -161,8 +152,7 @@ struct _TidyAllocator; /** The allocator **/ typedef struct _TidyAllocator TidyAllocator; -/** An allocator's function table. All functions here must - be provided. +/** An allocator's function table. All functions here must be provided. */ struct _TidyAllocatorVtbl { /** Called to allocate a block of nBytes of memory */ @@ -173,15 +163,14 @@ struct _TidyAllocatorVtbl { void* (TIDY_CALL *realloc)( TidyAllocator *self, void *block, size_t nBytes ); /** Called to free a previously allocated block of memory */ void (TIDY_CALL *free)( TidyAllocator *self, void *block); - /** Called when a panic condition is detected. Must support - block == NULL. This function is not called if either alloc - or realloc fails; it is up to the allocator to do this. - Currently this function can only be called if an error is - detected in the tree integrity via the internal function - CheckNodeIntegrity(). This is a situation that can - only arise in the case of a programming error in tidylib. - You can turn off node integrity checking by defining - the constant NO_NODE_INTEGRITY_CHECK during the build. + /** Called when a panic condition is detected. Must support block == NULL. + This function is not called if either alloc or realloc fails; it is up + to the allocator to do this. Currently this function can only be called + if an error is detected in the tree integrity via the internal function + CheckNodeIntegrity(). This is a situation that can only arise in the + case of a programming error in LibTidy. You can turn off node integrity + checking by defining the constant NO_NODE_INTEGRITY_CHECK during the + build. **/ void (TIDY_CALL *panic)( TidyAllocator *self, ctmbstr msg ); }; @@ -249,73 +238,20 @@ TIDY_EXPORT Bool TIDY_CALL tidySetPanicCall( TidyPanic fpanic ); /** @defgroup Basic Basic Operations ** -** Tidy public interface +** For an excellent example of how to invoke LibTidy, please consult +** `console/tidy.c:main()` for in-depth implementation details. A simplified +** example can be seen on our site: http://www.html-tidy.org/developer/ ** -** Several functions return an integer document status: +** There used to be an example built into the documentation right here, but +** as it was formatted for Doxygen rather than a developer, it was unreadable +** and so has been removed. ** -**
-** 0    -> SUCCESS
-** >0   -> 1 == TIDY WARNING, 2 == TIDY ERROR
-** <0   -> SEVERE ERROR
-** 
-** -The following is a short example program. - -
-\#include <tidy.h>
-\#include <tidybuffio.h>
-\#include <stdio.h>
-\#include <errno.h>
-
-
-int main(int argc, char **argv )
-{
-  const char* input = "<title>Foo</title><p>Foo!";
-  TidyBuffer output;
-  TidyBuffer errbuf;
-  int rc = -1;
-  Bool ok;
-
-  TidyDoc tdoc = tidyCreate();                     // Initialize "document"
-  tidyBufInit( &output );
-  tidyBufInit( &errbuf );
-  printf( "Tidying:\t\%s\\n", input );
-
-  ok = tidyOptSetBool( tdoc, TidyXhtmlOut, yes );  // Convert to XHTML
-  if ( ok )
-    rc = tidySetErrorBuffer( tdoc, &errbuf );      // Capture diagnostics
-  if ( rc >= 0 )
-    rc = tidyParseString( tdoc, input );           // Parse the input
-  if ( rc >= 0 )
-    rc = tidyCleanAndRepair( tdoc );               // Tidy it up!
-  if ( rc >= 0 )
-    rc = tidyRunDiagnostics( tdoc );               // Kvetch
-  if ( rc > 1 )                                    // If error, force output.
-    rc = ( tidyOptSetBool(tdoc, TidyForceOutput, yes) ? rc : -1 );
-  if ( rc >= 0 )
-    rc = tidySaveBuffer( tdoc, &output );          // Pretty Print
-
-  if ( rc >= 0 )
-  {
-    if ( rc > 0 )
-      printf( "\\nDiagnostics:\\n\\n\%s", errbuf.bp );
-    printf( "\\nAnd here is the result:\\n\\n\%s", output.bp );
-  }
-  else
-    printf( "A severe error (\%d) occurred.\\n", rc );
-
-  tidyBufFree( &output );
-  tidyBufFree( &errbuf );
-  tidyRelease( tdoc );
-  return rc;
-}
-
** @{ */ -/** The primary creation of a TidyDoc. - ** This must be the first call before most of the Tidy API which require the TidyDoc parameter. - ** When completed tidyRelease( TidyDoc tdoc ); should be called to release all memory +/** The primary creation of a TidyDoc. This must be the first call before most + ** of the Tidy API which require the TidyDoc parameter. When completed, + ** tidyRelease( TidyDoc tdoc ); should be called to release all memory */ TIDY_EXPORT TidyDoc TIDY_CALL tidyCreate(void); @@ -338,10 +274,7 @@ TIDY_EXPORT void TIDY_CALL tidySetAppData( TidyDoc tdoc, void* appData ); TIDY_EXPORT void* TIDY_CALL tidyGetAppData( TidyDoc tdoc ); /** Get release date (version) for current library - ** @deprecated tidyReleaseDate() is deprecated in favor of semantic - ** versioning and should be replaced with tidyLibraryVersion(). */ - TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void); /** Get version number for the current library */ @@ -1138,6 +1071,137 @@ TIDY_EXPORT TidyAttr TIDY_CALL tidyAttrGetROWSPAN( TidyNode tnod ); /** @} end AttrGet group */ + +/** @defgroup MessagesKeys Message Key Management +** +** These functions serve to manage message codes. To-do is to rename them +** so they reflect messages and not errors. +** @{ +*/ + +TIDY_EXPORT ctmbstr TIDY_CALL tidyErrorCodeAsKey(uint code); +TIDY_EXPORT TidyIterator TIDY_CALL getErrorCodeList(); +TIDY_EXPORT uint TIDY_CALL getNextErrorCode( TidyIterator* iter ); + +/** @} end MessagesKeys group */ + + +/** @defgroup Localization Localization Support +** +** These functions help manage localization in Tidy. + ** @{ +*/ + + +/** + ** Determines the current locale without affecting the C locale. + ** Tidy has always used the default C locale, and at this point + ** in its development we're not going to tamper with that. + ** @param result The buffer to use to return the string. + ** Returns NULL on failure. + ** @return The same buffer for convenience. + */ +TIDY_EXPORT tmbstr TIDY_CALL tidySystemLocale(tmbstr result); + +/** + * Tells Tidy to use a different language for output. + * @param languageCode A Windows or POSIX language code, and must match + * a TIDY_LANGUAGE for an installed language. + * @result Indicates that a setting was applied, but not necessarily the + * specific request, i.e., true indicates a language and/or region + * was applied. If es_mx is requested but not installed, and es is + * installed, then es will be selected and this function will return + * true. However the opposite is not true; if es is requested but + * not present, Tidy will not try to select from the es_XX variants. + */ +TIDY_EXPORT Bool TIDY_CALL tidySetLanguage( ctmbstr languageCode ); + +/** + * Gets the current language used by Tidy. + */ +TIDY_EXPORT ctmbstr TIDY_CALL tidyGetLanguage(); + +/** + * Provides a string given `messageType` in the current + * localization for `quantity`. + */ +TIDY_EXPORT ctmbstr TIDY_CALL tidyLocalizedStringN( uint messageType, uint quantity ); + +/** + * Provides a string given `messageType` in the current + * localization for the single case. + */ +TIDY_EXPORT ctmbstr TIDY_CALL tidyLocalizedString( uint messageType ); + +/** + * Provides a string given `messageType` in the default + * localization (which is `en`). + */ +TIDY_EXPORT ctmbstr TIDY_CALL tidyDefaultString( uint messageType ); + +/* + * Initializes the TidyIterator to point to the first item + * in Tidy's list of localization string keys. Note that + * these are provided for documentation generation purposes + * and probably aren't useful for LibTidy implementors. + */ +TIDY_EXPORT TidyIterator TIDY_CALL getStringKeyList(); + +/* + * Provides the next key value in Tidy's list of localized + * strings. Note that these are provided for documentation + * generation purposes and probably aren't useful to + * libtidy implementors. + */ +TIDY_EXPORT uint TIDY_CALL getNextStringKey( TidyIterator* iter ); + +/** + * Define an opaque type we can use for tidyLocaleMapItem, which + * is used to iterate through the language list, and used to access + * the windowsName() and the posixName(). + */ +opaque_type(tidyLocaleMapItem); + +/** + * Initializes the TidyIterator to point to the first item + * in Tidy's structure of Windows<->POSIX local mapping. + * Items can be retrieved with getNextWindowsLanguage(); + */ +TIDY_EXPORT TidyIterator TIDY_CALL getWindowsLanguageList(); + +/** + * Returns the next record of type `localeMapItem` in + * Tidy's structure of Windows<->POSIX local mapping. + */ +TIDY_EXPORT const tidyLocaleMapItem TIDY_CALL *getNextWindowsLanguage( TidyIterator* iter ); + +/** + * Given a `tidyLocalMapItem`, return the Windows name. + */ +TIDY_EXPORT const ctmbstr TIDY_CALL TidyLangWindowsName( const tidyLocaleMapItem *item ); + +/** + * Given a `tidyLocalMapItem`, return the POSIX name. + */ +TIDY_EXPORT const ctmbstr TIDY_CALL TidyLangPosixName( const tidyLocaleMapItem *item ); + +/** + * Initializes the TidyIterator to point to the first item + * in Tidy's list of installed language codes. + * Items can be retrieved with getNextInstalledLanguage(); + */ +TIDY_EXPORT TidyIterator TIDY_CALL getInstalledLanguageList(); + +/** + * Returns the next installed language. + */ +TIDY_EXPORT ctmbstr TIDY_CALL getNextInstalledLanguage( TidyIterator* iter ); + + + +/** @} end MessagesKeys group */ + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/include/tidyenum.h b/include/tidyenum.h index 05448aa..c9cbb3e 100644 --- a/include/tidyenum.h +++ b/include/tidyenum.h @@ -1,18 +1,31 @@ #ifndef __TIDYENUM_H__ #define __TIDYENUM_H__ -/** @file tidyenum.h - Separated public enumerations header - - Simplifies enum re-use in various wrappers. e.g. SWIG - generated wrappers and COM IDL files. - - (c) 1998-2016 (W3C) MIT, ERCIM, Keio University - See tidy.h for the full copyright notice. - - Created 2001-05-20 by Charles Reitzel - Updated 2002-07-01 by Charles Reitzel - 1st Implementation - -*/ +/********************************************************************* + * Separated public enumerations header + * + * Simplifies enum re-use in various wrappers, e.g. SWIG, generated + * wrappers, and COM IDL files. + * + * This file also contains macros to generate additional enums for + * use in Tidy's language localizations. See detailed information in + * comments. + * + * Enumeration use: LibTidy does *not* guarantee the integer value + * of any enumeration label, including the starting integer value. + * Always use enums by label in your code, and never by value. + * + * Enums that have starting values have starting values for a good + * reason, mainly to prevent message overlap, because many of these + * enums are used for string retrieval. + * + * (c) 1998-2017 (W3C) MIT, ERCIM, Keio University, HTACG + * See tidy.h for the full copyright notice. + * + * Created 2001-05-20 by Charles Reitzel + * Updated 2002-07-01 by Charles Reitzel - 1st Implementation + * Further modifications: consult git log. + *********************************************************************/ #ifdef __cplusplus extern "C" { @@ -21,11 +34,13 @@ extern "C" { /* Enumerate configuration options */ -/** Categories of Tidy configuration options +/** Categories of Tidy configuration options. They are used principally + ** by the console application to generate documentation, and also have + ** associated localized strings to describe them. */ typedef enum { - TidyMarkup, /**< Markup options: (X)HTML version, etc */ + TidyMarkup = 300, /**< Markup options: (X)HTML version, etc */ TidyDiagnostics, /**< Diagnostics */ TidyPrettyPrint, /**< Output layout */ TidyEncoding, /**< Character encodings */ @@ -37,127 +52,124 @@ typedef enum These TidyOptionId are used throughout libtidy, and also have associated localized strings to describe them. - - Note this enum MUST start at zero due to historical design-time - decisions that make assumptions about this starting value. */ typedef enum { - TidyUnknownOption, /**< Unknown option! */ - TidyIndentSpaces, /**< Indentation n spaces/tabs */ - TidyWrapLen, /**< Wrap margin */ - TidyTabSize, /**< Expand tabs to n spaces */ + TidyUnknownOption = 0, /**< Unknown option! */ + TidyIndentSpaces, /**< Indentation n spaces/tabs */ + TidyWrapLen, /**< Wrap margin */ + TidyTabSize, /**< Expand tabs to n spaces */ - TidyCharEncoding, /**< In/out character encoding */ - TidyInCharEncoding, /**< Input character encoding (if different) */ - TidyOutCharEncoding, /**< Output character encoding (if different) */ - TidyNewline, /**< Output line ending (default to platform) */ + TidyCharEncoding, /**< In/out character encoding */ + TidyInCharEncoding, /**< Input character encoding (if different) */ + TidyOutCharEncoding, /**< Output character encoding (if different) */ + TidyNewline, /**< Output line ending (default to platform) */ - TidyDoctypeMode, /**< See doctype property */ - TidyDoctype, /**< User specified doctype */ + TidyDoctypeMode, /**< See doctype property */ + TidyDoctype, /**< User specified doctype */ - TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */ - TidyAltText, /**< Default text for alt attribute */ + TidyDuplicateAttrs, /**< Keep first or last duplicate attribute */ + TidyAltText, /**< Default text for alt attribute */ /* obsolete */ - TidySlideStyle, /**< Style sheet for slides: not used for anything yet */ + TidySlideStyle, /**< Style sheet for slides: not used for anything yet */ - TidyErrFile, /**< File name to write errors to */ - TidyOutFile, /**< File name to write markup to */ - TidyWriteBack, /**< If true then output tidied markup */ - TidyShowMarkup, /**< If false, normal output is suppressed */ - TidyShowInfo, /**< If true, info-level messages are shown */ - TidyShowWarnings, /**< However errors are always shown */ - TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */ - TidyIndentContent, /**< Indent content of appropriate tags */ - /**< "auto" does text/block level content indentation */ - TidyCoerceEndTags, /**< Coerce end tags from start tags where probably intended */ - TidyOmitOptionalTags,/**< Suppress optional start tags and end tags */ - TidyHideEndTags, /**< Legacy name for TidyOmitOptionalTags */ - TidyXmlTags, /**< Treat input as XML */ - TidyXmlOut, /**< Create output as XML */ - TidyXhtmlOut, /**< Output extensible HTML */ - TidyHtmlOut, /**< Output plain HTML, even for XHTML input. - Yes means set explicitly. */ - TidyXmlDecl, /**< Add for XML docs */ - TidyUpperCaseTags, /**< Output tags in upper not lower case */ - TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */ - TidyMakeBare, /**< Make bare HTML: remove Microsoft cruft */ - TidyMakeClean, /**< Replace presentational clutter by style rules */ - TidyGDocClean, /**< Clean up HTML exported from Google Docs */ - TidyLogicalEmphasis, /**< Replace i by em and b by strong */ - TidyDropPropAttrs, /**< Discard proprietary attributes */ - TidyDropFontTags, /**< Discard presentation tags */ - TidyDropEmptyElems, /**< Discard empty elements */ - TidyDropEmptyParas, /**< Discard empty p elements */ - TidyFixComments, /**< Fix comments with adjacent hyphens */ - TidyBreakBeforeBR, /**< Output newline before
or not? */ + TidyErrFile, /**< File name to write errors to */ + TidyOutFile, /**< File name to write markup to */ + TidyWriteBack, /**< If true then output tidied markup */ + TidyShowMarkup, /**< If false, normal output is suppressed */ + TidyShowInfo, /**< If true, info-level messages are shown */ + TidyShowWarnings, /**< However errors are always shown */ + TidyQuiet, /**< No 'Parsing X', guessed DTD or summary */ + TidyIndentContent, /**< Indent content of appropriate tags */ + /**< "auto" does text/block level content indentation */ + TidyCoerceEndTags, /**< Coerce end tags from start tags where probably intended */ + TidyOmitOptionalTags, /**< Suppress optional start tags and end tags */ + TidyHideEndTags, /**< Legacy name for TidyOmitOptionalTags */ + TidyXmlTags, /**< Treat input as XML */ + TidyXmlOut, /**< Create output as XML */ + TidyXhtmlOut, /**< Output extensible HTML */ + TidyHtmlOut, /**< Output plain HTML, even for XHTML input. + Yes means set explicitly. */ + TidyXmlDecl, /**< Add for XML docs */ + TidyUpperCaseTags, /**< Output tags in upper not lower case */ + TidyUpperCaseAttrs, /**< Output attributes in upper not lower case */ + TidyMakeBare, /**< Make bare HTML: remove Microsoft cruft */ + TidyMakeClean, /**< Replace presentational clutter by style rules */ + TidyGDocClean, /**< Clean up HTML exported from Google Docs */ + TidyLogicalEmphasis, /**< Replace i by em and b by strong */ + TidyDropPropAttrs, /**< Discard proprietary attributes */ + TidyDropFontTags, /**< Discard presentation tags */ + TidyDropEmptyElems, /**< Discard empty elements */ + TidyDropEmptyParas, /**< Discard empty p elements */ + TidyFixComments, /**< Fix comments with adjacent hyphens */ + TidyBreakBeforeBR, /**< Output newline before
or not? */ /* obsolete */ - TidyBurstSlides, /**< Create slides on each h2 element */ + TidyBurstSlides, /**< Create slides on each h2 element */ - TidyNumEntities, /**< Use numeric entities */ - TidyQuoteMarks, /**< Output " marks as " */ - TidyQuoteNbsp, /**< Output non-breaking space as entity */ - TidyQuoteAmpersand, /**< Output naked ampersand as & */ - TidyWrapAttVals, /**< Wrap within attribute values */ - TidyWrapScriptlets, /**< Wrap within JavaScript string literals */ - TidyWrapSection, /**< Wrap within section tags */ - TidyWrapAsp, /**< Wrap within ASP pseudo elements */ - TidyWrapJste, /**< Wrap within JSTE pseudo elements */ - TidyWrapPhp, /**< Wrap within PHP pseudo elements */ - TidyFixBackslash, /**< Fix URLs by replacing \ with / */ - TidyIndentAttributes,/**< Newline+indent before each attribute */ - TidyXmlPIs, /**< If set to yes PIs must end with ?> */ - TidyXmlSpace, /**< If set to yes adds xml:space attr as needed */ - TidyEncloseBodyText, /**< If yes text at body is wrapped in P's */ - TidyEncloseBlockText,/**< If yes text in blocks is wrapped in P's */ - TidyKeepFileTimes, /**< If yes last modied time is preserved */ - TidyWord2000, /**< Draconian cleaning for Word2000 */ - TidyMark, /**< Add meta element indicating tidied doc */ - TidyEmacs, /**< If true format error output for GNU Emacs */ - TidyEmacsFile, /**< Name of current Emacs file */ - TidyLiteralAttribs, /**< If true attributes may use newlines */ - TidyBodyOnly, /**< Output BODY content only */ - TidyFixUri, /**< Applies URI encoding if necessary */ - TidyLowerLiterals, /**< Folds known attribute values to lower case */ - TidyHideComments, /**< Hides all (real) comments in output */ - TidyIndentCdata, /**< Indent section */ - TidyForceOutput, /**< Output document even if errors were found */ - TidyShowErrors, /**< Number of errors to put out */ - TidyAsciiChars, /**< Convert quotes and dashes to nearest ASCII char */ - TidyJoinClasses, /**< Join multiple class attributes */ - TidyJoinStyles, /**< Join multiple style attributes */ - TidyEscapeCdata, /**< Replace sections with escaped text */ + TidyNumEntities, /**< Use numeric entities */ + TidyQuoteMarks, /**< Output " marks as " */ + TidyQuoteNbsp, /**< Output non-breaking space as entity */ + TidyQuoteAmpersand, /**< Output naked ampersand as & */ + TidyWrapAttVals, /**< Wrap within attribute values */ + TidyWrapScriptlets, /**< Wrap within JavaScript string literals */ + TidyWrapSection, /**< Wrap within section tags */ + TidyWrapAsp, /**< Wrap within ASP pseudo elements */ + TidyWrapJste, /**< Wrap within JSTE pseudo elements */ + TidyWrapPhp, /**< Wrap within PHP pseudo elements */ + TidyFixBackslash, /**< Fix URLs by replacing \ with / */ + TidyIndentAttributes, /**< Newline+indent before each attribute */ + TidyXmlPIs, /**< If set to yes PIs must end with ?> */ + TidyXmlSpace, /**< If set to yes adds xml:space attr as needed */ + TidyEncloseBodyText, /**< If yes text at body is wrapped in P's */ + TidyEncloseBlockText, /**< If yes text in blocks is wrapped in P's */ + TidyKeepFileTimes, /**< If yes last modied time is preserved */ + TidyWord2000, /**< Draconian cleaning for Word2000 */ + TidyMark, /**< Add meta element indicating tidied doc */ + TidyEmacs, /**< If true format error output for GNU Emacs */ + TidyEmacsFile, /**< Name of current Emacs file */ + TidyLiteralAttribs, /**< If true attributes may use newlines */ + TidyBodyOnly, /**< Output BODY content only */ + TidyFixUri, /**< Applies URI encoding if necessary */ + TidyLowerLiterals, /**< Folds known attribute values to lower case */ + TidyHideComments, /**< Hides all (real) comments in output */ + TidyIndentCdata, /**< Indent section */ + TidyForceOutput, /**< Output document even if errors were found */ + TidyShowErrors, /**< Number of errors to put out */ + TidyAsciiChars, /**< Convert quotes and dashes to nearest ASCII char */ + TidyJoinClasses, /**< Join multiple class attributes */ + TidyJoinStyles, /**< Join multiple style attributes */ + TidyEscapeCdata, /**< Replace sections with escaped text */ #if SUPPORT_ASIAN_ENCODINGS - TidyLanguage, /**< Language property: not used for anything yet */ - TidyNCR, /**< Allow numeric character references */ + TidyLanguage, /**< Language property: not used for anything yet */ + TidyNCR, /**< Allow numeric character references */ #else TidyLanguageNotUsed, TidyNCRNotUsed, #endif #if SUPPORT_UTF16_ENCODINGS - TidyOutputBOM, /**< Output a Byte Order Mark (BOM) for UTF-16 encodings */ - /**< auto: if input stream has BOM, we output a BOM */ + TidyOutputBOM, /**< Output a Byte Order Mark (BOM) for UTF-16 encodings */ + /**< auto: if input stream has BOM, we output a BOM */ #else TidyOutputBOMNotUsed, #endif - TidyReplaceColor, /**< Replace hex color attribute values with names */ - TidyCSSPrefix, /**< CSS class naming for -clean option */ + TidyReplaceColor, /**< Replace hex color attribute values with names */ + TidyCSSPrefix, /**< CSS class naming for -clean option */ - TidyInlineTags, /**< Declared inline tags */ - TidyBlockTags, /**< Declared block tags */ - TidyEmptyTags, /**< Declared empty tags */ - TidyPreTags, /**< Declared pre tags */ + TidyInlineTags, /**< Declared inline tags */ + TidyBlockTags, /**< Declared block tags */ + TidyEmptyTags, /**< Declared empty tags */ + TidyPreTags, /**< Declared pre tags */ TidyAccessibilityCheckLevel, /**< Accessibility check level 0 (old style), or 1, 2, 3 */ - TidyVertSpace, /**< degree to which markup is spread out vertically */ + TidyVertSpace, /**< degree to which markup is spread out vertically */ #if SUPPORT_ASIAN_ENCODINGS - TidyPunctWrap, /**< consider punctuation and breaking spaces for wrapping */ + TidyPunctWrap, /**< consider punctuation and breaking spaces for wrapping */ #else TidyPunctWrapNotUsed, #endif @@ -237,26 +249,20 @@ typedef enum /* I/O and Message handling interface ** -** By default, Tidy will define, create and use -** instances of input and output handlers for -** standard C buffered I/O (i.e. FILE* stdin, -** FILE* stdout and FILE* stderr for content -** input, content output and diagnostic output, -** respectively. A FILE* cfgFile input handler -** will be used for config files. Command line -** options will just be set directly. +** By default, Tidy will define, create and use instances of input and output +** handlers for standard C buffered I/O (i.e. FILE* stdin, ** FILE* stdout and +** FILE* stderr for content input, content output and diagnostic output, +** respectively. A FILE* cfgFile input handler will be used for config files. +** Command line options will just be set directly. */ -/** Message severity level - * These TidyReportLevel are used throughout libtidy, but don't - * have associated localized strings to describe them because - * TidyReportLevel is externally-facing, and changing the enum - * starting int can break existing API's for poorly-written - * applications using libtidy. See enum `TidyReportLevelKeys`. -*/ +/** Message severity level. These are used throughout LibTidy to indicate the + * severity of a message, and they also have associated localized strings to + * describe them. + */ typedef enum { - TidyInfo, /**< Information about markup usage */ + TidyInfo = 350, /**< Information about markup usage */ TidyWarning, /**< Warning message */ TidyConfig, /**< Configuration error */ TidyAccess, /**< Accessibility message */ @@ -265,22 +271,6 @@ typedef enum TidyFatal /**< Crash! */ } TidyReportLevel; -/** Message severity level - string lookup keys - * These TidyReportLevelKeys are used throughout libtidy, and - * have associated localized strings to describe them. They - * correspond to enum `TidyReportLevel`. -*/ -typedef enum -{ - TidyInfoString = 600, - TidyWarningString, - TidyConfigString, - TidyAccessString, - TidyErrorString, - TidyBadDocumentString, - TidyFatalString -} TidyReportLevelKeys; - /* Document tree traversal functions */ @@ -813,6 +803,495 @@ typedef enum N_TIDY_ATTRIBS /**< Must be last */ } TidyAttrId; + +/********************************************************************* + * Code Generation + * + * Tidy aims to provide a consistent API for library users, and so we + * go to some lengths to provide a `tidyMessagesCodes` enum that + * consists of the message code for every warning/error/info message + * tha Tidy can emit, and a `tidyErrorFilterKeysStruct[]` array with + * string representations of each message code. + * + * We also support the addition of message codes from other modules, + * such as from Tidy's accessibility module. + * + * In order to keep code maintainable and make it simple to add new + * messages, the `tidyMessageCodes` and `tidyErrorFilterKeysStruct[]` + * are generated dynamically with preprocessor macros defined below, + * or in respective modules (e.g., `access.h`). + * + * Any visible FOREACH_MSG_* macro (including new ones) must be + * applied to the `tidyMessageCodes` enum with the MAKE_ENUM() macro + * in this file, and to the `tidyErrorFilterKeysStruct[]` with + * MAKE_STRUCT in this file. + * + * Modern IDE's will dynamically pre-process all of these macros, + * enabling code-completion of these enums and array of structs. + *********************************************************************/ + +#define MAKE_ENUM(MESSAGE) MESSAGE, +#define MAKE_STRUCT(MESSAGE) {#MESSAGE, MESSAGE}, + +/********************************************************************* + * These `tidyMessageCodes` are used throughout libtidy, and also have + * associated localized strings to describe them. + * + * These message codes comprise every possible message that can be + * output by Tidy in its report table and via the message filter + * callback. + *********************************************************************/ + +/* message codes for entities/numeric character references */ +#define FOREACH_MSG_ENTITIES(FN) \ + FN(APOS_UNDEFINED) \ + FN(MISSING_SEMICOLON_NCR) \ + FN(MISSING_SEMICOLON) \ + FN(UNESCAPED_AMPERSAND) \ + FN(UNKNOWN_ENTITY) + +/* error codes for element messages */ +#define FOREACH_MSG_ELEMENT(FN) \ + FN(BAD_CDATA_CONTENT) \ + FN(BAD_COMMENT_CHARS) \ + FN(BAD_XML_COMMENT) \ + FN(CANT_BE_NESTED) \ + FN(COERCE_TO_ENDTAG_WARN) \ + FN(COERCE_TO_ENDTAG) \ + FN(CONTENT_AFTER_BODY) \ + FN(DISCARDING_UNEXPECTED) \ + FN(DOCTYPE_AFTER_TAGS) \ + FN(DTYPE_NOT_UPPER_CASE) \ + FN(DUPLICATE_FRAMESET) \ + FN(ELEMENT_NOT_EMPTY) \ + FN(ELEMENT_VERS_MISMATCH_ERROR) \ + FN(ELEMENT_VERS_MISMATCH_WARN) \ + FN(ENCODING_IO_CONFLICT) \ + FN(ILLEGAL_NESTING) \ + FN(INCONSISTENT_NAMESPACE) \ + FN(INCONSISTENT_VERSION) \ + FN(INSERTING_TAG) \ + FN(MALFORMED_COMMENT) \ + FN(MALFORMED_DOCTYPE) \ + FN(MISSING_DOCTYPE) \ + FN(MISSING_ENDTAG_BEFORE) \ + FN(MISSING_ENDTAG_FOR) \ + FN(MISSING_STARTTAG) \ + FN(MISSING_TITLE_ELEMENT) \ + FN(MIXED_CONTENT_IN_BLOCK) \ + FN(NESTED_EMPHASIS) \ + FN(NESTED_QUOTATION) \ + FN(NOFRAMES_CONTENT) \ + FN(NON_MATCHING_ENDTAG) \ + FN(OBSOLETE_ELEMENT) \ + FN(PROPRIETARY_ELEMENT) \ + FN(REPLACING_ELEMENT) \ + FN(REPLACING_UNEX_ELEMENT) \ + FN(SPACE_PRECEDING_XMLDECL) \ + FN(SUSPECTED_MISSING_QUOTE) \ + FN(TAG_NOT_ALLOWED_IN) \ + FN(TOO_MANY_ELEMENTS_IN) \ + FN(TOO_MANY_ELEMENTS) \ + FN(TRIM_EMPTY_ELEMENT) \ + FN(UNESCAPED_ELEMENT) \ + FN(UNEXPECTED_END_OF_FILE) \ + FN(UNEXPECTED_ENDTAG_IN) \ + FN(UNEXPECTED_ENDTAG) \ + FN(UNKNOWN_ELEMENT) \ + FN(USING_BR_INPLACE_OF) + +/* error codes used for attribute messages */ +#define FOREACH_MSG_ATTRIBUTE(FN) \ + FN(ANCHOR_NOT_UNIQUE) \ + FN(ATTR_VALUE_NOT_LCASE) \ + FN(BACKSLASH_IN_URI) \ + FN(BAD_ATTRIBUTE_VALUE_REPLACED) \ + FN(BAD_ATTRIBUTE_VALUE) \ + FN(BAD_SUMMARY_HTML5) \ + FN(ESCAPED_ILLEGAL_URI) \ + FN(FIXED_BACKSLASH) \ + FN(ID_NAME_MISMATCH) \ + FN(ILLEGAL_URI_REFERENCE) \ + FN(INSERTING_ATTRIBUTE) \ + FN(INSERTING_AUTO_ATTRIBUTE) \ + FN(INVALID_ATTRIBUTE) \ + FN(INVALID_XML_ID) \ + FN(JOINING_ATTRIBUTE) \ + FN(MISMATCHED_ATTRIBUTE_ERROR) \ + FN(MISMATCHED_ATTRIBUTE_WARN) \ + FN(MISSING_ATTR_VALUE) \ + FN(MISSING_ATTRIBUTE) \ + FN(MISSING_IMAGEMAP) \ + FN(MISSING_QUOTEMARK) \ + FN(NEWLINE_IN_URI) \ + FN(PREVIOUS_LOCATION) \ + FN(PROPRIETARY_ATTR_VALUE) \ + FN(PROPRIETARY_ATTRIBUTE) \ + FN(REMOVED_HTML5) \ + FN(REPEATED_ATTRIBUTE) \ + FN(UNEXPECTED_END_OF_FILE_ATTR) \ + FN(UNEXPECTED_EQUALSIGN) \ + FN(UNEXPECTED_GT) \ + FN(UNEXPECTED_QUOTEMARK) \ + FN(UNKNOWN_ATTRIBUTE) \ + FN(WHITE_IN_URI) \ + FN(XML_ATTRIBUTE_VALUE) \ + FN(XML_ID_SYNTAX) + +/* character encoding errors */ +#define FOREACH_MSG_ENCODING(FN) \ + FN(BAD_SURROGATE_LEAD) \ + FN(BAD_SURROGATE_PAIR) \ + FN(BAD_SURROGATE_TAIL) \ + FN(ENCODING_MISMATCH) \ + FN(INVALID_NCR) \ + FN(INVALID_SGML_CHARS) \ + FN(INVALID_URI) \ + FN(INVALID_UTF8) \ + FN(INVALID_UTF16) \ + FN(VENDOR_SPECIFIC_CHARS) + +/* miscellaneous config and info messages */ +#define FOREACH_MSG_MISC(FN) \ + FN(STRING_CONTENT_LOOKS) /* `Document content looks like %s`. */ \ + FN(STRING_DOCTYPE_GIVEN) /* `Doctype given is \"%s\". */ \ + 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`. */ + +/* accessibility module contributions */ +#define FOREACH_MSG_ACCESS(FN) \ +/* [1.1.1.1] */ FN(IMG_MISSING_ALT) \ +/* [1.1.1.2] */ FN(IMG_ALT_SUSPICIOUS_FILENAME) \ +/* [1.1.1.3] */ FN(IMG_ALT_SUSPICIOUS_FILE_SIZE) \ +/* [1.1.1.4] */ FN(IMG_ALT_SUSPICIOUS_PLACEHOLDER) \ +/* [1.1.1.10] */ FN(IMG_ALT_SUSPICIOUS_TOO_LONG) \ +/* [1.1.1.11] */ FN(IMG_MISSING_ALT_BULLET) \ +/* [1.1.1.12] */ FN(IMG_MISSING_ALT_H_RULE) \ +/* [1.1.2.1] */ FN(IMG_MISSING_LONGDESC_DLINK) \ +/* [1.1.2.2] */ FN(IMG_MISSING_DLINK) \ +/* [1.1.2.3] */ FN(IMG_MISSING_LONGDESC) \ +/* [1.1.2.5] */ FN(LONGDESC_NOT_REQUIRED) \ +/* [1.1.3.1] */ FN(IMG_BUTTON_MISSING_ALT) \ +/* [1.1.4.1] */ FN(APPLET_MISSING_ALT) \ +/* [1.1.5.1] */ FN(OBJECT_MISSING_ALT) \ +/* [1.1.6.1] */ FN(AUDIO_MISSING_TEXT_WAV) \ +/* [1.1.6.2] */ FN(AUDIO_MISSING_TEXT_AU) \ +/* [1.1.6.3] */ FN(AUDIO_MISSING_TEXT_AIFF) \ +/* [1.1.6.4] */ FN(AUDIO_MISSING_TEXT_SND) \ +/* [1.1.6.5] */ FN(AUDIO_MISSING_TEXT_RA) \ +/* [1.1.6.6] */ FN(AUDIO_MISSING_TEXT_RM) \ +/* [1.1.8.1] */ FN(FRAME_MISSING_LONGDESC) \ +/* [1.1.9.1] */ FN(AREA_MISSING_ALT) \ +/* [1.1.10.1] */ FN(SCRIPT_MISSING_NOSCRIPT) \ +/* [1.1.12.1] */ FN(ASCII_REQUIRES_DESCRIPTION) \ +/* [1.2.1.1] */ FN(IMG_MAP_SERVER_REQUIRES_TEXT_LINKS) \ +/* [1.4.1.1] */ FN(MULTIMEDIA_REQUIRES_TEXT) \ +/* [1.5.1.1] */ FN(IMG_MAP_CLIENT_MISSING_TEXT_LINKS) \ +/* [2.1.1.1] */ FN(INFORMATION_NOT_CONVEYED_IMAGE) \ +/* [2.1.1.2] */ FN(INFORMATION_NOT_CONVEYED_APPLET) \ +/* [2.1.1.3] */ FN(INFORMATION_NOT_CONVEYED_OBJECT) \ +/* [2.1.1.4] */ FN(INFORMATION_NOT_CONVEYED_SCRIPT) \ +/* [2.1.1.5] */ FN(INFORMATION_NOT_CONVEYED_INPUT) \ +/* [2.2.1.1] */ FN(COLOR_CONTRAST_TEXT) \ +/* [2.2.1.2] */ FN(COLOR_CONTRAST_LINK) \ +/* [2.2.1.3] */ FN(COLOR_CONTRAST_ACTIVE_LINK) \ +/* [2.2.1.4] */ FN(COLOR_CONTRAST_VISITED_LINK) \ +/* [3.2.1.1] */ FN(DOCTYPE_MISSING) \ +/* [3.3.1.1] */ FN(STYLE_SHEET_CONTROL_PRESENTATION) \ +/* [3.5.1.1] */ FN(HEADERS_IMPROPERLY_NESTED) \ +/* [3.5.2.1] */ FN(POTENTIAL_HEADER_BOLD) \ +/* [3.5.2.2] */ FN(POTENTIAL_HEADER_ITALICS) \ +/* [3.5.2.3] */ FN(POTENTIAL_HEADER_UNDERLINE) \ +/* [3.5.3.1] */ FN(HEADER_USED_FORMAT_TEXT) \ +/* [3.6.1.1] */ FN(LIST_USAGE_INVALID_UL) \ +/* [3.6.1.2] */ FN(LIST_USAGE_INVALID_OL) \ +/* [3.6.1.4] */ FN(LIST_USAGE_INVALID_LI) \ +/* [4.1.1.1] */ FN(INDICATE_CHANGES_IN_LANGUAGE) \ +/* [4.3.1.1] */ FN(LANGUAGE_NOT_IDENTIFIED) \ +/* [4.3.1.1] */ FN(LANGUAGE_INVALID) \ +/* [5.1.2.1] */ FN(DATA_TABLE_MISSING_HEADERS) \ +/* [5.1.2.2] */ FN(DATA_TABLE_MISSING_HEADERS_COLUMN) \ +/* [5.1.2.3] */ FN(DATA_TABLE_MISSING_HEADERS_ROW) \ +/* [5.2.1.1] */ FN(DATA_TABLE_REQUIRE_MARKUP_COLUMN_HEADERS) \ +/* [5.2.1.2] */ FN(DATA_TABLE_REQUIRE_MARKUP_ROW_HEADERS) \ +/* [5.3.1.1] */ FN(LAYOUT_TABLES_LINEARIZE_PROPERLY) \ +/* [5.4.1.1] */ FN(LAYOUT_TABLE_INVALID_MARKUP) \ +/* [5.5.1.1] */ FN(TABLE_MISSING_SUMMARY) \ +/* [5.5.1.2] */ FN(TABLE_SUMMARY_INVALID_NULL) \ +/* [5.5.1.3] */ FN(TABLE_SUMMARY_INVALID_SPACES) \ +/* [5.5.1.6] */ FN(TABLE_SUMMARY_INVALID_PLACEHOLDER) \ +/* [5.5.2.1] */ FN(TABLE_MISSING_CAPTION) \ +/* [5.6.1.1] */ FN(TABLE_MAY_REQUIRE_HEADER_ABBR) \ +/* [5.6.1.2] */ FN(TABLE_MAY_REQUIRE_HEADER_ABBR_NULL) \ +/* [5.6.1.3] */ FN(TABLE_MAY_REQUIRE_HEADER_ABBR_SPACES) \ +/* [6.1.1.1] */ FN(STYLESHEETS_REQUIRE_TESTING_LINK) \ +/* [6.1.1.2] */ FN(STYLESHEETS_REQUIRE_TESTING_STYLE_ELEMENT) \ +/* [6.1.1.3] */ FN(STYLESHEETS_REQUIRE_TESTING_STYLE_ATTR) \ +/* [6.2.1.1] */ FN(FRAME_SRC_INVALID) \ +/* [6.2.2.1] */ FN(TEXT_EQUIVALENTS_REQUIRE_UPDATING_APPLET) \ +/* [6.2.2.2] */ FN(TEXT_EQUIVALENTS_REQUIRE_UPDATING_SCRIPT) \ +/* [6.2.2.3] */ FN(TEXT_EQUIVALENTS_REQUIRE_UPDATING_OBJECT) \ +/* [6.3.1.1] */ FN(PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_SCRIPT) \ +/* [6.3.1.2] */ FN(PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_OBJECT) \ +/* [6.3.1.3] */ FN(PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_EMBED) \ +/* [6.3.1.4] */ FN(PROGRAMMATIC_OBJECTS_REQUIRE_TESTING_APPLET) \ +/* [6.5.1.1] */ FN(FRAME_MISSING_NOFRAMES) \ +/* [6.5.1.2] */ FN(NOFRAMES_INVALID_NO_VALUE) \ +/* [6.5.1.3] */ FN(NOFRAMES_INVALID_CONTENT) \ +/* [6.5.1.4] */ FN(NOFRAMES_INVALID_LINK) \ +/* [7.1.1.1] */ FN(REMOVE_FLICKER_SCRIPT) \ +/* [7.1.1.2] */ FN(REMOVE_FLICKER_OBJECT) \ +/* [7.1.1.3] */ FN(REMOVE_FLICKER_EMBED) \ +/* [7.1.1.4] */ FN(REMOVE_FLICKER_APPLET) \ +/* [7.1.1.5] */ FN(REMOVE_FLICKER_ANIMATED_GIF) \ +/* [7.2.1.1] */ FN(REMOVE_BLINK_MARQUEE) \ +/* [7.4.1.1] */ FN(REMOVE_AUTO_REFRESH) \ +/* [7.5.1.1] */ FN(REMOVE_AUTO_REDIRECT) \ +/* [8.1.1.1] */ FN(ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_SCRIPT) \ +/* [8.1.1.2] */ FN(ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_OBJECT) \ +/* [8.1.1.3] */ FN(ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_APPLET) \ +/* [8.1.1.4] */ FN(ENSURE_PROGRAMMATIC_OBJECTS_ACCESSIBLE_EMBED) \ +/* [9.1.1.1] */ FN(IMAGE_MAP_SERVER_SIDE_REQUIRES_CONVERSION) \ +/* [9.3.1.1] */ FN(SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_DOWN) \ +/* [9.3.1.2] */ FN(SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_UP) \ +/* [9.3.1.3] */ FN(SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_CLICK) \ +/* [9.3.1.4] */ FN(SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OVER) \ +/* [9.3.1.5] */ FN(SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_OUT) \ +/* [9.3.1.6] */ FN(SCRIPT_NOT_KEYBOARD_ACCESSIBLE_ON_MOUSE_MOVE) \ +/* [10.1.1.1] */ FN(NEW_WINDOWS_REQUIRE_WARNING_NEW) \ +/* [10.1.1.2] */ FN(NEW_WINDOWS_REQUIRE_WARNING_BLANK) \ +/* [10.2.1.1] */ FN(LABEL_NEEDS_REPOSITIONING_BEFORE_INPUT) \ +/* [10.2.1.2] */ FN(LABEL_NEEDS_REPOSITIONING_AFTER_INPUT) \ +/* [10.4.1.1] */ FN(FORM_CONTROL_REQUIRES_DEFAULT_TEXT) \ +/* [10.4.1.2] */ FN(FORM_CONTROL_DEFAULT_TEXT_INVALID_NULL) \ +/* [10.4.1.3] */ FN(FORM_CONTROL_DEFAULT_TEXT_INVALID_SPACES) \ +/* [11.2.1.1] */ FN(REPLACE_DEPRECATED_HTML_APPLET) \ +/* [11.2.1.2] */ FN(REPLACE_DEPRECATED_HTML_BASEFONT) \ +/* [11.2.1.3] */ FN(REPLACE_DEPRECATED_HTML_CENTER) \ +/* [11.2.1.4] */ FN(REPLACE_DEPRECATED_HTML_DIR) \ +/* [11.2.1.5] */ FN(REPLACE_DEPRECATED_HTML_FONT) \ +/* [11.2.1.6] */ FN(REPLACE_DEPRECATED_HTML_ISINDEX) \ +/* [11.2.1.7] */ FN(REPLACE_DEPRECATED_HTML_MENU) \ +/* [11.2.1.8] */ FN(REPLACE_DEPRECATED_HTML_S) \ +/* [11.2.1.9] */ FN(REPLACE_DEPRECATED_HTML_STRIKE) \ +/* [11.2.1.10] */ FN(REPLACE_DEPRECATED_HTML_U) \ +/* [12.1.1.1] */ FN(FRAME_MISSING_TITLE) \ +/* [12.1.1.2] */ FN(FRAME_TITLE_INVALID_NULL) \ +/* [12.1.1.3] */ FN(FRAME_TITLE_INVALID_SPACES) \ +/* [12.4.1.1] */ FN(ASSOCIATE_LABELS_EXPLICITLY) \ +/* [12.4.1.2] */ FN(ASSOCIATE_LABELS_EXPLICITLY_FOR) \ +/* [12.4.1.3] */ FN(ASSOCIATE_LABELS_EXPLICITLY_ID) \ +/* [13.1.1.1] */ FN(LINK_TEXT_NOT_MEANINGFUL) \ +/* [13.1.1.2] */ FN(LINK_TEXT_MISSING) \ +/* [13.1.1.3] */ FN(LINK_TEXT_TOO_LONG) \ +/* [13.1.1.4] */ FN(LINK_TEXT_NOT_MEANINGFUL_CLICK_HERE) \ +/* [13.1.1.5] */ FN(LINK_TEXT_NOT_MEANINGFUL_MORE) \ +/* [13.1.1.6] */ FN(LINK_TEXT_NOT_MEANINGFUL_FOLLOW_THIS) \ +/* [13.2.1.1] */ FN(METADATA_MISSING) \ +/* [13.2.1.2] */ FN(METADATA_MISSING_LINK) \ +/* [13.2.1.3] */ FN(METADATA_MISSING_REDIRECT_AUTOREFRESH) \ +/* [13.10.1.1] */ FN(SKIPOVER_ASCII_ART) + + +/** @} */ +/** @name Data Structures */ +/** @{ */ + + +/********************************************************************* + * `tidyMessageCodes` + * + * The actual definition of the enumeration, generated dynamically + * per the notes above. + *********************************************************************/ +typedef enum +{ + /* This MUST be present and first. */ + tidyMessageCodes_first = 500, + + FOREACH_MSG_ENTITIES(MAKE_ENUM) + FOREACH_MSG_ELEMENT(MAKE_ENUM) + FOREACH_MSG_ATTRIBUTE(MAKE_ENUM) + FOREACH_MSG_ENCODING(MAKE_ENUM) + FOREACH_MSG_MISC(MAKE_ENUM) + +#if SUPPORT_ACCESSIBILITY_CHECKS + /* Defined in `access.h` */ + FOREACH_MSG_ACCESS(MAKE_ENUM) +#endif + + /* This MUST be present and last. */ + tidyMessageCodes_last +} tidyMessageCodes; + + +/********************************************************************* + * These `tidyMessagesMisc` are used throughout libtidy, and also have + * associated localized strings to describe them. + * + * These message codes comprise every possible message that can be + * output by Tidy that are *not* diagnostic style messages available + * in the message filter callback, and are *not* console application + * specific messages. + *********************************************************************/ +typedef enum +{ + /* This MUST be present and first. */ + tidyMessagesMisc_first = tidyMessageCodes_last, + + ACCESS_URL, /* Used to point to Web Accessibility Guidelines. */ + ATRC_ACCESS_URL, /* Points to Tidy's accessibility page. */ + FILE_CANT_OPEN, /* For retrieving a string when a file can't be opened. */ + LINE_COLUMN_STRING, /* For retrieving localized `line %d column %d` text. */ + STRING_DISCARDING, /* For `discarding`. */ + STRING_ERROR_COUNT, /* `%u %s, %u %s were found!`. */ + STRING_ERROR_COUNT_ERROR, /* `error` and `errors`. */ + STRING_ERROR_COUNT_WARNING, /* `warning` and `warnings`. */ + STRING_HELLO_ACCESS, /* Accessibility hello message. */ + STRING_NO_ERRORS, /* `No warnings or errors were found.\n\n`. */ + STRING_NOT_ALL_SHOWN, /* ` Not all warnings/errors were shown.\n\n`. */ + STRING_PLAIN_TEXT, /* For retrieving a string `plain text`. */ + STRING_REPLACING, /* For `replacing`. */ + STRING_SPECIFIED, /* For `specified`. */ + STRING_XML_DECLARATION, /* For retrieving a string `XML declaration`. */ + TEXT_ACCESS_ADVICE1, /* Explanatory text. */ + TEXT_ACCESS_ADVICE2, /* Explanatory text. */ + TEXT_BAD_FORM, /* Explanatory text. */ + TEXT_BAD_MAIN, /* Explanatory text. */ + TEXT_GENERAL_INFO, /* Explanatory text. */ + TEXT_GENERAL_INFO_PLEA, /* Explanatory text. */ + TEXT_HTML_T_ALGORITHM, /* Paragraph for describing the HTML table algorithm. */ + TEXT_INVALID_URI, /* Explanatory text. */ + TEXT_INVALID_UTF16, /* Explanatory text. */ + TEXT_INVALID_UTF8, /* Explanatory text. */ + TEXT_M_IMAGE_ALT, /* Explanatory text. */ + TEXT_M_IMAGE_MAP, /* Explanatory text. */ + TEXT_M_LINK_ALT, /* Explanatory text. */ + TEXT_M_SUMMARY, /* Explanatory text. */ + TEXT_NEEDS_INTERVENTION, /* Explanatory text. */ + TEXT_SGML_CHARS, /* Explanatory text. */ + TEXT_USING_BODY, /* Explanatory text. */ + TEXT_USING_FONT, /* Explanatory text. */ + TEXT_USING_FRAMES, /* Explanatory text. */ + TEXT_USING_LAYER, /* Explanatory text. */ + TEXT_USING_NOBR, /* Explanatory text. */ + TEXT_USING_SPACER, /* Explanatory text. */ + TEXT_VENDOR_CHARS, /* Explanatory text. */ + TEXT_WINDOWS_CHARS, /* Explanatory text. */ + + /* This MUST be present and last. */ + tidyMessagesMisc_last +} tidyMessagesMisc; + + +#if SUPPORT_CONSOLE_APP +/********************************************************************* + * These `tidyConsoleMessages` are used throughout libtidy, and also + * have associated localized strings to describe them. + * + * These message codes comprise every message is exclusive to the + * Tidy console application. It it possible to build LibTidy without + * these strings. + *********************************************************************/ +typedef enum +{ + /* This MUST be present and first. */ + tidyConsoleMessages_first = tidyMessagesMisc_last, + + TC_LABEL_COL, + TC_LABEL_FILE, + TC_LABEL_LANG, + TC_LABEL_LEVL, + TC_LABEL_OPT, + TC_MAIN_ERROR_LOAD_CONFIG, + TC_OPT_ACCESS, + TC_OPT_ASCII, + TC_OPT_ASHTML, + TC_OPT_ASXML, + TC_OPT_BARE, + TC_OPT_BIG5, + TC_OPT_CLEAN, + TC_OPT_CONFIG, + TC_OPT_ERRORS, + TC_OPT_FILE, + TC_OPT_GDOC, + TC_OPT_HELP, + TC_OPT_HELPCFG, + TC_OPT_HELPOPT, + TC_OPT_IBM858, + TC_OPT_INDENT, + TC_OPT_ISO2022, + TC_OPT_LANGUAGE, + TC_OPT_LATIN0, + TC_OPT_LATIN1, + TC_OPT_MAC, + TC_OPT_MODIFY, + TC_OPT_NUMERIC, + TC_OPT_OMIT, + TC_OPT_OUTPUT, + TC_OPT_QUIET, + TC_OPT_RAW, + TC_OPT_SHIFTJIS, + TC_OPT_SHOWCFG, + TC_OPT_UPPER, + TC_OPT_UTF16, + TC_OPT_UTF16BE, + TC_OPT_UTF16LE, + TC_OPT_UTF8, + TC_OPT_VERSION, + TC_OPT_WIN1252, + TC_OPT_WRAP, + TC_OPT_XML, + TC_OPT_XMLCFG, + TC_OPT_XMLSTRG, + TC_OPT_XMLERRS, + TC_OPT_XMLOPTS, + TC_OPT_XMLHELP, + TC_STRING_CONF_HEADER, + TC_STRING_CONF_NAME, + TC_STRING_CONF_TYPE, + TC_STRING_CONF_VALUE, + TC_STRING_CONF_NOTE, + TC_STRING_OPT_NOT_DOCUMENTED, + TC_STRING_OUT_OF_MEMORY, + TC_STRING_FATAL_ERROR, + TC_STRING_FILE_MANIP, + TC_STRING_LANG_MUST_SPECIFY, + TC_STRING_LANG_NOT_FOUND, + TC_STRING_MUST_SPECIFY, + TC_STRING_PROCESS_DIRECTIVES, + TC_STRING_CHAR_ENCODING, + TC_STRING_MISC, + TC_STRING_XML, + TC_STRING_UNKNOWN_OPTION, + TC_STRING_UNKNOWN_OPTION_B, + TC_STRING_VERS_A, + TC_STRING_VERS_B, + TC_TXT_HELP_1, + TC_TXT_HELP_2A, + TC_TXT_HELP_2B, + TC_TXT_HELP_3, + TC_TXT_HELP_CONFIG, + TC_TXT_HELP_CONFIG_NAME, + TC_TXT_HELP_CONFIG_TYPE, + TC_TXT_HELP_CONFIG_ALLW, + TC_TXT_HELP_LANG_1, + TC_TXT_HELP_LANG_2, + TC_TXT_HELP_LANG_3, + + /* This MUST be present and last. */ + tidyConsoleMessages_last +} tidyConsoleMessages; + +#endif /* SUPPORT_CONSOLE_APP */ + + +/** @} */ + + + #ifdef __cplusplus } /* extern "C" */ #endif diff --git a/include/tidyplatform.h b/include/tidyplatform.h index 69bbce1..c8954a9 100644 --- a/include/tidyplatform.h +++ b/include/tidyplatform.h @@ -69,6 +69,11 @@ extern "C" { #ifndef SUPPORT_LOCALIZATIONS #define SUPPORT_LOCALIZATIONS 1 #endif + +/* Enable/disable support for console */ +#ifndef SUPPORT_CONSOLE_APP +#define SUPPORT_CONSOLE_APP 1 +#endif /* Convenience defines for Mac platforms */ diff --git a/localize/language_ll_cc.h.erb b/localize/language_ll_cc.h.erb index 40bb283..cf55795 100644 --- a/localize/language_ll_cc.h.erb +++ b/localize/language_ll_cc.h.erb @@ -21,7 +21,7 @@ * `poconvert.rb msgunfmt language_<%= po_content.language %>.h` (our own * conversion tool) to generate a fresh PO from this file first! * - * (c) 2015 HTACG + * (c) 2015-2017 HTACG * See tidy.h and access.h for the copyright notice. * * Template Created by Jim Derry on 01/14/2016. @@ -35,10 +35,6 @@ #pragma execution_character_set("utf-8") #endif -#include "language.h" -#include "access.h" -#include "message.h" - /** * This language-specific function returns the correct pluralForm diff --git a/localize/poconvert.rb b/localize/poconvert.rb index 3686c6d..7d7cca1 100755 --- a/localize/poconvert.rb +++ b/localize/poconvert.rb @@ -30,7 +30,7 @@ module PoConvertModule ########################################################### @@default_en = File.expand_path(File.join('..', 'src', 'language_en.h' )) @@header_template = File.expand_path(File.join('.', 'language_ll_cc.h.erb')) - @@header_digest = 'b597e5948de1611ab6cde11934df6fc792c7ec4d21f3cd2030fb2e9bcfb94991' + @@header_digest = '9e5c3bf0b02c20e6fe2068a8edc09de1bb091a14144b211f4c36b0f9d1ec5f97' ########################################################### @@ -1177,8 +1177,9 @@ Complete Help: error_count = 0 fuzzy_list = nil + pwd = File.expand_path( File.join(Dir.getwd, '..') ) + if options[:sha] - pwd = File.expand_path( File.join(Dir.getwd, '..') ) sha = options[:sha] temp_file = "~#{sha}.h" project = Git.open(pwd) diff --git a/localize/translations/language_en_gb.po b/localize/translations/language_en_gb.po index 1a8ec2f..ed4d800 100644 --- a/localize/translations/language_en_gb.po +++ b/localize/translations/language_en_gb.po @@ -5,10 +5,10 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2016-03-24 10:59:55\n" +"PO-Revision-Date: 2017-02-17 14:46:38\n" "Last-Translator: jderry\n" "Language-Team: \n" -"BAD" + #. Only translate if a URL to the target language can be found. msgctxt "ACCESS_URL" msgid "http://www.w3.org/WAI/GL" @@ -102,20 +102,11 @@ msgctxt "STRING_SPECIFIED" msgid "specified" msgstr "" -#, c-format -msgctxt "STRING_UNKNOWN_FILE" -msgid "%s: can't open file \"%s\"\n" -msgstr "" - #, c-format msgctxt "STRING_UNKNOWN_OPTION" msgid "unknown option: %s" msgstr "" -msgctxt "STRING_UNRECZD_OPTION" -msgid "unrecognized option -%c use -help to list options\n" -msgstr "" - msgctxt "STRING_XML_DECLARATION" msgid "XML declaration" msgstr "" @@ -381,31 +372,31 @@ msgstr "" "helping us to localise HTML Tidy. For details please see \n" "https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n" -msgctxt "TidyInfoString" +msgctxt "TidyInfo" msgid "Info: " msgstr "" -msgctxt "TidyWarningString" +msgctxt "TidyWarning" msgid "Warning: " msgstr "" -msgctxt "TidyConfigString" +msgctxt "TidyConfig" msgid "Config: " msgstr "" -msgctxt "TidyAccessString" +msgctxt "TidyAccess" msgid "Access: " msgstr "" -msgctxt "TidyErrorString" +msgctxt "TidyError" msgid "Error: " msgstr "" -msgctxt "TidyBadDocumentString" +msgctxt "TidyBadDocument" msgid "Document: " msgstr "" -msgctxt "TidyFatalString" +msgctxt "TidyFatal" msgid "Panic: " msgstr "" @@ -439,6 +430,18 @@ msgctxt "INVALID_NCR" msgid "%s invalid numeric character reference %s" msgstr "" +msgctxt "BAD_SURROGATE_PAIR" +msgid "Have out-of-range surrogate pair U+%04X:U+%04X, replaced with U+FFFD value." +msgstr "" + +msgctxt "BAD_SURROGATE_TAIL" +msgid "Leading (High) surrogate pair U+%04X, with no trailing (Low) entity, replaced with U+FFFD." +msgstr "" + +msgctxt "BAD_SURROGATE_LEAD" +msgid "Trailing (Low) surrogate pair U+%04X, with no leading (High) entity, replaced with U+FFFD." +msgstr "" + #, c-format msgctxt "MISSING_SEMICOLON" msgid "entity \"%s\" doesn't end in ';'" @@ -3027,23 +3030,23 @@ msgid "" "to <\\/g. Set this option to 'no' if you do not want this." msgstr "" -msgctxt "TC_CAT_DIAGNOSTICS" +msgctxt "TidyDiagnostics" msgid "diagnostics" msgstr "" -msgctxt "TC_CAT_ENCODING" +msgctxt "TidyEncoding" msgid "encoding" msgstr "" -msgctxt "TC_CAT_MARKUP" +msgctxt "TidyMarkup" msgid "markup" msgstr "" -msgctxt "TC_CAT_MISC" +msgctxt "TidyMiscellaneous" msgid "misc" msgstr "" -msgctxt "TC_CAT_PRETTYPRINT" +msgctxt "TidyPrettyPrint" msgid "print" msgstr "" diff --git a/localize/translations/language_es.po b/localize/translations/language_es.po index 98e962e..359ed80 100644 --- a/localize/translations/language_es.po +++ b/localize/translations/language_es.po @@ -5,10 +5,10 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2016-03-24 10:59:55\n" +"PO-Revision-Date: 2017-02-17 14:46:38\n" "Last-Translator: jderry\n" "Language-Team: \n" -"BAD" + #. Only translate if a URL to the target language can be found. msgctxt "ACCESS_URL" msgid "http://www.w3.org/WAI/GL" @@ -102,20 +102,11 @@ msgctxt "STRING_SPECIFIED" msgid "specified" msgstr "" -#, c-format -msgctxt "STRING_UNKNOWN_FILE" -msgid "%s: can't open file \"%s\"\n" -msgstr "" - #, c-format msgctxt "STRING_UNKNOWN_OPTION" msgid "unknown option: %s" msgstr "" -msgctxt "STRING_UNRECZD_OPTION" -msgid "unrecognized option -%c use -help to list options\n" -msgstr "" - msgctxt "STRING_XML_DECLARATION" msgid "XML declaration" msgstr "" @@ -377,31 +368,31 @@ msgstr "" "ayudarnos a localizar HTML Tidy. Para más detalles consulte \n" "https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md \n" -msgctxt "TidyInfoString" +msgctxt "TidyInfo" msgid "Info: " msgstr "" -msgctxt "TidyWarningString" +msgctxt "TidyWarning" msgid "Warning: " msgstr "" -msgctxt "TidyConfigString" +msgctxt "TidyConfig" msgid "Config: " msgstr "" -msgctxt "TidyAccessString" +msgctxt "TidyAccess" msgid "Access: " msgstr "" -msgctxt "TidyErrorString" +msgctxt "TidyError" msgid "Error: " msgstr "" -msgctxt "TidyBadDocumentString" +msgctxt "TidyBadDocument" msgid "Document: " msgstr "" -msgctxt "TidyFatalString" +msgctxt "TidyFatal" msgid "Panic: " msgstr "" @@ -435,6 +426,18 @@ msgctxt "INVALID_NCR" msgid "%s invalid numeric character reference %s" msgstr "" +msgctxt "BAD_SURROGATE_PAIR" +msgid "Have out-of-range surrogate pair U+%04X:U+%04X, replaced with U+FFFD value." +msgstr "" + +msgctxt "BAD_SURROGATE_TAIL" +msgid "Leading (High) surrogate pair U+%04X, with no trailing (Low) entity, replaced with U+FFFD." +msgstr "" + +msgctxt "BAD_SURROGATE_LEAD" +msgid "Trailing (Low) surrogate pair U+%04X, with no leading (High) entity, replaced with U+FFFD." +msgstr "" + #, c-format msgctxt "MISSING_SEMICOLON" msgid "entity \"%s\" doesn't end in ';'" @@ -3004,23 +3007,23 @@ msgid "" "to <\\/g. Set this option to 'no' if you do not want this." msgstr "" -msgctxt "TC_CAT_DIAGNOSTICS" +msgctxt "TidyDiagnostics" msgid "diagnostics" msgstr "" -msgctxt "TC_CAT_ENCODING" +msgctxt "TidyEncoding" msgid "encoding" msgstr "" -msgctxt "TC_CAT_MARKUP" +msgctxt "TidyMarkup" msgid "markup" msgstr "" -msgctxt "TC_CAT_MISC" +msgctxt "TidyMiscellaneous" msgid "misc" msgstr "" -msgctxt "TC_CAT_PRETTYPRINT" +msgctxt "TidyPrettyPrint" msgid "print" msgstr "" diff --git a/localize/translations/language_es_mx.po b/localize/translations/language_es_mx.po index 0fe04b3..5d5e73f 100644 --- a/localize/translations/language_es_mx.po +++ b/localize/translations/language_es_mx.po @@ -5,10 +5,10 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: HTML Tidy poconvert.rb\n" "Project-Id-Version: \n" -"PO-Revision-Date: 2016-03-24 10:59:55\n" +"PO-Revision-Date: 2017-02-17 14:46:38\n" "Last-Translator: jderry\n" "Language-Team: \n" -"BAD" + #. Only translate if a URL to the target language can be found. msgctxt "ACCESS_URL" msgid "http://www.w3.org/WAI/GL" @@ -102,20 +102,11 @@ msgctxt "STRING_SPECIFIED" msgid "specified" msgstr "" -#, c-format -msgctxt "STRING_UNKNOWN_FILE" -msgid "%s: can't open file \"%s\"\n" -msgstr "" - #, c-format msgctxt "STRING_UNKNOWN_OPTION" msgid "unknown option: %s" msgstr "" -msgctxt "STRING_UNRECZD_OPTION" -msgid "unrecognized option -%c use -help to list options\n" -msgstr "" - msgctxt "STRING_XML_DECLARATION" msgid "XML declaration" msgstr "" @@ -377,31 +368,31 @@ msgstr "" "ayudarnos a localizar HTML Tidy. Para más detalles consulte \n" "https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md \n" -msgctxt "TidyInfoString" +msgctxt "TidyInfo" msgid "Info: " msgstr "" -msgctxt "TidyWarningString" +msgctxt "TidyWarning" msgid "Warning: " msgstr "" -msgctxt "TidyConfigString" +msgctxt "TidyConfig" msgid "Config: " msgstr "" -msgctxt "TidyAccessString" +msgctxt "TidyAccess" msgid "Access: " msgstr "" -msgctxt "TidyErrorString" +msgctxt "TidyError" msgid "Error: " msgstr "" -msgctxt "TidyBadDocumentString" +msgctxt "TidyBadDocument" msgid "Document: " msgstr "" -msgctxt "TidyFatalString" +msgctxt "TidyFatal" msgid "Panic: " msgstr "" @@ -435,6 +426,18 @@ msgctxt "INVALID_NCR" msgid "%s invalid numeric character reference %s" msgstr "" +msgctxt "BAD_SURROGATE_PAIR" +msgid "Have out-of-range surrogate pair U+%04X:U+%04X, replaced with U+FFFD value." +msgstr "" + +msgctxt "BAD_SURROGATE_TAIL" +msgid "Leading (High) surrogate pair U+%04X, with no trailing (Low) entity, replaced with U+FFFD." +msgstr "" + +msgctxt "BAD_SURROGATE_LEAD" +msgid "Trailing (Low) surrogate pair U+%04X, with no leading (High) entity, replaced with U+FFFD." +msgstr "" + #, c-format msgctxt "MISSING_SEMICOLON" msgid "entity \"%s\" doesn't end in ';'" @@ -2999,23 +3002,23 @@ msgid "" "to <\\/g. Set this option to 'no' if you do not want this." msgstr "" -msgctxt "TC_CAT_DIAGNOSTICS" +msgctxt "TidyDiagnostics" msgid "diagnostics" msgstr "" -msgctxt "TC_CAT_ENCODING" +msgctxt "TidyEncoding" msgid "encoding" msgstr "" -msgctxt "TC_CAT_MARKUP" +msgctxt "TidyMarkup" msgid "markup" msgstr "" -msgctxt "TC_CAT_MISC" +msgctxt "TidyMiscellaneous" msgid "misc" msgstr "" -msgctxt "TC_CAT_PRETTYPRINT" +msgctxt "TidyPrettyPrint" msgid "print" msgstr "" diff --git a/localize/translations/language_fr.po b/localize/translations/language_fr.po index a8e8761..3f69dfb 100644 --- a/localize/translations/language_fr.po +++ b/localize/translations/language_fr.po @@ -1,26 +1,18 @@ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" -"X-Generator: Poedit 1.8.6\n" -"Project-Id-Version: \n" -"POT-Creation-Date: 2016-01-20 16:30+0100\n" -"Language-Team: \n" -"PO-Revision-Date: \n" -"MIME-Version: 1.0\n" -"Content-Transfer-Encoding: 8bit\n" -"Last-Translator: \n" "Language: fr\n" - -#. Specify the ll or ll_cc language code here. -msgctxt "TIDY_LANGUAGE" -msgid "en" -msgstr "fr" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"X-Generator: HTML Tidy poconvert.rb\n" +"Project-Id-Version: \n" +"PO-Revision-Date: 2017-02-17 14:46:38\n" +"Last-Translator: jderry\n" +"Language-Team: \n" #. Only translate if a URL to the target language can be found. msgctxt "ACCESS_URL" msgid "http://www.w3.org/WAI/GL" -msgstr "http://www.w3.org/WAI/GL" +msgstr "" #. Only translate if a URL to the target language can be found. msgctxt "ATRC_ACCESS_URL" @@ -35,13 +27,14 @@ msgstr "Impossible d'ouvrir « %s »\n" #, c-format msgctxt "LINE_COLUMN_STRING" msgid "line %d column %d - " -msgstr "ligne %d colonne %d - " +msgstr "Ligne: %d Col: %d - " #, c-format msgctxt "STRING_CONTENT_LOOKS" msgid "Document content looks like %s" msgstr "Le contenu du document ressemble à %s" +#. For example, "discarding invalid UTF-16 surrogate pair" msgctxt "STRING_DISCARDING" msgid "discarding" msgstr "dépose" @@ -49,12 +42,13 @@ msgstr "dépose" #, c-format msgctxt "STRING_DOCTYPE_GIVEN" msgid "Doctype given is \"%s\"" -msgstr "Doctype donné est « %s »" +msgstr "DOCTYPE donné est «%s»" +#. The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. #, c-format msgctxt "STRING_ERROR_COUNT" msgid "Tidy found %u %s and %u %s!" -msgstr "Tidy trouvé %u %s et %u %s !" +msgstr "%u %s, %u %s trouvées!" msgctxt "STRING_ERROR_COUNT_ERROR" msgid "error" @@ -69,21 +63,22 @@ msgstr[0] "alarme" msgstr[1] "alarmes" msgctxt "STRING_HELLO_ACCESS" -msgid "Accessibility Checks: Version 0.1" -msgstr "Contrôles d'accessibilité : version 0.1" +msgid "Accessibility Checks:" +msgstr "Contrôles d'accessibilité: version 0.1" +#. This is not a formal name and can be translated. msgctxt "STRING_HTML_PROPRIETARY" msgid "HTML Proprietary" -msgstr "HTML propriétaire" +msgstr "" #, c-format msgctxt "STRING_MISSING_MALFORMED" msgid "missing or malformed argument for option: %s" -msgstr "argument manquant ou incorrect pour l'option : %s" +msgstr "argument manquant ou incorrect pour l'option: %s" msgctxt "STRING_NO_ERRORS" msgid "No warnings or errors were found." -msgstr "Aucun avertissement ou erreur n'a été trouvé." +msgstr "Aucun avertissement ou les erreurs ne trouvées." msgctxt "STRING_NO_SYSID" msgid "No system identifier in emitted doctype" @@ -97,27 +92,20 @@ msgctxt "STRING_PLAIN_TEXT" msgid "plain text" msgstr "le texte brut" +#. For example, "replacing invalid UTF-8 bytes" msgctxt "STRING_REPLACING" msgid "replacing" msgstr "remplaçant" +#. For example, "you should avoid using the specified encoding." msgctxt "STRING_SPECIFIED" msgid "specified" msgstr "spécifié" -#, c-format -msgctxt "STRING_UNKNOWN_FILE" -msgid "%s: can't open file \"%s\"\n" -msgstr "%s : impossible d'ouvrir le fichier « %s »\n" - #, c-format msgctxt "STRING_UNKNOWN_OPTION" msgid "unknown option: %s" -msgstr "option inconnue : %s" - -msgctxt "STRING_UNRECZD_OPTION" -msgid "unrecognized option -%c use -help to list options\n" -msgstr "option non reconnue -%c utiliser -help pour lister les options\n" +msgstr "option inconnue: %s" msgctxt "STRING_XML_DECLARATION" msgid "XML declaration" @@ -145,16 +133,16 @@ msgstr "" "\n" " - D'abord, cherchez à gauche de la position de la cellule de trouver \n" " des cellules d'en-tête de ligne.\n" -"       - Puis cherchez vers le haut pour trouver les cellules d'en-tête \n" +"       - Puis rechercher vers le haut pour trouver les cellules d'en-tête \n" " de colonne.\n" -"       - La recherche dans une direction donnée s'arrête lorsque le bord \n" +"       - La recherche dans une direction donnée arrête lorsque le bord \n" " de la table est atteinte ou lorsque la cellule de données est \n" -" trouvée après une cellule d'en-tête.\n" -"       - Les en-têtes de ligne sont insérés dans la liste dans l'ordre où ils \n" +" trouvé après une cellule d'en-tête.\n" +"       - Têtes de ligne sont insérés dans la liste dans l'ordre où ils \n" " apparaissent dans la table.\n" -"       - Pour les tables de gauche à droite, les en-têtes sont insérés de \n" +"       - Pour les tables de gauche à droite, en-têtes sont insérés de \n" " gauche à droite.\n" -"       - Les en-têtes de colonnes sont insérés après les en-têtes de ligne, dans\n" +"       - Têtes de colonnes sont insérés après-têtes de ligne, dans\n" "         l'ordre où ils apparaissent dans le tableau, de haut en bas.\n" "       - Si une cellule d'en-tête a les têtes ensemble d'attributs, puis \n" " les en-têtes référencée par cet attribut sont insérés dans la \n" @@ -170,18 +158,18 @@ 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\n" msgstr "" -"Les codes de caractères pour les polices Microsoft Windows dans la gamme\n" -"128-159 peuvent ne pas être reconnus sur d'autres plateformes. Il est\n" -"recommandé d'utiliser à la place les entités nommées, par exemple ™ \n" -"plutôt que le code de caractères 153 de Windows (0x2122 en Unicode). Notez\n" -"qu'à partir de février 1998 quelques navigateurs supportent les nouvelles \n" +"Personnages codes pour les polices Microsoft Windows dans la gamme\n" +"128-159 ne pas être reconnus sur d'autres plateformes. Vous êtes\n" +"au lieu recommandé d'utiliser les entités nommées, par exemple ™ \n" +"plutôt code que Windows de caractères 153 (0x2122 en Unicode). Notez que\n" +"à partir de Février 1998 quelques navigateurs supportent les nouvelles \n" "entités.\n" "\n" #. This console output should be limited to 78 characters per line. +#. - %s represents a string-encoding name which may be localized in your language. #, c-format msgctxt "TEXT_VENDOR_CHARS" msgid "" @@ -191,26 +179,30 @@ msgid "" "use named entities, e.g. ™.\n" "\n" msgstr "" -"Il est peu probable que des encodages spécifiques à un fournisseur ou à un\n" -"système fonctionnent assez largement sur le World Wide Web ; vous devriez\n" -"éviter d'utiliser le codage de caractères %s, à la place il est recommandé \n" -"d'utiliser des entités nommées, par exemple ™.\n" +"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 " +"%s codage de caractères de $, à la place il est recommandé \n" +"de utiliser entités nommées, par exemple ™.\n" #. This console output should be limited to 78 characters per line. +#. - %s represents a string-encoding name which may be localized in your language. +#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. #, c-format msgctxt "TEXT_SGML_CHARS" msgid "" "Character codes 128 to 159 (U+0080 to U+009F) are not allowed in HTML;\n" "even if they were, they would likely be unprintable control characters.\n" -"Tidy assumed you wanted to refer to a character with the same byte value in \n" -"the %s encoding and replaced that reference with the Unicode equivalent.\n" +"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 s'ils l'étaient, ils seraient probablement des caractères\n" -"de contrôle non imprimables. Tidy a supposé que vous vouliez faire référence\n" -"à un caractère avec la même valeur d'octet dans l'encodage %s et remplacé\n" -"cette référence avec l'équivalent Unicode.\n" +"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" +"caractères non imprimables de contrôle.\n" +"Tidy supposé que vous vouliez faire référence à un personnage avec la même valeur " +"d'octet\n" +"l'encodage %s et remplacé cette référence avec l'équivalent Unicode.\n" "\n" #. This console output should be limited to 78 characters per line. @@ -227,15 +219,16 @@ msgid "" "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 dans l'annexe D de la norme ISO/CEI 10646-1:2000\n " -"permet également l'utilisation de séquences de cinq et six octets pour\n" -"coder des caractères qui sont en dehors de la gamme de l'ensemble des\n" -"caractères Unicode ; ces séquences de cinq et six octets sont illégales\n" -"pour l'utilisation de l'UTF-8 comme transformation de caractères Unicode.\n" -"L'ISO/CEI 10646 ne permet pas la cartographie des substituts non appariés,\n" -"ni U+FFFE et U+FFFF (mais il permet d'autres non-caractères). Pour plus\n" -"d'informations veuillez vous référer à\n" +"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 " +"également\n" +"permet l'utilisation de séquences de cinq et six octets pour coder\n" +"des personnages qui sont en dehors de la gamme de l'ensemble de caractères Unicode;\n" +"ces séquences de cinq et six octets sont illégales pour l'utilisation de\n" +"UTF-8 comme une transformation de caractères Unicode. ISO / IEC 10646\n" +"ne permet pas la cartographie des substituts non appariés, ni U + FFFE et U + FFFF\n" +"(mais il ne permet d'autres non-caractères). Pour plus d'informations s'il vous " +"plaît se référer à\n" "http://www.unicode.org/ et http://www.cl.cam.ac.uk/~mgk25/unicode.html\n" "\n" @@ -248,14 +241,16 @@ msgid "" "http://www.unicode.org/ and http://www.cl.cam.ac.uk/~mgk25/unicode.html\n" "\n" msgstr "" -"Les codes de caractères UTF-16 doivent être dans la gamme U+0000 à U+10FFFF.\n" -"La définition de l'UTF-16 dans l'annexe C de l'ISO/CEI 10646-1:2000\n" -"n'autorise pas le mappage des substituts non appariés. Pour plus\n" -"d'informations, veuillez vous référer à\n" -"http://www.unicode.org/ et http://www.cl.cam.ac.uk/~mgk25/unicode.html\n" +"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 " +"le\n" +"mappage des substituts non appariés. Pour plus d'informations, veuillez vous " +"référer\n" +"à http://www.unicode.org/ et http://www.cl.cam.ac.uk/~mgk25/unicode.html\n" "\n" #. This console output should be limited to 78 characters per line. +#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. msgctxt "TEXT_INVALID_URI" msgid "" "URIs must be properly escaped, they must not contain unescaped\n" @@ -268,14 +263,14 @@ msgid "" "http://www.w3.org/International/O-URL-and-ident.html\n" "\n" msgstr "" -"Les URI doivent être correctement protégées, elles ne doivent pas contenir\n" -"de caractères inférieurs à U+0021 non échappés, y compris le caractère\n" -"d'espace et ceux inférieurs à U+007E. Tidy échappe l'URI pour vous comme\n" -"recommandé par HTML 4.01 section B.2.1 et XML 1.0 section 4.2.2. Certains\n" -"agents utilisateurs utilisent un autre algorithme pour échapper ces URI et\n" -"certains scripts du côté du serveur dépendent de cela. Si vous voulez\n" -"compter sur cela, vous devez échapper l'URI vous-même. Pour plus\n" -"d'informations, veuillez vous référer à\n" +"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" +"ci-dessus U + 007E. Tidy échappe à l'URI pour vous comme recommandé par\n" +"HTML 4.01 section B.2.1 et XML 1.0 section 4.2.2. Certains agents utilisateurs\n" +"utiliser un autre algorithme pour échapper à ces URI et un serveur-verso\n" +"scripts dépendent de cela. Si vous voulez compter sur cela, vous devez\n" +"échapper à l'URI sur votre propre. Pour plus d'informations s'il vous plaît se " +"référer à\n" "http://www.w3.org/International/O-URL-and-ident.html\n" "\n" @@ -290,12 +285,12 @@ msgid "" "table! Note that one form can't be nested inside another!\n" "\n" msgstr "" -"Vous devrez peut-être déplacer
ou
ou les deux balises.\n" -"Les éléments HTML doivent être correctement imbriquées et les éléments\n" -"de formulaire ne font pas exception. Par exemple, vous ne devez pas placer\n" -"
dans une cellule et
dans une autre. Si
est placé\n" -"avant une table,
ne peut pas être placé à l'intérieur de la table !\n" -"Notez qu'un formulaire ne peut pas être imbriqué dans un autre !\n" +"Vous devrez peut-être déplacer un ou deux de la
et
\n" +"tags. Éléments HTML doivent être correctement imbriquées et les éléments\n" +"de formulaire ne font pas exception. Par exemple, vous ne devez pas placer la\n" +"
dans une cellule et la
dans un autre. Si le
est placé\n" +"devant une table, le
ne peut pas être placé à l'intérieur de la table !\n" +"Notez qu'une forme ne peut pas être imbriquée dans un autre !\n" "\n" #. This console output should be limited to 78 characters per line. @@ -305,9 +300,8 @@ msgid "" "Subsequent
elements have been discarded, which may\n" "render the document invalid.\n" msgstr "" -"Un seul élément
est autorisé dans un document.\n" -"Les éléments
suivants ont été supprimés, ce qui peut\n" -"rendre le document invalide.\n" +"Qu'un seul
élément est autorisé dans un document.\n" +"Les
éléments ont été jetées, qui peut invalider le document\n" "\n" #. This console output should be limited to 78 characters per line. @@ -376,7 +370,7 @@ msgstr "" #. This console output should be limited to 78 characters per line. msgctxt "TEXT_USING_FRAMES" msgid "" -"Pages designed using frames presents problems for\n" +"Pages designed using frames present problems for\n" "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" @@ -399,6 +393,7 @@ msgstr "" "accessibles, voir 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. msgctxt "TEXT_ACCESS_ADVICE2" msgid " and http://www.html-tidy.org/accessibility/" msgstr "et http://www.html-tidy.org/Accessibility/" @@ -465,6 +460,7 @@ msgstr "" "couleurs\n" #. This console output should be limited to 78 characters per line. +#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. msgctxt "TEXT_NEEDS_INTERVENTION" msgid "" "This document has errors that must be fixed before\n" @@ -476,6 +472,7 @@ msgstr "" "\n" #. This console output should be limited to 78 characters per line. +#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. msgctxt "TEXT_GENERAL_INFO" msgid "" "About HTML Tidy: https://github.com/htacg/tidy-html5\n" @@ -485,14 +482,16 @@ msgid "" "Validate your HTML documents: http://validator.w3.org/nu/\n" "Lobby your company to join the W3C: http://www.w3.org/Consortium\n" msgstr "" -"A propos de HTML Tidy : https://github.com/htacg/tidy-html5\n" -"Rapports de bugs et commentaires : https://github.com/htacg/tidy-html5/issues\n" -"Liste officielle de diffusion : https://lists.w3.org/Archives/Public/public-htacg/\n" -"Dernière spécification HTML : http://dev.w3.org/html5/spec-author-view/\n" -"Validez vos documents HTML : http://validator.w3.org/nu/\n" -"Incitez votre entreprise à rejoindre le W3C : http://www.w3.org/Consortium\n" +"A propos de HTML Tidy: https://github.com/htacg/tidy-html5\n" +"Les rapports de bugs et commentaires: https://github.com/htacg/tidy-html5/issues\n" +"Liste officielle de diffusion: https://lists.w3.org/Archives/Public/public-htacg/\n" +"Spécification HTML dernière: http://dev.w3.org/html5/spec-author-view/\n" +"Validez vos documents HTML: http://validator.w3.org/nu/\n" +"Hall de votre entreprise à rejoindre le W3C: http://www.w3.org/Consortium\n" +"\n" #. This console output should be limited to 78 characters per line. +#. - The strings "Tidy" and "HTML Tidy" are the program name and must not be translated. msgctxt "TEXT_GENERAL_INFO_PLEA" msgid "" "\n" @@ -502,37 +501,37 @@ msgid "" msgstr "" "\n" "Parlez-vous une langue autre que l'anglais ou une autre variante de\n" -"l'anglais ? Pensez à nous aider à traduire HTML Tidy. Pour plus de détails " -"consultez \n" +"Anglais? Considérez-nous aidant à localiser HTML Tidy. Pour plus de détails s'il " +"vous plaît voir\n" "https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n" -msgctxt "TidyInfoString" +msgctxt "TidyInfo" msgid "Info: " -msgstr "Info : " +msgstr "Info:" -msgctxt "TidyWarningString" +msgctxt "TidyWarning" msgid "Warning: " -msgstr "Attention : " +msgstr "Attention:" -msgctxt "TidyConfigString" +msgctxt "TidyConfig" msgid "Config: " -msgstr "Config : " +msgstr "Config:" -msgctxt "TidyAccessString" +msgctxt "TidyAccess" msgid "Access: " -msgstr "Accès : " +msgstr "Accès:" -msgctxt "TidyErrorString" +msgctxt "TidyError" msgid "Error: " -msgstr "Erreur : " +msgstr "Erreur:" -msgctxt "TidyBadDocumentString" +msgctxt "TidyBadDocument" msgid "Document: " -msgstr "Document : " +msgstr "Document:" -msgctxt "TidyFatalString" +msgctxt "TidyFatal" msgid "Panic: " -msgstr "Panique : " +msgstr "Panique:" #, c-format msgctxt "ENCODING_MISMATCH" @@ -542,50 +541,62 @@ msgstr "codage d'entrée spécifiée (%s) ne correspond pas réelle encodage d'e #, c-format msgctxt "VENDOR_SPECIFIC_CHARS" msgid "%s invalid character code %s" -msgstr "%s de code de caractère invalide %s" +msgstr "%s de code de caractère invalide l'%s" #, c-format msgctxt "INVALID_SGML_CHARS" msgid "%s invalid character code %s" -msgstr "%s de code de caractère invalide %s" +msgstr "%s de code de caractère invalide l'%s" #, c-format msgctxt "INVALID_UTF8" msgid "%s invalid UTF-8 bytes (char. code %s)" -msgstr "%s octets UTF-8 invalides (code de caractères %s)" +msgstr "%s invalides octets UTF-8 de (char. codes %s)" #, c-format msgctxt "INVALID_UTF16" msgid "%s invalid UTF-16 surrogate pair (char. code %s)" -msgstr "paire de substitution non valide UTF-16 (code de caractères %s) %s" +msgstr "paire de substitution non valide UTF-16 (code de caract. %s) %s" #, c-format msgctxt "INVALID_NCR" msgid "%s invalid numeric character reference %s" -msgstr "%s référence de caractère numérique non valide de %s" +msgstr "Référence de caractère numérique non valide de %s %s" + +msgctxt "BAD_SURROGATE_PAIR" +msgid "Have out-of-range surrogate pair U+%04X:U+%04X, replaced with U+FFFD value." +msgstr "" + +msgctxt "BAD_SURROGATE_TAIL" +msgid "Leading (High) surrogate pair U+%04X, with no trailing (Low) entity, replaced with U+FFFD." +msgstr "" + +msgctxt "BAD_SURROGATE_LEAD" +msgid "Trailing (Low) surrogate pair U+%04X, with no leading (High) entity, replaced with U+FFFD." +msgstr "" #, c-format msgctxt "MISSING_SEMICOLON" msgid "entity \"%s\" doesn't end in ';'" -msgstr "l'entité « %s » ne s'arrête pas à « ; »" +msgstr "entité « %s » ne s'arrête pas à «; »" #, c-format msgctxt "MISSING_SEMICOLON_NCR" msgid "numeric character reference \"%s\" doesn't end in ';'" -msgstr "Référence de caractère numérique « %s » ne se termine pas par « ; »" +msgstr "Référence de caractère numérique « %s » n'est pas se terminer par «; »" msgctxt "UNESCAPED_AMPERSAND" msgid "unescaped & which should be written as &" -msgstr "« & » sans séquence d'échappement ; devrait être écrit comme &" +msgstr "sans séquence d'échappement & qui devrait être écrit comme &" #, c-format msgctxt "UNKNOWN_ENTITY" msgid "unescaped & or unknown entity \"%s\"" -msgstr "« & » sans séquence d'échappement ou entité inconnue « %s »" +msgstr "sans séquence d'échappement & ou entité inconnue « %s »" msgctxt "APOS_UNDEFINED" msgid "named entity ' only defined in XML/XHTML" -msgstr "entité nommée « ' » ; seulement définie en XML/XHTML" +msgstr "nommée l'entité ' seulement défini en XML/XHTML" #, c-format msgctxt "INSERTING_ATTRIBUTE" @@ -600,17 +611,27 @@ msgstr "%s insérer l'attribut « %s », à l'aide de la valeur « %s »" #, c-format msgctxt "MISSING_ATTR_VALUE" msgid "%s attribute \"%s\" lacks value" -msgstr "L'attribut %s a une valeur non valide « %s »" +msgstr "L'attribut %s a une valeur non valide \"%s\"" #, c-format msgctxt "UNKNOWN_ATTRIBUTE" msgid "%s unknown attribute \"%s\"" -msgstr "L'attribut %s a une valeur non valide « %s »" +msgstr "L'attribut %s a une valeur non valide \"%s\"" #, c-format msgctxt "PROPRIETARY_ATTRIBUTE" msgid "%s proprietary attribute \"%s\"" -msgstr "L'attribut %s a une valeur non valide « %s »" +msgstr "L'attribut %s a une valeur non valide \"%s\"" + +#, c-format +msgctxt "MISMATCHED_ATTRIBUTE_ERROR" +msgid "%s attribute \"%s\" not allowed for %s" +msgstr "" + +#, c-format +msgctxt "MISMATCHED_ATTRIBUTE_WARN" +msgid "%s attribute \"%s\" not allowed for %s" +msgstr "" #, c-format msgctxt "JOINING_ATTRIBUTE" @@ -620,7 +641,7 @@ msgstr "%s rejoignant les valeurs d'attribut répétée « %s »" #, c-format msgctxt "XML_ATTRIBUTE_VALUE" msgid "%s has XML attribute \"%s\"" -msgstr "L'attribut %s a une valeur non valide « %s »" +msgstr "L'attribut %s a une valeur non valide \"%s\"" #, c-format msgctxt "XML_ID_SYNTAX" @@ -640,12 +661,12 @@ msgstr "valeur d'attribut propriétaire de %s « %s »" #, c-format msgctxt "ANCHOR_NOT_UNIQUE" msgid "%s anchor \"%s\" already defined" -msgstr "%s anchor « %s » déjà défini" +msgstr "%s anchor \"%s\" déjà défini" #, c-format msgctxt "BAD_ATTRIBUTE_VALUE" msgid "%s attribute \"%s\" has invalid value \"%s\"" -msgstr "L'attribut %s « %s » a une valeur non valide « %s »" +msgstr "L'attribut %s \"%s\" a une valeur non valide \"%s\"" #, c-format msgctxt "BAD_ATTRIBUTE_VALUE_REPLACED" @@ -670,7 +691,7 @@ msgstr "%s ne peut pas copier le nom attribut id" #, c-format msgctxt "UNEXPECTED_GT" msgid "%s missing '>' for end of tag" -msgstr "manquant '>' pour tag : %s" +msgstr "manquant '>' pour tag: %s" #, c-format msgctxt "UNEXPECTED_QUOTEMARK" @@ -735,7 +756,7 @@ msgstr "%s doivent utiliser côté client image map" #, c-format msgctxt "MISSING_ATTRIBUTE" msgid "%s lacks \"%s\" attribute" -msgstr "%s manque attribut « %s »" +msgstr "%s manque attribut \"%s\"" #, c-format msgctxt "NESTED_EMPHASIS" @@ -744,36 +765,27 @@ msgstr "accent imbriquée %s" msgctxt "NESTED_QUOTATION" msgid "nested q elements, possible typo." -msgstr "éléments « q » imbriqués, peut-être une faute de frappe." +msgstr "imbriqué \"q\" éléments, typo possible" #, c-format msgctxt "OBSOLETE_ELEMENT" msgid "replacing obsolete element %s with %s" -msgstr "remplacement de l'élément obsolète %s par %s" +msgstr "remplaçant élément obsolète %s avec %s" #, c-format msgctxt "COERCE_TO_ENDTAG_WARN" msgid "<%s> is probably intended as " -msgstr "<%s> devrait probablement être " +msgstr "<%s> est probablement destinée en tant que " #, c-format msgctxt "REMOVED_HTML5" msgid "%s element removed from HTML5" -msgstr "L'élément de %s a été retiré de l'HTML5" - -msgctxt "BAD_BODY_HTML5" -msgid "Found attribute on body that is obsolete in HTML5. Use CSS" -msgstr "Trouvé attribut sur le qui est obsolète dans HTML5. Utilisez du CSS" - -#, c-format -msgctxt "BAD_ALIGN_HTML5" -msgid "The align attribute on the %s element is obsolete. Use CSS" -msgstr "L'attribut align sur l'élément du %s est obsolète. Utilisez du CSS" +msgstr "L'élément de %s retiré HTML5" #, c-format msgctxt "BAD_SUMMARY_HTML5" msgid "The summary attribute on the %s element is obsolete in HTML5" -msgstr "L'attribut summary sur l'élément %s est obsolète en HTML5" +msgstr "L'attribut summary sur l'élément du %s est obsolète dans HTML5" #, c-format msgctxt "TRIM_EMPTY_ELEMENT" @@ -783,7 +795,7 @@ msgstr "rognage vide %s" #, c-format msgctxt "REPLACING_ELEMENT" msgid "replacing %s with %s" -msgstr "remplacement de %s par %s" +msgstr "remplaçant %s avec %s" #, c-format msgctxt "COERCE_TO_ENDTAG" @@ -855,6 +867,16 @@ msgctxt "PROPRIETARY_ELEMENT" msgid "%s is not approved by W3C" msgstr "%s n'est pas approuvé par le W3C" +#, c-format +msgctxt "ELEMENT_VERS_MISMATCH_ERROR" +msgid "%s element not available in %s" +msgstr "" + +#, c-format +msgctxt "ELEMENT_VERS_MISMATCH_WARN" +msgid "%s element not available in %s" +msgstr "" + #, c-format msgctxt "ILLEGAL_NESTING" msgid "%s shouldn't be nested" @@ -964,641 +986,541 @@ msgctxt "PREVIOUS_LOCATION" msgid "<%s> previously mentioned" msgstr "<%s> précédemment mentionnés" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_MISSING_ALT" msgid "[1.1.1.1]: missing 'alt' text." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_ALT_SUSPICIOUS_FILENAME" msgid "[1.1.1.2]: suspicious 'alt' text (filename)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_ALT_SUSPICIOUS_FILE_SIZE" msgid "[1.1.1.3]: suspicious 'alt' text (file size)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_ALT_SUSPICIOUS_PLACEHOLDER" msgid "[1.1.1.4]: suspicious 'alt' text (placeholder)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_ALT_SUSPICIOUS_TOO_LONG" msgid "[1.1.1.10]: suspicious 'alt' text (too long)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_MISSING_LONGDESC_DLINK" msgid "[1.1.2.1]: missing 'longdesc' and d-link." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_MISSING_DLINK" msgid "[1.1.2.2]: missing d-link." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_MISSING_LONGDESC" msgid "[1.1.2.3]: missing 'longdesc'." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "IMG_BUTTON_MISSING_ALT" msgid "[1.1.3.1]: (button) missing 'alt' text." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "APPLET_MISSING_ALT" msgid "[1.1.4.1]: missing alternate content." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "OBJECT_MISSING_ALT" msgid "[1.1.5.1]: missing alternate content." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AUDIO_MISSING_TEXT_WAV" msgid "[1.1.6.1]: audio missing text transcript (wav)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AUDIO_MISSING_TEXT_AU" msgid "[1.1.6.2]: audio missing text transcript (au)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AUDIO_MISSING_TEXT_AIFF" msgid "[1.1.6.3]: audio missing text transcript (aiff)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AUDIO_MISSING_TEXT_SND" msgid "[1.1.6.4]: audio missing text transcript (snd)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AUDIO_MISSING_TEXT_RA" msgid "[1.1.6.5]: audio missing text transcript (ra)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AUDIO_MISSING_TEXT_RM" msgid "[1.1.6.6]: audio missing text transcript (rm)." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "FRAME_MISSING_LONGDESC" msgid "[1.1.8.1]: may require 'longdesc'." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "AREA_MISSING_ALT" msgid "[1.1.9.1]: missing 'alt' text." msgstr "" -#. Translator, please ignore following: ##SUPPORT_ACCESSIBILITY_CHECKS## msgctxt "SCRIPT_MISSING_NOSCRIPT" msgid "[1.1.10.1]: