Continue the documentation effort!
- Many, many updates to the public header files. - tidyenum.h was reorganized substantially in order to better generate documentation with Doxygen. - This was also a good time to clean up all of the various enums for languages and strings. Everything is simple and in a single enum now, other than a couple of cases (TidyOptionId, for example, doesn't need to be redefined). - A full and complete audit of the strings meant some opportunities to delete useless strings. - Reorganized the order of the strings in language_en.h in order to better find things when programmers want to make changes. There are a lot fewer internal "sections" now, and everything has been painstakingly sorted within the remaining sections. - Consequently rebased all of the PO's, POT, and other language files. - Updated several of the READMEs with the newest information. - Made the READMEs easier to copy into the Doxygen project by changing some of the code format for compatibility, mainly the use of tildes instead of backslashes for code blocks. - Added tidyGetMessageCode() to message API. Despite the huge diff, this is the only externally-visible change, other than removing some enums (but not their values!). - Passing `next` tests on Mac, Linux, Win10.
This commit is contained in:
parent
8de67cf4d6
commit
5f05add439
|
@ -66,7 +66,7 @@ All of the information above is useful for anyone who wants to browse Tidy's sou
|
||||||
|
|
||||||
## Behind the scenes
|
## Behind the scenes
|
||||||
|
|
||||||
The first thing we need to do is have the internal version of the function that we want to add. Tidy has module that handles localization: `language.h/c`. In the header is where we define the interface to LibTidy, which should be namespaced according to the discussion above. We can declare:
|
The first thing we need to do is have the internal version of the function that we want to add. Tidy has a module that handles localization: `language.h/c`. In the header is where we define the interface to LibTidy, which should be namespaced according to the discussion above. We can declare:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
ctmbstr TY_(tidyLocalizedString)( uint messageType );
|
ctmbstr TY_(tidyLocalizedString)( uint messageType );
|
||||||
|
@ -78,7 +78,7 @@ Now you have a decision to make: if you plan to use this function internally, yo
|
||||||
|
|
||||||
## The API
|
## The API
|
||||||
|
|
||||||
Once implemented, we want a pretty, public-facing name for our `tidyLocalizedString()` function, which appropriate is `tidyLocalizedString()`. Add the declaration to `tidy.h`:
|
Once implemented, we want a pretty, public-facing name for our `tidyLocalizedString()` function, which appropriately is `tidyLocalizedString()`. Add the declaration to `tidy.h`:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
TIDY_EXPORT ctmbstr TIDY_CALL tidyLocalizedString( uint messageType );
|
TIDY_EXPORT ctmbstr TIDY_CALL tidyLocalizedString( uint messageType );
|
||||||
|
@ -102,4 +102,3 @@ For a more complicated example that demonstrates how to use opaque types (and al
|
||||||
- implement iteration for structures with multiple records.
|
- implement iteration for structures with multiple records.
|
||||||
- write a function in `tidylib.c` that converts between the exposed, opaque type and the internal, implementation type.
|
- write a function in `tidylib.c` that converts between the exposed, opaque type and the internal, implementation type.
|
||||||
- further reinforce how functionality is added to the API.
|
- further reinforce how functionality is added to the API.
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@ Tidy’s large number of attributes are supported via number of files:
|
||||||
|
|
||||||
So, to add a new `attribute=value`, on one or more existing tags, consists of the following simple steps -
|
So, to add a new `attribute=value`, on one or more existing tags, consists of the following simple steps -
|
||||||
|
|
||||||
1. `tidyenum.h` - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. While there were some initial steps to keep this `TidyAttrId` enumeration alphabetic, now just add the new `TidyAttr_XXXX` just before the last entry `N_TIDY_ATTRIBS`.
|
1. `tidyenum.h` - Give the attribute an internal name, like `TidyAttr_XXXX`, and thus a value. Please try to keep this enumeration in alphabetical order.
|
||||||
|
|
||||||
2. `attrs.c` - Assign the string value of the attribute. Of course this must be unique. And then assign a `function` to verify the attribute value. There are already a considerable number of defined functions to verify specific attribute values, but maybe this new attribute requires a new function, so that should be written, and defined.
|
2. `attrs.c` - Assign the string value of the attribute. Of course this must be unique. And then assign a `function` to verify the attribute value. There are already a considerable number of defined functions to verify specific attribute values, but maybe this new attribute requires a new function, so that should be written, and defined.
|
||||||
|
|
||||||
3. `attrdict.c` - If this attribute only relates to specific tags, then it should be added to their list. There are some general attributes that are allowed on every, or most tags, so this new attribute and value should be added accordingly.
|
3. `attrdict.c` - If this attribute only relates to specific tags, then it should be added to their list. There are some general attributes that are allowed on every, or most tags, so this new attribute and value should be added accordingly.
|
||||||
|
|
||||||
4. `tags.c` - Now the new attribute will be verified for each tag it is associate with in the `tag_defs[]` table. Like for example the `<button ...>`, `{ TidyTag_BUTTON, ...` has `&TY_(W3CAttrsFor_BUTTON)[0]` assigned.
|
4. `tags.c` - Now the new attribute will be verified for each tag it is associated with in the `tag_defs[]` table. Like for example the `<button ...>`, `{ TidyTag_BUTTON, ...` has `&TY_(W3CAttrsFor_BUTTON)[0]` assigned.
|
||||||
|
|
||||||
So, normally, just changing 3 files, `tidyenum.h`, `attrs.c`, and `attrdict.c`, will already adjust `tags.c` to accept a new `attribute=value` for any tag, or all tags. Simple...
|
So, normally, just changing 3 files, `tidyenum.h`, `attrs.c`, and `attrdict.c`, will already adjust `tags.c` to accept a new `attribute=value` for any tag, or all tags. Simple...
|
||||||
|
|
||||||
|
|
|
@ -45,18 +45,18 @@ See the `CMakeLists.txt` file for other CMake **options** offered.
|
||||||
Due to API changes in the PHP source, `buffio.h` needs to be renamed to `tidybuffio.h` in the file `ext/tidy/tidy.c` in PHP's source.
|
Due to API changes in the PHP source, `buffio.h` needs to be renamed to `tidybuffio.h` in the file `ext/tidy/tidy.c` in PHP's source.
|
||||||
|
|
||||||
That is - prior to configuring PHP run this in the PHP source directory:
|
That is - prior to configuring PHP run this in the PHP source directory:
|
||||||
```
|
~~~
|
||||||
sed -i 's/buffio.h/tidybuffio.h/' ext/tidy/*.c
|
sed -i 's/buffio.h/tidybuffio.h/' ext/tidy/*.c
|
||||||
```
|
~~~
|
||||||
|
|
||||||
And then continue with (just an example here, use your own PHP config options):
|
And then continue with (just an example here, use your own PHP config options):
|
||||||
|
|
||||||
```
|
~~~
|
||||||
./configure --with-tidy=/usr/local
|
./configure --with-tidy=/usr/local
|
||||||
make
|
make
|
||||||
make test
|
make test
|
||||||
make install
|
make install
|
||||||
```
|
~~~
|
||||||
|
|
||||||
[1]: http://git-scm.com/book/en/v2/Getting-Started-Installing-Git
|
[1]: http://git-scm.com/book/en/v2/Getting-Started-Installing-Git
|
||||||
[2]: http://www.cmake.org/download/
|
[2]: http://www.cmake.org/download/
|
||||||
|
|
|
@ -4,18 +4,23 @@ Tidy has quite complex warning/error messaging system. This is all about adding
|
||||||
|
|
||||||
First assign the message a key value. This is done in `tidyenum.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. `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.
|
1. `tidyStrings` - starts with the value `TIDYSTRINGS_FIRST = 500`, and it must be first. This is the list of all strings available in Tidy with the exception of strings provided by other enumerations. **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.
|
2. `TidyOptionId` - You probably won't need this unless you're adding new options, and there's another readme for that.
|
||||||
|
|
||||||
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.
|
3. `TidyConfigCategory` - You probably won't need this, either, unless you're adding a whole new category for options.
|
||||||
|
|
||||||
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.
|
4. `TidyReportLevel` - And you probably won't need this, either.
|
||||||
|
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
As mentioned above, `tidyStrings` messages must be defined in one of the existing macros named like `FOREACH_...(FN)`, such as `FOREACH_DIALOG_MSG(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
|
## 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 macro beginning `FOREACH_MSG_ENCODING(FN)`.
|
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 `tidyStrings` enum, and they fit into nicely into the macro beginning `FOREACH_DIALOG_MSG(FN)`. Please look at the comments for the category which indicates which output routine is used to generate the error, and keep this list in order!
|
||||||
|
|
||||||
|
|
||||||
## Step 2
|
## Step 2
|
||||||
|
@ -24,7 +29,7 @@ The next step is adding a `format` string to `language_en.h`. This string may la
|
||||||
|
|
||||||
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.
|
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**.
|
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. Please don't use `printf` for message output within **libTidy**.
|
||||||
|
|
||||||
|
|
||||||
eof;
|
eof;
|
||||||
|
|
|
@ -4,24 +4,24 @@ Tidy supports a quite large number of configuration options. The full list can b
|
||||||
|
|
||||||
The options can also be listed in xml format. `-xml-help` will output each option plus a description. `-xml-config` will not only output the option and a desciption, but will include the type, default and examples. These xml outputs are used, with the aid of `xsltproc` and `doxygen`, to generate the [API Documentation](http://api.html-tidy.org/).
|
The options can also be listed in xml format. `-xml-help` will output each option plus a description. `-xml-config` will not only output the option and a desciption, but will include the type, default and examples. These xml outputs are used, with the aid of `xsltproc` and `doxygen`, to generate the [API Documentation](http://api.html-tidy.org/).
|
||||||
|
|
||||||
These options can also be used by application linking with **`libtidy`**. For each option there is a `TidyOptionId` enumeration in the `tidyenum.h` file, and get/set functions for each option type.
|
These options can also be used by application linking with `libtidy`. For each option there is a `TidyOptionId` enumeration in the `tidyenum.h` file, and get/set functions for each option type.
|
||||||
|
|
||||||
This file indicates how to add a new option to tidy, here adding an option `TidyEscapeScripts`. In essence it consists of 4 steps:
|
This file indicates how to add a new option to tidy, here adding an option `TidyEscapeScripts`. In essence it consists of 4 steps:
|
||||||
|
|
||||||
1. Add the option **`ID`** to `tidyenum.h`.
|
1. Add the option `ID` to `tidyenum.h`.
|
||||||
2. Add to the **`table`** `TidyOptionImpl option_defs[]` in `config.c`
|
2. Add to the `table` `TidyOptionImpl option_defs[]` in `config.c`
|
||||||
3. Add the id, with a **`description`** to `language_en.h`
|
3. Add the id, with a `description` to `language_en.h`
|
||||||
4. Use the option in the code.
|
4. Use the option in the code.
|
||||||
|
|
||||||
#### 1. Option ID
|
#### 1. Option ID
|
||||||
|
|
||||||
In `tidyenum.h` the `TidyOptionId` can be in any order, but normally a new option would be added just before the last `N_TIDY_OPTIONS`, which must remain the last. Choosing the id name can be any string, but by convention it will commence with `Tidy` followed by brief descriptive text.
|
In `tidyenum.h` the `TidyOptionId` can be in any order, but please try to keep things alphabetical, and keep in mind that `N_TIDY_OPTIONS` must remain the last. Choosing the id name can be any string, but by convention it will commence with `Tidy` followed by brief descriptive text.
|
||||||
|
|
||||||
Naturally it can not be the same as any exisitng option. That is, it must be unique. And it will be followed by a brief descriptive special doxygen formatted comment. So for this new option I have chosen -
|
Naturally it can not be the same as any exisitng option. That is, it must be unique. And it will be followed by a brief descriptive special doxygen formatted comment. So for this new option I have chosen -
|
||||||
|
|
||||||
```
|
~~~
|
||||||
TidyEscapeScripts, /**< Escape items that look like closing tags */
|
TidyEscapeScripts, /**< Escape items that look like closing tags */
|
||||||
```
|
~~~
|
||||||
|
|
||||||
#### 2. Table Definition
|
#### 2. Table Definition
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ In `config.c`, added in `TidyOptionImpl option_defs[]`. Again it can be in any o
|
||||||
|
|
||||||
The structure definition of the table entries is simple -
|
The structure definition of the table entries is simple -
|
||||||
|
|
||||||
```
|
~~~
|
||||||
struct _tidy_option
|
struct _tidy_option
|
||||||
{
|
{
|
||||||
TidyOptionId id;
|
TidyOptionId id;
|
||||||
|
@ -41,93 +41,94 @@ struct _tidy_option
|
||||||
const ctmbstr* pickList; /* pick list */
|
const ctmbstr* pickList; /* pick list */
|
||||||
ctmbstr pdflt; /* default for TidyString */
|
ctmbstr pdflt; /* default for TidyString */
|
||||||
};
|
};
|
||||||
```
|
~~~
|
||||||
|
|
||||||
Naturally it will commence with the above chosen unique **`id`**.
|
Naturally it will commence with the above chosen unique `id`.
|
||||||
|
|
||||||
The **`category`** will be one of this enumeration -
|
The `category` will be one of this enumeration -
|
||||||
|
|
||||||
```
|
~~~
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TidyMarkup, /**< Markup options: (X)HTML version, etc */
|
TidyMarkup, /**< Markup options: (X)HTML version, etc */
|
||||||
TidyDiagnostics, /**< Diagnostics */
|
TidyDiagnostics, /**< Diagnostics */
|
||||||
TidyPrettyPrint, /**< Output layout */
|
TidyPrettyPrint, /**< Output layout */
|
||||||
TidyEncoding, /**< Character encodings */
|
TidyEncoding, /**< Character encodings */
|
||||||
TidyMiscellaneous /**< File handling, message format, etc. */
|
TidyMiscellaneous, /**< File handling, message format, etc. */
|
||||||
|
TidyInternalCategory /**< Option is internal only. */
|
||||||
} TidyConfigCategory;
|
} TidyConfigCategory;
|
||||||
```
|
~~~
|
||||||
|
|
||||||
Care, each of these enumeration strings have been equated to 2 uppercase letters. If you feel there should be another `category` or group then this can be discussed, and added.
|
Care, each of these enumeration strings have been equated to 2 uppercase letters. If you feel there should be another `category` or group then this can be discussed, and added.
|
||||||
|
|
||||||
The **`name`** can be anything, but should try to be somewhat descriptive of the option. Again this string must be unique. It should be lowercase alphanumeric characters, and can contain a `-` separator. Remember this is the name places on the command line, or in a configuration file to set the option.
|
The `name` can be anything, but should try to be somewhat descriptive of the option. Again this string must be unique. It should be lowercase alphanumeric characters, and can contain a `-` separator. Remember this is the name places on the command line, or in a configuration file to set the option.
|
||||||
|
|
||||||
The **`type`** is one of the following enumeration items -
|
The `type` is one of the following enumeration items -
|
||||||
|
|
||||||
```
|
~~~
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
TidyString, /**< String */
|
TidyString, /**< String */
|
||||||
TidyInteger, /**< Integer or enumeration */
|
TidyInteger, /**< Integer or enumeration */
|
||||||
TidyBoolean /**< Boolean flag */
|
TidyBoolean /**< Boolean flag */
|
||||||
} TidyOptionType;
|
} TidyOptionType;
|
||||||
```
|
~~~
|
||||||
|
|
||||||
Care, each of these enumeration strings have been equated to two uppercase letters. If you feel there should be another `type` then this can be discussed, but would require other additional things. And also note the `TidyTriState` is the same as a `TidyInteger` except uses its own parser.
|
Care, each of these enumeration strings have been equated to two uppercase letters. If you feel there should be another `type` then this can be discussed, but would require other additional things. And also note the `TidyTriState` is the same as a `TidyInteger` except uses its own parser.
|
||||||
|
|
||||||
The next item is the **`default`** value for a boolean, tristate or integer. Note tidy set `no=0` and `yes=1` as its own `Bool` enumeration.
|
The next item is the `default` value for a boolean, tristate or integer. Note tidy set `no=0` and `yes=1` as its own `Bool` enumeration.
|
||||||
|
|
||||||
There are a number of **`parser`** for the options. Likewise a number of **`pickList`**. Find another option similar to your new option and use the same values.
|
There are a number of `parser` for the options. Likewise a number of `pickList`. Find another option similar to your new option and use the same values.
|
||||||
|
|
||||||
Presently no options have the final **`default`** string, and it is left out of the table. The compiler will add a NULL.
|
Presently no options have the final `default` string, and it is left out of the table. The compiler will add a NULL.
|
||||||
|
|
||||||
The final table entry added. Note in here the spacing has been compressed, but in the actual code the current column settings should be maintained if possible -
|
The final table entry added. Note in here the spacing has been compressed, but in the actual code the current column settings should be maintained if possible -
|
||||||
|
|
||||||
```
|
~~~
|
||||||
{ TidyEscapeScripts, PP, "escape-scripts", BL, yes, ParseBool, boolPicks[, NULL] }, /* 20160227 - Issue #348 */
|
{ TidyEscapeScripts, PP, "escape-scripts", BL, yes, ParseBool, boolPicks[, NULL] }, /* 20160227 - Issue #348 */
|
||||||
```
|
~~~
|
||||||
|
|
||||||
#### 3. Option Description
|
#### 3. Option Description
|
||||||
|
|
||||||
In `language_en.h`, in the section labelled **Options Documentation**. It can be anywhere, but usually a new option would be added just before the next section labelled **Console Application**.
|
In `language_en.h`, in the section labelled **Options Documentation**. Please try to keep this in alphabetical order.
|
||||||
|
|
||||||
Each entry is a structure with 3 members -
|
Each entry is a structure with 3 members -
|
||||||
```
|
~~~
|
||||||
typedef struct languageDictionaryEntry {
|
typedef struct languageDictionaryEntry {
|
||||||
uint key;
|
uint key;
|
||||||
uint pluralForm;
|
uint pluralForm;
|
||||||
ctmbstr value;
|
ctmbstr value;
|
||||||
} languageDictionaryEntry;
|
} languageDictionaryEntry;
|
||||||
```
|
~~~
|
||||||
|
|
||||||
The **`key`** is the option **`ID`**; The **`pluralForm`** is not used for options, and should be `0`; The **`value`** is the description string.
|
The `key` is the option `ID`; The `pluralForm` is not used for options, and should be `0`; The `value` is the description string.
|
||||||
|
|
||||||
Some care has to be taken with the description string. The only html allowed here is `<code>...</code>`, `<var>...</var>`, `<em>...</em>`, `<strong>...</strong>`, and `<br/>`. Entities, tags, attributes, etc., should be enclosed in `<code>...</code>`. Option values should be enclosed in `<var>...</var>`. It's very important that `<br/>` be self-closing! This string is processed to build the API documentation.
|
Some care has to be taken with the description string. The only html allowed here is `<code>...</code>`, `<var>...</var>`, `<em>...</em>`, `<strong>...</strong>`, and `<br/>`. Entities, tags, attributes, etc., should be enclosed in `<code>...</code>`. Option values should be enclosed in `<var>...</var>`. It's very important that `<br/>` be self-closing! This string is processed to build the API documentation.
|
||||||
|
|
||||||
This is the desription added for this new option.
|
This is the desription added for this new option.
|
||||||
|
|
||||||
```
|
~~~
|
||||||
{
|
{
|
||||||
TidyEscapeScripts, 0,
|
TidyEscapeScripts, 0,
|
||||||
"This option causes items that look like closing tags, like <code></g</code> to be "
|
"This option causes items that look like closing tags, like <code></g</code> to be "
|
||||||
"escaped to <code><\\/g</code>. Set this option to 'no' if you do not want this."
|
"escaped to <code><\\/g</code>. Set this option to 'no' if you do not want this."
|
||||||
},
|
},
|
||||||
```
|
~~~
|
||||||
|
|
||||||
#### 4. Use in Code
|
#### 4. Use in Code
|
||||||
|
|
||||||
This can be added anywhere in the code to change the current code action. While the testing of the option depends on the option type, the most common is `cfgBool( doc, id )`. Here is an example of where this new option is used -
|
This can be added anywhere in the code to change the current code action. While the testing of the option depends on the option type, the most common is `cfgBool( doc, id )`. Here is an example of where this new option is used -
|
||||||
|
|
||||||
```
|
~~~
|
||||||
/*\ if javascript insert backslash before /
|
/*\ if javascript insert backslash before /
|
||||||
* Issue #348 - Add option, escape-scripts, to skip
|
* Issue #348 - Add option, escape-scripts, to skip
|
||||||
\*/
|
\*/
|
||||||
if ((TY_(IsJavaScript)(container)) && cfgBool(doc, TidyEscapeScripts))
|
if ((TY_(IsJavaScript)(container)) && cfgBool(doc, TidyEscapeScripts))
|
||||||
{
|
{
|
||||||
```
|
~~~
|
||||||
|
|
||||||
#### Summary
|
#### Summary
|
||||||
|
|
||||||
That's about it. Just 4 places. Obviously the best idea it to search for an existing option **`ID`**, and follow where it is all defined and used, and copy that. It is not difficult.
|
That's about it. Just 4 places. Obviously the best idea it to search for an existing option `ID`, and follow where it is all defined and used, and copy that. It is not difficult.
|
||||||
|
|
||||||
; eof 20160310
|
; eof 20160310
|
||||||
|
|
|
@ -8,7 +8,7 @@ Note, there are a group of configuration options to add **tags** not yet approve
|
||||||
|
|
||||||
So, adding a new HTML **tag** consists of the following simple steps:
|
So, adding a new HTML **tag** consists of the following simple steps:
|
||||||
|
|
||||||
1. `tidyenum.h` - Give the element an internal name, like `TidyTag_XXXX`, and thus a value. While there were some initial steps to keep this `TidyTagId` enumeration alphabetic, now just add the new `TidyTag_XXXX` just before the last entry `N_TIDY_TAGS`.
|
1. `tidyenum.h` - Give the element an internal name, like `TidyTag_XXXX`, and thus a value. Please keep this list in alphabetical order.
|
||||||
|
|
||||||
2. `tags.c` - Add a line to the `tag_defs[]` table. This assigns the unique string value of the element. Then the html versions that support the element, a pointer to the attributes supported by that elelment, and a bit field of the elements characteristics, inline, block, etc.
|
2. `tags.c` - Add a line to the `tag_defs[]` table. This assigns the unique string value of the element. Then the html versions that support the element, a pointer to the attributes supported by that elelment, and a bit field of the elements characteristics, inline, block, etc.
|
||||||
|
|
||||||
|
|
|
@ -58,41 +58,41 @@ The **libTidy** version is controlled by the contents of `version.txt` in the ro
|
||||||
|
|
||||||
This file consists of two lines of dot (.) separated items. The first being the **major**, **minor**, and **patch** version values, and the second string is a date. Example:
|
This file consists of two lines of dot (.) separated items. The first being the **major**, **minor**, and **patch** version values, and the second string is a date. Example:
|
||||||
|
|
||||||
```
|
~~~
|
||||||
5.3.15
|
5.3.15
|
||||||
2017.01.29
|
2017.01.29
|
||||||
```
|
~~~
|
||||||
|
|
||||||
When **CMake** is run, this file is read and two macros are added to the compile flags:
|
When **CMake** is run, this file is read and two macros are added to the compile flags:
|
||||||
|
|
||||||
```
|
~~~
|
||||||
add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" )
|
add_definitions ( -DLIBTIDY_VERSION="${LIBTIDY_VERSION}" )
|
||||||
add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" )
|
add_definitions ( -DRELEASE_DATE="${tidy_YEAR}/${tidy_MONTH}/${tidy_DAY}" )
|
||||||
```
|
~~~
|
||||||
|
|
||||||
And in `CMakeLists.txt` there is the posibility to define another macro, when and if required:
|
And in `CMakeLists.txt` there is the posibility to define another macro, when and if required:
|
||||||
|
|
||||||
```
|
~~~
|
||||||
# add_definitions ( -DRC_NUMBER="D231" )
|
# add_definitions ( -DRC_NUMBER="D231" )
|
||||||
```
|
~~~
|
||||||
|
|
||||||
These macros are put in `static const char` strings in **libTidys**’s internal- only `src/version.h` file:
|
These macros are put in `static const char` strings in **libTidys**’s internal- only `src/version.h` file:
|
||||||
|
|
||||||
```
|
~~~
|
||||||
static const char TY_(release_date)[] = RELEASE_DATE;
|
static const char TY_(release_date)[] = RELEASE_DATE;
|
||||||
#ifdef RC_NUMBER
|
#ifdef RC_NUMBER
|
||||||
static const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER;
|
static const char TY_(library_version)[] = LIBTIDY_VERSION "." RC_NUMBER;
|
||||||
#else
|
#else
|
||||||
static const char TY_(library_version)[] = LIBTIDY_VERSION;
|
static const char TY_(library_version)[] = LIBTIDY_VERSION;
|
||||||
#endif
|
#endif
|
||||||
```
|
~~~
|
||||||
|
|
||||||
These strings are returned respectively by the **libTidy** API functions:
|
These strings are returned respectively by the **libTidy** API functions:
|
||||||
|
|
||||||
```
|
~~~
|
||||||
TIDY_EXPORT ctmbstr TIDY_CALL tidyLibraryVersion(void);
|
TIDY_EXPORT ctmbstr TIDY_CALL tidyLibraryVersion(void);
|
||||||
TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void);
|
TIDY_EXPORT ctmbstr TIDY_CALL tidyReleaseDate(void);
|
||||||
```
|
~~~
|
||||||
|
|
||||||
### Git branches
|
### Git branches
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* This wouldn't have been possible without your help.
|
* This wouldn't have been possible without your help.
|
||||||
*
|
*
|
||||||
* @copyright
|
* @copyright
|
||||||
* Copyright (c) 1998-2016 World Wide Web Consortium (Massachusetts
|
* Copyright (c) 1998-2017 World Wide Web Consortium (Massachusetts
|
||||||
* Institute of Technology, European Research Consortium for Informatics
|
* Institute of Technology, European Research Consortium for Informatics
|
||||||
* and Mathematics, Keio University).
|
* and Mathematics, Keio University).
|
||||||
* @par
|
* @par
|
||||||
|
@ -1179,6 +1179,16 @@ TIDY_EXPORT Bool TIDY_CALL tidySetMessageCallback(TidyDoc tdoc,
|
||||||
*/
|
*/
|
||||||
TIDY_EXPORT TidyDoc TIDY_CALL tidyGetMessageDoc( TidyMessage tmessage );
|
TIDY_EXPORT TidyDoc TIDY_CALL tidyGetMessageDoc( TidyMessage tmessage );
|
||||||
|
|
||||||
|
/** Get the message code.
|
||||||
|
** @param tmessage Specify the message that you are querying.
|
||||||
|
** @result Returns a code representing the message. This code can be used
|
||||||
|
** directly with the localized strings API; however we never make
|
||||||
|
** any guarantees about the value of these codes. For code stability
|
||||||
|
** don't store this value in your own application. Instead use the
|
||||||
|
** enum field or use the message key string value.
|
||||||
|
*/
|
||||||
|
TIDY_EXPORT uint TIDY_CALL tidyGetMessageCode( TidyMessage tmessage );
|
||||||
|
|
||||||
/** Get the message key string.
|
/** Get the message key string.
|
||||||
** @param tmessage Specify the message that you are querying.
|
** @param tmessage Specify the message that you are querying.
|
||||||
** @result Returns a string representing the message. This string is intended
|
** @result Returns a string representing the message. This string is intended
|
||||||
|
|
2236
include/tidyenum.h
2236
include/tidyenum.h
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
3520
src/language_en.h
3520
src/language_en.h
File diff suppressed because it is too large
Load diff
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* Orginating PO file metadata:
|
* Orginating PO file metadata:
|
||||||
* PO_LAST_TRANSLATOR=jderry
|
* PO_LAST_TRANSLATOR=jderry
|
||||||
* PO_REVISION_DATE=2017-03-15 17:35:16
|
* PO_REVISION_DATE=2017-03-22 15:54:52
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -61,32 +61,6 @@ static languageDefinition language_en_gb = { whichPluralForm_en_gb, {
|
||||||
{/* Specify the ll or ll_cc language code here. */
|
{/* Specify the ll or ll_cc language code here. */
|
||||||
TIDY_LANGUAGE, 0, "en_gb"
|
TIDY_LANGUAGE, 0, "en_gb"
|
||||||
},
|
},
|
||||||
{ TEXT_USING_FONT, 0,
|
|
||||||
"You are recommended to use CSS to specify the font and\n"
|
|
||||||
"properties such as its size and colour. This will reduce\n"
|
|
||||||
"the size of HTML files and make them easier to maintain\n"
|
|
||||||
"compared with using <FONT> elements.\n\n"
|
|
||||||
},
|
|
||||||
{ TEXT_USING_BODY, 0, "You are recommended to use CSS to specify page and link colours\n" },
|
|
||||||
{ TEXT_GENERAL_INFO_PLEA, 0,
|
|
||||||
"\n"
|
|
||||||
"Would you like to see Tidy in proper, British English? Please consider \n"
|
|
||||||
"helping us to localise HTML Tidy. For details please see \n"
|
|
||||||
"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
|
|
||||||
},
|
|
||||||
|
|
||||||
#if SUPPORT_ACCESSIBILITY_CHECKS
|
|
||||||
{ INFORMATION_NOT_CONVEYED_IMAGE, 0, "[2.1.1.1]: ensure information not conveyed through colour alone (image)." },
|
|
||||||
{ INFORMATION_NOT_CONVEYED_APPLET, 0, "[2.1.1.2]: ensure information not conveyed through colour alone (applet)." },
|
|
||||||
{ INFORMATION_NOT_CONVEYED_OBJECT, 0, "[2.1.1.3]: ensure information not conveyed through colour alone (object)." },
|
|
||||||
{ INFORMATION_NOT_CONVEYED_SCRIPT, 0, "[2.1.1.4]: ensure information not conveyed through colour alone (script)." },
|
|
||||||
{ INFORMATION_NOT_CONVEYED_INPUT, 0, "[2.1.1.5]: ensure information not conveyed through colour alone (input)." },
|
|
||||||
{ COLOR_CONTRAST_TEXT, 0, "[2.2.1.1]: poor colour contrast (text)." },
|
|
||||||
{ COLOR_CONTRAST_LINK, 0, "[2.2.1.2]: poor colour contrast (link)." },
|
|
||||||
{ COLOR_CONTRAST_ACTIVE_LINK, 0, "[2.2.1.3]: poor colour contrast (active link)." },
|
|
||||||
{ COLOR_CONTRAST_VISITED_LINK, 0, "[2.2.1.4]: poor colour contrast (visited link)." },
|
|
||||||
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
|
|
||||||
|
|
||||||
{ TidyMergeDivs, 0,
|
{ TidyMergeDivs, 0,
|
||||||
"This option can be used to modify the behaviour of <code>clean</code> when "
|
"This option can be used to modify the behaviour of <code>clean</code> when "
|
||||||
"set to <code>yes</code>."
|
"set to <code>yes</code>."
|
||||||
|
@ -117,6 +91,31 @@ static languageDefinition language_en_gb = { whichPluralForm_en_gb, {
|
||||||
"attributes with HTML/XHTML colour names where defined, e.g. replace "
|
"attributes with HTML/XHTML colour names where defined, e.g. replace "
|
||||||
"<code>#ffffff</code> with <code>white</code>. "
|
"<code>#ffffff</code> with <code>white</code>. "
|
||||||
},
|
},
|
||||||
|
{ TEXT_USING_FONT, 0,
|
||||||
|
"You are recommended to use CSS to specify the font and\n"
|
||||||
|
"properties such as its size and colour. This will reduce\n"
|
||||||
|
"the size of HTML files and make them easier to maintain\n"
|
||||||
|
"compared with using <FONT> elements.\n\n"
|
||||||
|
},
|
||||||
|
{ TEXT_USING_BODY, 0, "You are recommended to use CSS to specify page and link colours\n" },
|
||||||
|
{ TEXT_GENERAL_INFO_PLEA, 0,
|
||||||
|
"\n"
|
||||||
|
"Would you like to see Tidy in proper, British English? Please consider \n"
|
||||||
|
"helping us to localise HTML Tidy. For details please see \n"
|
||||||
|
"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
|
||||||
|
},
|
||||||
|
|
||||||
|
#if SUPPORT_ACCESSIBILITY_CHECKS
|
||||||
|
{ INFORMATION_NOT_CONVEYED_IMAGE, 0, "[2.1.1.1]: ensure information not conveyed through colour alone (image)." },
|
||||||
|
{ INFORMATION_NOT_CONVEYED_APPLET, 0, "[2.1.1.2]: ensure information not conveyed through colour alone (applet)." },
|
||||||
|
{ INFORMATION_NOT_CONVEYED_OBJECT, 0, "[2.1.1.3]: ensure information not conveyed through colour alone (object)." },
|
||||||
|
{ INFORMATION_NOT_CONVEYED_SCRIPT, 0, "[2.1.1.4]: ensure information not conveyed through colour alone (script)." },
|
||||||
|
{ INFORMATION_NOT_CONVEYED_INPUT, 0, "[2.1.1.5]: ensure information not conveyed through colour alone (input)." },
|
||||||
|
{ COLOR_CONTRAST_TEXT, 0, "[2.2.1.1]: poor colour contrast (text)." },
|
||||||
|
{ COLOR_CONTRAST_LINK, 0, "[2.2.1.2]: poor colour contrast (link)." },
|
||||||
|
{ COLOR_CONTRAST_ACTIVE_LINK, 0, "[2.2.1.3]: poor colour contrast (active link)." },
|
||||||
|
{ COLOR_CONTRAST_VISITED_LINK, 0, "[2.2.1.4]: poor colour contrast (visited link)." },
|
||||||
|
#endif /* SUPPORT_ACCESSIBILITY_CHECKS */
|
||||||
|
|
||||||
{/* This MUST be present and last. */
|
{/* This MUST be present and last. */
|
||||||
TIDY_MESSAGE_TYPE_LAST, 0, NULL
|
TIDY_MESSAGE_TYPE_LAST, 0, NULL
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* Orginating PO file metadata:
|
* Orginating PO file metadata:
|
||||||
* PO_LAST_TRANSLATOR=jderry
|
* PO_LAST_TRANSLATOR=jderry
|
||||||
* PO_REVISION_DATE=2017-03-15 17:35:16
|
* PO_REVISION_DATE=2017-03-22 15:54:52
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -61,12 +61,6 @@ static languageDefinition language_es = { whichPluralForm_es, {
|
||||||
{/* Specify the ll or ll_cc language code here. */
|
{/* Specify the ll or ll_cc language code here. */
|
||||||
TIDY_LANGUAGE, 0, "es"
|
TIDY_LANGUAGE, 0, "es"
|
||||||
},
|
},
|
||||||
{ TEXT_GENERAL_INFO_PLEA, 0,
|
|
||||||
"\n"
|
|
||||||
"¿Le gustaría ver Tidy en un español correcto? Por favor considere \n"
|
|
||||||
"ayudarnos a localizar HTML Tidy. Para más detalles consulte \n"
|
|
||||||
"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md \n"
|
|
||||||
},
|
|
||||||
{ TidyMakeClean, 0,
|
{ TidyMakeClean, 0,
|
||||||
"Esta opción especifica si Tidy debe realizar la limpieza de algún legado etiquetas de "
|
"Esta opción especifica si Tidy debe realizar la limpieza de algún legado etiquetas de "
|
||||||
"presentación (actualmente <code><i></code>, <code><b></code>, <code><center></"
|
"presentación (actualmente <code><i></code>, <code><b></code>, <code><center></"
|
||||||
|
@ -79,6 +73,12 @@ static languageDefinition language_es = { whichPluralForm_es, {
|
||||||
{ TidyNCR, 0, "Esta opción especifica si Tidy debe permitir referencias de caracteres numéricos. " },
|
{ TidyNCR, 0, "Esta opción especifica si Tidy debe permitir referencias de caracteres numéricos. " },
|
||||||
#endif /* SUPPORT_ASIAN_ENCODINGS */
|
#endif /* SUPPORT_ASIAN_ENCODINGS */
|
||||||
|
|
||||||
|
{ TEXT_GENERAL_INFO_PLEA, 0,
|
||||||
|
"\n"
|
||||||
|
"¿Le gustaría ver Tidy en un español correcto? Por favor considere \n"
|
||||||
|
"ayudarnos a localizar HTML Tidy. Para más detalles consulte \n"
|
||||||
|
"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md \n"
|
||||||
|
},
|
||||||
|
|
||||||
#if SUPPORT_CONSOLE_APP
|
#if SUPPORT_CONSOLE_APP
|
||||||
{ TC_TXT_HELP_LANG_1, 0,
|
{ TC_TXT_HELP_LANG_1, 0,
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* Orginating PO file metadata:
|
* Orginating PO file metadata:
|
||||||
* PO_LAST_TRANSLATOR=jderry
|
* PO_LAST_TRANSLATOR=jderry
|
||||||
* PO_REVISION_DATE=2017-03-15 17:35:16
|
* PO_REVISION_DATE=2017-03-22 15:54:52
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* Orginating PO file metadata:
|
* Orginating PO file metadata:
|
||||||
* PO_LAST_TRANSLATOR=jderry
|
* PO_LAST_TRANSLATOR=jderry
|
||||||
* PO_REVISION_DATE=2017-03-15 17:35:16
|
* PO_REVISION_DATE=2017-03-22 15:54:52
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
@ -61,7 +61,98 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
|
||||||
{/* Specify the ll or ll_cc language code here. */
|
{/* Specify the ll or ll_cc language code here. */
|
||||||
TIDY_LANGUAGE, 0, "fr"
|
TIDY_LANGUAGE, 0, "fr"
|
||||||
},
|
},
|
||||||
{ ATRC_ACCESS_URL, 0, "http://www.html-tidy.org/Accessibility/" },
|
{ TidyAltText, 0,
|
||||||
|
"Cette option spécifie la valeur par défaut <code>alt=</code> utilise le texte Tidy "
|
||||||
|
"pour <code><img></code> attributs lorsque le <code>alt=</code> attribut est "
|
||||||
|
"absent. <br/> Utiliser avec précaution, car il est de votre responsabilité de rendre "
|
||||||
|
"vos documents accessibles aux personnes qui ne peuvent pas voir les images."
|
||||||
|
},
|
||||||
|
{ TidyCSSPrefix, 0,
|
||||||
|
"Cette option spécifie le préfixe que Tidy utilise des règles de styles. <br/> Par "
|
||||||
|
"défaut, <var>c</var> sera utilisé."
|
||||||
|
},
|
||||||
|
{ TidyDoctype, 0,
|
||||||
|
"Cette option spécifie la déclaration DOCTYPE générée par Tidy. <br/> Si <var>omit</"
|
||||||
|
"var> la sortie ne contiendra une déclaration DOCTYPE. Notez que ce cela implique "
|
||||||
|
"aussi <code>numeric-entities</code> est réglé sur <var>yes</var>. <br/> Si "
|
||||||
|
"<code>html5</code> le DOCTYPE est réglé sur <code><! DOCTYPE html></code>. <br/"
|
||||||
|
"> Si <var>auto</var> (par défaut) Tidy utilisera une supposition basée sur le "
|
||||||
|
"contenu du document. <br/> Si elle est définie <var>strict</var>, Tidy établira le "
|
||||||
|
"DOCTYPE du HTML4 ou XHTML 1 DTD stricte. <br/> Si <var>loose</var>, le DOCTYPE est "
|
||||||
|
"réglé sur le HTML4 ou XHTML1 loose (transitional) DTD. <br/> Alternativement, vous "
|
||||||
|
"pouvez fournir une chaîne pour l'identificateur public formel (FPI).<br/> Par "
|
||||||
|
"exemple: <br/> <code>doctype: \"- // ACME // DTD HTML. 3,14159 //EN\"</code> <br/> "
|
||||||
|
"Si vous spécifiez le FPI pour un document XHTML, Tidy établira l'identifiant du "
|
||||||
|
"système à une chaîne vide. Pour un document HTML, Tidy ajoute un identificateur de "
|
||||||
|
"système que si l'on était déjà présent dans le but de préserver le mode de certains "
|
||||||
|
"navigateurs de traitement. Tidy quitte le DOCTYPE pour les documents XML génériques "
|
||||||
|
"inchangés. <br/> Cette option ne permet pas une validation du document de conformité."
|
||||||
|
},
|
||||||
|
{ TidyDropEmptyElems, 0, "Cette option spécifie si Tidy doit jeter des éléments vides." },
|
||||||
|
{ TidyDropEmptyParas, 0, "Cette option spécifie si Tidy doit jeter des paragraphes vides." },
|
||||||
|
{ TidyFixUri, 0,
|
||||||
|
"Cette option spécifie si Tidy doit vérifier les valeurs d'attributs qui portent URI "
|
||||||
|
"pour des caractères illégaux et si ce sont trouvés, leur échapper en HTML 4 "
|
||||||
|
"recommande."
|
||||||
|
},
|
||||||
|
{ TidyGDocClean, 0,
|
||||||
|
"Cette option spécifie si Tidy doit permettre un comportement spécifique pour le "
|
||||||
|
"nettoyage HTML exporté à partir de Google Docs."
|
||||||
|
},
|
||||||
|
{ TidyMakeBare, 0,
|
||||||
|
"Cette option spécifie si Tidy doit dépouiller Microsoft HTML spécifique à partir de "
|
||||||
|
"Word 2000 documents, et des espaces de sortie plutôt que des espaces insécables où "
|
||||||
|
"ils existent dans l'entrée."
|
||||||
|
},
|
||||||
|
{ TidyMakeClean, 0,
|
||||||
|
"Cette option spécifie si Tidy doit effectuer le nettoyage de certains anciens tags "
|
||||||
|
"de présentation (actuellement de <code>& lt; i></code>, <code><b></code>, "
|
||||||
|
"<code><centre></code> lorsque placé entre les balises inline appropriées, et "
|
||||||
|
"<code>< font></code>). Si <var>yes</var> puis balises existantes seront "
|
||||||
|
"remplacées par CSS le <code><style></code> balises et le balisage structurel "
|
||||||
|
"selon le cas."
|
||||||
|
},
|
||||||
|
{ TidyPPrintTabs, 0,
|
||||||
|
"Cette option spécifie si tidy doit Indenter avec tabulation au lieu des espaces, en "
|
||||||
|
"supposant <code>indent</code> est <var>yes</var>. <br/>Définir sur <var>yes</var> "
|
||||||
|
"pour indenter avec des tabulations au lieu de la valeur par défaut des espaces. <br /"
|
||||||
|
">Utilisez l'option <code>indent-spaces</code> pour contrôler le nombre d'onglets "
|
||||||
|
"Sortie par niveau de tiret. Notez que lorsque <code>indent-with-tabs</code> est "
|
||||||
|
"activée. La valeur par défaut de <code>indent-spaces</code> est réinitialisé à "
|
||||||
|
"<var>1</var>. <br/>Remarque <code>tab-size</code> contrôle la conversion des espaces "
|
||||||
|
"d'entrée. Définissez-le à zéro pour conserver onglets de saisie."
|
||||||
|
},
|
||||||
|
{ TidySkipNested, 0,
|
||||||
|
"Cette option spécifie que Tidy doit ignorer les balises imbriquées lors de l'analyse "
|
||||||
|
"des données de script et de style."
|
||||||
|
},
|
||||||
|
{ TidyXmlDecl, 0,
|
||||||
|
"Cette option spécifie si Tidy devrait ajouter la déclaration XML lors de la sortie "
|
||||||
|
"XML ou XHTML. <br/> Notez que si l'entrée comprend déjà un <code> & lt;?xml ... &>"
|
||||||
|
"</code> déclaration alors cette option sera ignorée. <br/> Si l'encodage pour la "
|
||||||
|
"sortie est différente de <var>ascii</var>, l'un des l'encodage <var>utf*</var> ou "
|
||||||
|
"<var>raw</var>, la déclaration est toujours ajouté que requis par la norme XML."
|
||||||
|
},
|
||||||
|
{ TidyXmlPIs, 0,
|
||||||
|
"Cette option spécifie si Tidy doit modifier l'analyse syntaxique des instructions de "
|
||||||
|
"traitement pour exiger <code>?></code> comme terminateur plutôt que <code>></"
|
||||||
|
"code>. <br/> Cette option est automatiquement activée si l'entrée est en XML."
|
||||||
|
},
|
||||||
|
{ TidyXmlSpace, 0,
|
||||||
|
"Cette option spécifie si tidy doit ajouter <code>xml:espace=\"préserver \"</code> "
|
||||||
|
"pour des éléments tels que <code><pré></code>, <code><style></code> et "
|
||||||
|
"<code><script></code> lors de la génération de XML. <br />Il est nécessaire si "
|
||||||
|
"l'espace blanc dans ces éléments doit être analysée de manière appropriée sans avoir "
|
||||||
|
"accès à la DTD."
|
||||||
|
},
|
||||||
|
{ TidyPrettyPrint, 0, "imprimer" },
|
||||||
|
{ TidyInfo, 0, "Info:" },
|
||||||
|
{ TidyWarning, 0, "Attention:" },
|
||||||
|
{ TidyConfig, 0, "Config:" },
|
||||||
|
{ TidyAccess, 0, "Accès:" },
|
||||||
|
{ TidyError, 0, "Erreur:" },
|
||||||
|
{ TidyBadDocument, 0, "Document:" },
|
||||||
|
{ TidyFatal, 0, "Panique:" },
|
||||||
{ FILE_CANT_OPEN, 0, "Impossible d'ouvrir « %s »\n" },
|
{ FILE_CANT_OPEN, 0, "Impossible d'ouvrir « %s »\n" },
|
||||||
{ LINE_COLUMN_STRING, 0, "Ligne: %d Col: %d - " },
|
{ LINE_COLUMN_STRING, 0, "Ligne: %d Col: %d - " },
|
||||||
{ STRING_CONTENT_LOOKS, 0, "Le contenu du document ressemble à %s" },
|
{ STRING_CONTENT_LOOKS, 0, "Le contenu du document ressemble à %s" },
|
||||||
|
@ -74,6 +165,12 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
|
||||||
{ STRING_ERROR_COUNT_WARNING, 1, "alarmes" },
|
{ STRING_ERROR_COUNT_WARNING, 1, "alarmes" },
|
||||||
{ STRING_HELLO_ACCESS, 0, "Contrôles d'accessibilité: version 0.1" },
|
{ STRING_HELLO_ACCESS, 0, "Contrôles d'accessibilité: version 0.1" },
|
||||||
{ STRING_MISSING_MALFORMED, 0, "argument manquant ou incorrect pour l'option: %s" },
|
{ STRING_MISSING_MALFORMED, 0, "argument manquant ou incorrect pour l'option: %s" },
|
||||||
|
{ STRING_XML_DECLARATION, 0, "déclaration XML" },
|
||||||
|
{ STRING_NEEDS_INTERVENTION, 0,
|
||||||
|
"Ce document contient des erreurs qui doivent être résolus avant\n"
|
||||||
|
"utilisant HTML Tidy pour générer une version rangé.\n"
|
||||||
|
"\n"
|
||||||
|
},
|
||||||
{ STRING_NO_ERRORS, 0, "Aucun avertissement ou les erreurs ne trouvées." },
|
{ STRING_NO_ERRORS, 0, "Aucun avertissement ou les erreurs ne trouvées." },
|
||||||
{ STRING_NO_SYSID, 0, "Aucun identificateur de système dans le doctype émis" },
|
{ STRING_NO_SYSID, 0, "Aucun identificateur de système dans le doctype émis" },
|
||||||
{ STRING_NOT_ALL_SHOWN, 0, "Pas tous les avertissements/erreurs ont été présentés." },
|
{ STRING_NOT_ALL_SHOWN, 0, "Pas tous les avertissements/erreurs ont été présentés." },
|
||||||
|
@ -81,7 +178,6 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
|
||||||
{ STRING_REPLACING, 0, "remplaçant" },
|
{ STRING_REPLACING, 0, "remplaçant" },
|
||||||
{ STRING_SPECIFIED, 0, "spécifié" },
|
{ STRING_SPECIFIED, 0, "spécifié" },
|
||||||
{ STRING_UNKNOWN_OPTION, 0, "option inconnue: %s" },
|
{ STRING_UNKNOWN_OPTION, 0, "option inconnue: %s" },
|
||||||
{ STRING_XML_DECLARATION, 0, "déclaration XML" },
|
|
||||||
{ TEXT_HTML_T_ALGORITHM, 0,
|
{ TEXT_HTML_T_ALGORITHM, 0,
|
||||||
"\n"
|
"\n"
|
||||||
" - D'abord, cherchez à gauche de la position de la cellule de trouver \n"
|
" - D'abord, cherchez à gauche de la position de la cellule de trouver \n"
|
||||||
|
@ -249,11 +345,6 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
|
||||||
"Il est recommandé d'utiliser les CSS pour spécifier la page et de liaison des "
|
"Il est recommandé d'utiliser les CSS pour spécifier la page et de liaison des "
|
||||||
"couleurs\n"
|
"couleurs\n"
|
||||||
},
|
},
|
||||||
{ TEXT_NEEDS_INTERVENTION, 0,
|
|
||||||
"Ce document contient des erreurs qui doivent être résolus avant\n"
|
|
||||||
"utilisant HTML Tidy pour générer une version rangé.\n"
|
|
||||||
"\n"
|
|
||||||
},
|
|
||||||
{ TEXT_GENERAL_INFO, 0,
|
{ TEXT_GENERAL_INFO, 0,
|
||||||
"A propos de HTML Tidy: https://github.com/htacg/tidy-html5\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"
|
"Les rapports de bugs et commentaires: https://github.com/htacg/tidy-html5/issues\n"
|
||||||
|
@ -270,192 +361,94 @@ static languageDefinition language_fr = { whichPluralForm_fr, {
|
||||||
"vous plaît voir\n"
|
"vous plaît voir\n"
|
||||||
"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
|
"https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md\n"
|
||||||
},
|
},
|
||||||
{ TidyInfo, 0, "Info:" },
|
|
||||||
{ TidyWarning, 0, "Attention:" },
|
|
||||||
{ TidyConfig, 0, "Config:" },
|
|
||||||
{ TidyAccess, 0, "Accès:" },
|
|
||||||
{ TidyError, 0, "Erreur:" },
|
|
||||||
{ TidyBadDocument, 0, "Document:" },
|
|
||||||
{ TidyFatal, 0, "Panique:" },
|
|
||||||
{ ENCODING_MISMATCH, 0, "codage d'entrée spécifiée (%s) ne correspond pas réelle encodage d'entrée (%s)" },
|
|
||||||
{ VENDOR_SPECIFIC_CHARS, 0, "%s de code de caractère invalide l'%s" },
|
|
||||||
{ INVALID_SGML_CHARS, 0, "%s de code de caractère invalide l'%s" },
|
|
||||||
{ INVALID_UTF8, 0, "%s invalides octets UTF-8 de (char. codes %s)" },
|
|
||||||
{ INVALID_UTF16, 0, "paire de substitution non valide UTF-16 (code de caract. %s) %s" },
|
|
||||||
{ INVALID_NCR, 0, "Référence de caractère numérique non valide de %s %s" },
|
|
||||||
{ MISSING_SEMICOLON, 0, "entité « %s » ne s'arrête pas à «; »" },
|
|
||||||
{ MISSING_SEMICOLON_NCR, 0, "Référence de caractère numérique « %s » n'est pas se terminer par «; »" },
|
|
||||||
{ UNESCAPED_AMPERSAND, 0, "sans séquence d'échappement & qui devrait être écrit comme &" },
|
|
||||||
{ UNKNOWN_ENTITY, 0, "sans séquence d'échappement & ou entité inconnue « %s »" },
|
|
||||||
{ APOS_UNDEFINED, 0, "nommée l'entité ' seulement défini en XML/XHTML" },
|
|
||||||
{ INSERTING_ATTRIBUTE, 0, "%s insérer l'attribut « %s »" },
|
|
||||||
{ INSERTING_AUTO_ATTRIBUTE, 0, "%s insérer l'attribut « %s », à l'aide de la valeur « %s »" },
|
|
||||||
{ MISSING_ATTR_VALUE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
|
||||||
{ UNKNOWN_ATTRIBUTE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
|
||||||
{ PROPRIETARY_ATTRIBUTE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
|
||||||
{ JOINING_ATTRIBUTE, 0, "%s rejoignant les valeurs d'attribut répétée « %s »" },
|
|
||||||
{ XML_ATTRIBUTE_VALUE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
|
||||||
{ XML_ID_SYNTAX, 0, "ID de %s « %s » utilise la syntaxe XML ID" },
|
|
||||||
{ ATTR_VALUE_NOT_LCASE, 0, "valeur d'attribut de %s « %s » doit être en minuscules pour XHTML" },
|
|
||||||
{ PROPRIETARY_ATTR_VALUE, 0, "valeur d'attribut propriétaire de %s « %s »" },
|
|
||||||
{ ANCHOR_NOT_UNIQUE, 0, "%s anchor \"%s\" déjà défini" },
|
{ ANCHOR_NOT_UNIQUE, 0, "%s anchor \"%s\" déjà défini" },
|
||||||
{ BAD_ATTRIBUTE_VALUE, 0, "L'attribut %s \"%s\" a une valeur non valide \"%s\"" },
|
{ ATTR_VALUE_NOT_LCASE, 0, "valeur d'attribut de %s « %s » doit être en minuscules pour XHTML" },
|
||||||
|
{ BACKSLASH_IN_URI, 0, "référence URI %s contient des anti-slash. Faute de frappe ?" },
|
||||||
{ BAD_ATTRIBUTE_VALUE_REPLACED, 0, "%s attribut « %s » a une valeur non valide « %s » et a été remplacé" },
|
{ BAD_ATTRIBUTE_VALUE_REPLACED, 0, "%s attribut « %s » a une valeur non valide « %s » et a été remplacé" },
|
||||||
|
{ BAD_ATTRIBUTE_VALUE, 0, "L'attribut %s \"%s\" a une valeur non valide \"%s\"" },
|
||||||
|
{ ESCAPED_ILLEGAL_URI, 0, "%s échapper malformé référence URI" },
|
||||||
|
{ FIXED_BACKSLASH, 0, "%s conversion de barre oblique inverse d'URI de slash" },
|
||||||
|
{ ID_NAME_MISMATCH, 0, "%s id et le nom valeur d'attribut mismatch" },
|
||||||
|
{ ILLEGAL_URI_REFERENCE, 0, "%s mal échappé référence URI" },
|
||||||
|
{ INSERTING_AUTO_ATTRIBUTE, 0, "%s insérer l'attribut « %s », à l'aide de la valeur « %s »" },
|
||||||
{ INVALID_ATTRIBUTE, 0, "nom d'attribut de %s « %s » (valeur = « %s ») n'est pas valide" },
|
{ INVALID_ATTRIBUTE, 0, "nom d'attribut de %s « %s » (valeur = « %s ») n'est pas valide" },
|
||||||
{ REPEATED_ATTRIBUTE, 0, "%s laissant tomber la valeur « %s » pour l'attribut répétée « %s »" },
|
|
||||||
{ INVALID_XML_ID, 0, "%s ne peut pas copier le nom attribut id" },
|
{ INVALID_XML_ID, 0, "%s ne peut pas copier le nom attribut id" },
|
||||||
|
{ JOINING_ATTRIBUTE, 0, "%s rejoignant les valeurs d'attribut répétée « %s »" },
|
||||||
|
{ MISSING_ATTR_VALUE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
||||||
|
{ MISSING_IMAGEMAP, 0, "%s doivent utiliser côté client image map" },
|
||||||
|
{ MISSING_QUOTEMARK, 0, "%s attribut manquant apostrophe droite" },
|
||||||
|
{ NEWLINE_IN_URI, 0, "rejeter la nouvelle ligne de %s en référence URI" },
|
||||||
|
{ PROPRIETARY_ATTR_VALUE, 0, "valeur d'attribut propriétaire de %s « %s »" },
|
||||||
|
{ PROPRIETARY_ATTRIBUTE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
||||||
|
{ REPEATED_ATTRIBUTE, 0, "%s laissant tomber la valeur « %s » pour l'attribut répétée « %s »" },
|
||||||
|
{ UNEXPECTED_END_OF_FILE_ATTR, 0, "%s fin de fichier lors de l'analyse d'attributs" },
|
||||||
|
{ UNEXPECTED_EQUALSIGN, 0, "%s unexpected '=', nom d'attribut attendu" },
|
||||||
{ UNEXPECTED_GT, 0, "manquant '>' pour tag: %s" },
|
{ UNEXPECTED_GT, 0, "manquant '>' pour tag: %s" },
|
||||||
{ UNEXPECTED_QUOTEMARK, 0, "%s inattendue ou double quote mark" },
|
{ UNEXPECTED_QUOTEMARK, 0, "%s inattendue ou double quote mark" },
|
||||||
{ MISSING_QUOTEMARK, 0, "%s attribut manquant apostrophe droite" },
|
|
||||||
{ UNEXPECTED_END_OF_FILE_ATTR, 0, "%s fin de fichier lors de l'analyse d'attributs" },
|
|
||||||
{ ID_NAME_MISMATCH, 0, "%s id et le nom valeur d'attribut mismatch" },
|
|
||||||
{ BACKSLASH_IN_URI, 0, "référence URI %s contient des anti-slash. Faute de frappe ?" },
|
|
||||||
{ FIXED_BACKSLASH, 0, "%s conversion de barre oblique inverse d'URI de slash" },
|
|
||||||
{ ILLEGAL_URI_REFERENCE, 0, "%s mal échappé référence URI" },
|
|
||||||
{ ESCAPED_ILLEGAL_URI, 0, "%s échapper malformé référence URI" },
|
|
||||||
{ NEWLINE_IN_URI, 0, "rejeter la nouvelle ligne de %s en référence URI" },
|
|
||||||
{ WHITE_IN_URI, 0, "jeter le espaces de %s en référence URI" },
|
{ WHITE_IN_URI, 0, "jeter le espaces de %s en référence URI" },
|
||||||
{ UNEXPECTED_EQUALSIGN, 0, "%s unexpected '=', nom d'attribut attendu" },
|
{ XML_ATTRIBUTE_VALUE, 0, "L'attribut %s a une valeur non valide \"%s\"" },
|
||||||
{ MISSING_IMAGEMAP, 0, "%s doivent utiliser côté client image map" },
|
{ XML_ID_SYNTAX, 0, "ID de %s « %s » utilise la syntaxe XML ID" },
|
||||||
|
{ INVALID_NCR, 0, "Référence de caractère numérique non valide de %s %s" },
|
||||||
|
{ INVALID_SGML_CHARS, 0, "%s de code de caractère invalide l'%s" },
|
||||||
|
{ INVALID_UTF16, 0, "paire de substitution non valide UTF-16 (code de caract. %s) %s" },
|
||||||
|
{ INVALID_UTF8, 0, "%s invalides octets UTF-8 de (char. codes %s)" },
|
||||||
|
{ VENDOR_SPECIFIC_CHARS, 0, "%s de code de caractère invalide l'%s" },
|
||||||
|
{ ENCODING_MISMATCH, 0, "codage d'entrée spécifiée (%s) ne correspond pas réelle encodage d'entrée (%s)" },
|
||||||
|
{ APOS_UNDEFINED, 0, "nommée l'entité ' seulement défini en XML/XHTML" },
|
||||||
|
{ MISSING_SEMICOLON_NCR, 0, "Référence de caractère numérique « %s » n'est pas se terminer par «; »" },
|
||||||
|
{ MISSING_SEMICOLON, 0, "entité « %s » ne s'arrête pas à «; »" },
|
||||||
|
{ UNESCAPED_AMPERSAND, 0, "sans séquence d'échappement & qui devrait être écrit comme &" },
|
||||||
|
{ UNKNOWN_ENTITY, 0, "sans séquence d'échappement & ou entité inconnue « %s »" },
|
||||||
|
{ BAD_CDATA_CONTENT, 0, "'<' + '/' + lettre non permis ici" },
|
||||||
|
{ BAD_COMMENT_CHARS, 0, "attendre -- ou >" },
|
||||||
|
{ BAD_XML_COMMENT, 0, "commentaires XML ne peut pas contenir --" },
|
||||||
|
{ CANT_BE_NESTED, 0, "%s ne peut pas être imbriquée" },
|
||||||
|
{ CONTENT_AFTER_BODY, 0, "contenu se produit après la fin du body" },
|
||||||
|
{ DISCARDING_UNEXPECTED, 0, "rejet inattendu %s" },
|
||||||
|
{ DOCTYPE_AFTER_TAGS, 0, "<! DOCTYPE> est pas autorisé après éléments" },
|
||||||
|
{ DTYPE_NOT_UPPER_CASE, 0, "SYSTEM, PUBLIC, W3C, DTD, EN doit être en majuscules" },
|
||||||
|
{ ENCODING_IO_CONFLICT, 0, "encodage de sortie ne fonctionne pas avec la sortie standard" },
|
||||||
|
{ ILLEGAL_NESTING, 0, "%s ne doivent pas être imbriqués" },
|
||||||
|
{ INCONSISTENT_NAMESPACE, 0, "le namespace HTML ne correspond pas au contenu" },
|
||||||
|
{ INCONSISTENT_VERSION, 0, "DOCTYPE HTML ne correspond pas à un contenu" },
|
||||||
|
{ INSERTING_TAG, 0, "insertion implicite <%s>" },
|
||||||
|
{ MALFORMED_COMMENT, 0, "tirets adjacents dans un commentaire" },
|
||||||
|
{ MALFORMED_DOCTYPE, 0, "en rejetant malformé <!DOCTYPE>" },
|
||||||
|
{ MISSING_DOCTYPE, 0, "manquante <!DOCTYPE> déclaration" },
|
||||||
|
{ MISSING_ENDTAG_BEFORE, 0, "manquante </%s> avant %s" },
|
||||||
|
{ MISSING_ENDTAG_FOR, 0, "manquant </%s>" },
|
||||||
|
{ MISSING_STARTTAG, 0, "manquant <%s>" },
|
||||||
|
{ MISSING_TITLE_ELEMENT, 0, "insertion manquante élément 'title'" },
|
||||||
|
{ NOFRAMES_CONTENT, 0, "%s non à l'intérieur 'noframes'" },
|
||||||
|
{ NON_MATCHING_ENDTAG, 0, "remplacement inattendu %s avec </%s>" },
|
||||||
|
{ PREVIOUS_LOCATION, 0, "<%s> précédemment mentionnés" },
|
||||||
|
{ PROPRIETARY_ELEMENT, 0, "%s n'est pas approuvé par le W3C" },
|
||||||
|
{ REPLACING_UNEX_ELEMENT, 0, "remplacement inattendu %s avec %s" },
|
||||||
|
{ SPACE_PRECEDING_XMLDECL, 0, "supprimant l'espace blanc précédent Déclaration XML" },
|
||||||
|
{ TAG_NOT_ALLOWED_IN, 0, "%s n'est pas autorisé dans <%s> éléments" },
|
||||||
|
{ TOO_MANY_ELEMENTS_IN, 0, "trop de %s éléments dans <%s>" },
|
||||||
|
{ TOO_MANY_ELEMENTS, 0, "trop de %s éléments" },
|
||||||
|
{ UNESCAPED_ELEMENT, 0, "unescaped %s dans le contenu pre" },
|
||||||
|
{ USING_BR_INPLACE_OF, 0, "utilisant <br> à la place de %s" },
|
||||||
|
{ DUPLICATE_FRAMESET, 0, "élément répété FRAMESET" },
|
||||||
|
{ SUSPECTED_MISSING_QUOTE, 0, "manquant guillemet pour la valeur d'attribut" },
|
||||||
|
{ UNEXPECTED_ENDTAG_IN, 0, "inattendus </%s> dans <%s>" },
|
||||||
|
{ UNKNOWN_ELEMENT, 0, "%s n'est pas reconnue !" },
|
||||||
{ MISSING_ATTRIBUTE, 0, "%s manque attribut \"%s\"" },
|
{ MISSING_ATTRIBUTE, 0, "%s manque attribut \"%s\"" },
|
||||||
|
{ REPLACING_ELEMENT, 0, "remplaçant %s avec %s" },
|
||||||
|
{ TRIM_EMPTY_ELEMENT, 0, "rognage vide %s" },
|
||||||
|
{ BAD_SUMMARY_HTML5, 0, "L'attribut summary sur l'élément du %s est obsolète dans HTML5" },
|
||||||
|
{ COERCE_TO_ENDTAG_WARN, 0, "<%s> est probablement destinée en tant que </%s>" },
|
||||||
{ NESTED_EMPHASIS, 0, "accent imbriquée %s" },
|
{ NESTED_EMPHASIS, 0, "accent imbriquée %s" },
|
||||||
{ NESTED_QUOTATION, 0, "imbriqué \"q\" éléments, typo possible" },
|
{ NESTED_QUOTATION, 0, "imbriqué \"q\" éléments, typo possible" },
|
||||||
{ OBSOLETE_ELEMENT, 0, "remplaçant élément obsolète %s avec %s" },
|
{ OBSOLETE_ELEMENT, 0, "remplaçant élément obsolète %s avec %s" },
|
||||||
{ COERCE_TO_ENDTAG_WARN, 0, "<%s> est probablement destinée en tant que </%s>" },
|
|
||||||
{ REMOVED_HTML5, 0, "L'élément de %s retiré HTML5" },
|
{ REMOVED_HTML5, 0, "L'élément de %s retiré HTML5" },
|
||||||
{ BAD_SUMMARY_HTML5, 0, "L'attribut summary sur l'élément du %s est obsolète dans HTML5" },
|
|
||||||
{ TRIM_EMPTY_ELEMENT, 0, "rognage vide %s" },
|
|
||||||
{ REPLACING_ELEMENT, 0, "remplaçant %s avec %s" },
|
|
||||||
{ COERCE_TO_ENDTAG, 0, "<%s> est probablement destinée en tant que </%s>" },
|
{ COERCE_TO_ENDTAG, 0, "<%s> est probablement destinée en tant que </%s>" },
|
||||||
{ REPLACING_UNEX_ELEMENT, 0, "remplacement inattendu %s avec %s" },
|
|
||||||
{ MISSING_ENDTAG_FOR, 0, "manquant </%s>" },
|
|
||||||
{ MISSING_ENDTAG_BEFORE, 0, "manquante </%s> avant %s" },
|
|
||||||
{ DISCARDING_UNEXPECTED, 0, "rejet inattendu %s" },
|
|
||||||
{ NON_MATCHING_ENDTAG, 0, "remplacement inattendu %s avec </%s>" },
|
|
||||||
{ TAG_NOT_ALLOWED_IN, 0, "%s n'est pas autorisé dans <%s> éléments" },
|
|
||||||
{ MISSING_STARTTAG, 0, "manquant <%s>" },
|
|
||||||
{ UNEXPECTED_ENDTAG, 0, "rejet inattendu </%s>" },
|
|
||||||
{ TOO_MANY_ELEMENTS, 0, "trop de %s éléments" },
|
|
||||||
{ USING_BR_INPLACE_OF, 0, "utilisant <br> à la place de %s" },
|
|
||||||
{ INSERTING_TAG, 0, "insertion implicite <%s>" },
|
|
||||||
{ CANT_BE_NESTED, 0, "%s ne peut pas être imbriquée" },
|
|
||||||
{ PROPRIETARY_ELEMENT, 0, "%s n'est pas approuvé par le W3C" },
|
|
||||||
{ ILLEGAL_NESTING, 0, "%s ne doivent pas être imbriqués" },
|
|
||||||
{ NOFRAMES_CONTENT, 0, "%s non à l'intérieur 'noframes'" },
|
|
||||||
{ UNEXPECTED_END_OF_FILE, 0, "fin inattendue du fichier %s" },
|
|
||||||
{ ELEMENT_NOT_EMPTY, 0, "%s élément non vide ou pas fermée" },
|
{ ELEMENT_NOT_EMPTY, 0, "%s élément non vide ou pas fermée" },
|
||||||
{ UNEXPECTED_ENDTAG_IN, 0, "inattendus </%s> dans <%s>" },
|
{ UNEXPECTED_END_OF_FILE, 0, "fin inattendue du fichier %s" },
|
||||||
{ TOO_MANY_ELEMENTS_IN, 0, "trop de %s éléments dans <%s>" },
|
{ UNEXPECTED_ENDTAG, 0, "rejet inattendu </%s>" },
|
||||||
{ UNESCAPED_ELEMENT, 0, "unescaped %s dans le contenu pre" },
|
|
||||||
{ DOCTYPE_AFTER_TAGS, 0, "<! DOCTYPE> est pas autorisé après éléments" },
|
|
||||||
{ MISSING_TITLE_ELEMENT, 0, "insertion manquante élément 'title'" },
|
|
||||||
{ INCONSISTENT_VERSION, 0, "DOCTYPE HTML ne correspond pas à un contenu" },
|
|
||||||
{ MISSING_DOCTYPE, 0, "manquante <!DOCTYPE> déclaration" },
|
|
||||||
{ CONTENT_AFTER_BODY, 0, "contenu se produit après la fin du body" },
|
|
||||||
{ MALFORMED_COMMENT, 0, "tirets adjacents dans un commentaire" },
|
|
||||||
{ BAD_COMMENT_CHARS, 0, "attendre -- ou >" },
|
|
||||||
{ BAD_CDATA_CONTENT, 0, "'<' + '/' + lettre non permis ici" },
|
|
||||||
{ INCONSISTENT_NAMESPACE, 0, "le namespace HTML ne correspond pas au contenu" },
|
|
||||||
{ SPACE_PRECEDING_XMLDECL, 0, "supprimant l'espace blanc précédent Déclaration XML" },
|
|
||||||
{ MALFORMED_DOCTYPE, 0, "en rejetant malformé <!DOCTYPE>" },
|
|
||||||
{ BAD_XML_COMMENT, 0, "commentaires XML ne peut pas contenir --" },
|
|
||||||
{ DTYPE_NOT_UPPER_CASE, 0, "SYSTEM, PUBLIC, W3C, DTD, EN doit être en majuscules" },
|
|
||||||
{ ENCODING_IO_CONFLICT, 0, "encodage de sortie ne fonctionne pas avec la sortie standard" },
|
|
||||||
{ SUSPECTED_MISSING_QUOTE, 0, "manquant guillemet pour la valeur d'attribut" },
|
|
||||||
{ DUPLICATE_FRAMESET, 0, "élément répété FRAMESET" },
|
|
||||||
{ UNKNOWN_ELEMENT, 0, "%s n'est pas reconnue !" },
|
|
||||||
{ PREVIOUS_LOCATION, 0, "<%s> précédemment mentionnés" },
|
|
||||||
{ TidyXmlDecl, 0,
|
|
||||||
"Cette option spécifie si Tidy devrait ajouter la déclaration XML lors de la sortie "
|
|
||||||
"XML ou XHTML. <br/> Notez que si l'entrée comprend déjà un <code> & lt;?xml ... &>"
|
|
||||||
"</code> déclaration alors cette option sera ignorée. <br/> Si l'encodage pour la "
|
|
||||||
"sortie est différente de <var>ascii</var>, l'un des l'encodage <var>utf*</var> ou "
|
|
||||||
"<var>raw</var>, la déclaration est toujours ajouté que requis par la norme XML."
|
|
||||||
},
|
|
||||||
{ TidyXmlSpace, 0,
|
|
||||||
"Cette option spécifie si tidy doit ajouter <code>xml:espace=\"préserver \"</code> "
|
|
||||||
"pour des éléments tels que <code><pré></code>, <code><style></code> et "
|
|
||||||
"<code><script></code> lors de la génération de XML. <br />Il est nécessaire si "
|
|
||||||
"l'espace blanc dans ces éléments doit être analysée de manière appropriée sans avoir "
|
|
||||||
"accès à la DTD."
|
|
||||||
},
|
|
||||||
{ TidyAltText, 0,
|
|
||||||
"Cette option spécifie la valeur par défaut <code>alt=</code> utilise le texte Tidy "
|
|
||||||
"pour <code><img></code> attributs lorsque le <code>alt=</code> attribut est "
|
|
||||||
"absent. <br/> Utiliser avec précaution, car il est de votre responsabilité de rendre "
|
|
||||||
"vos documents accessibles aux personnes qui ne peuvent pas voir les images."
|
|
||||||
},
|
|
||||||
{ TidyXmlPIs, 0,
|
|
||||||
"Cette option spécifie si Tidy doit modifier l'analyse syntaxique des instructions de "
|
|
||||||
"traitement pour exiger <code>?></code> comme terminateur plutôt que <code>></"
|
|
||||||
"code>. <br/> Cette option est automatiquement activée si l'entrée est en XML."
|
|
||||||
},
|
|
||||||
{ TidyMakeBare, 0,
|
|
||||||
"Cette option spécifie si Tidy doit dépouiller Microsoft HTML spécifique à partir de "
|
|
||||||
"Word 2000 documents, et des espaces de sortie plutôt que des espaces insécables où "
|
|
||||||
"ils existent dans l'entrée."
|
|
||||||
},
|
|
||||||
{ TidyCSSPrefix, 0,
|
|
||||||
"Cette option spécifie le préfixe que Tidy utilise des règles de styles. <br/> Par "
|
|
||||||
"défaut, <var>c</var> sera utilisé."
|
|
||||||
},
|
|
||||||
{ TidyMakeClean, 0,
|
|
||||||
"Cette option spécifie si Tidy doit effectuer le nettoyage de certains anciens tags "
|
|
||||||
"de présentation (actuellement de <code>& lt; i></code>, <code><b></code>, "
|
|
||||||
"<code><centre></code> lorsque placé entre les balises inline appropriées, et "
|
|
||||||
"<code>< font></code>). Si <var>yes</var> puis balises existantes seront "
|
|
||||||
"remplacées par CSS le <code><style></code> balises et le balisage structurel "
|
|
||||||
"selon le cas."
|
|
||||||
},
|
|
||||||
{ TidyGDocClean, 0,
|
|
||||||
"Cette option spécifie si Tidy doit permettre un comportement spécifique pour le "
|
|
||||||
"nettoyage HTML exporté à partir de Google Docs."
|
|
||||||
},
|
|
||||||
{ TidyDoctype, 0,
|
|
||||||
"Cette option spécifie la déclaration DOCTYPE générée par Tidy. <br/> Si <var>omit</"
|
|
||||||
"var> la sortie ne contiendra une déclaration DOCTYPE. Notez que ce cela implique "
|
|
||||||
"aussi <code>numeric-entities</code> est réglé sur <var>yes</var>. <br/> Si "
|
|
||||||
"<code>html5</code> le DOCTYPE est réglé sur <code><! DOCTYPE html></code>. <br/"
|
|
||||||
"> Si <var>auto</var> (par défaut) Tidy utilisera une supposition basée sur le "
|
|
||||||
"contenu du document. <br/> Si elle est définie <var>strict</var>, Tidy établira le "
|
|
||||||
"DOCTYPE du HTML4 ou XHTML 1 DTD stricte. <br/> Si <var>loose</var>, le DOCTYPE est "
|
|
||||||
"réglé sur le HTML4 ou XHTML1 loose (transitional) DTD. <br/> Alternativement, vous "
|
|
||||||
"pouvez fournir une chaîne pour l'identificateur public formel (FPI).<br/> Par "
|
|
||||||
"exemple: <br/> <code>doctype: \"- // ACME // DTD HTML. 3,14159 //EN\"</code> <br/> "
|
|
||||||
"Si vous spécifiez le FPI pour un document XHTML, Tidy établira l'identifiant du "
|
|
||||||
"système à une chaîne vide. Pour un document HTML, Tidy ajoute un identificateur de "
|
|
||||||
"système que si l'on était déjà présent dans le but de préserver le mode de certains "
|
|
||||||
"navigateurs de traitement. Tidy quitte le DOCTYPE pour les documents XML génériques "
|
|
||||||
"inchangés. <br/> Cette option ne permet pas une validation du document de conformité."
|
|
||||||
},
|
|
||||||
{ TidyDropEmptyElems, 0, "Cette option spécifie si Tidy doit jeter des éléments vides." },
|
|
||||||
{ TidyDropEmptyParas, 0, "Cette option spécifie si Tidy doit jeter des paragraphes vides." },
|
|
||||||
{ TidyFixUri, 0,
|
|
||||||
"Cette option spécifie si Tidy doit vérifier les valeurs d'attributs qui portent URI "
|
|
||||||
"pour des caractères illégaux et si ce sont trouvés, leur échapper en HTML 4 "
|
|
||||||
"recommande."
|
|
||||||
},
|
|
||||||
{ TidyPPrintTabs, 0,
|
|
||||||
"Cette option spécifie si tidy doit Indenter avec tabulation au lieu des espaces, en "
|
|
||||||
"supposant <code>indent</code> est <var>yes</var>. <br/>Définir sur <var>yes</var> "
|
|
||||||
"pour indenter avec des tabulations au lieu de la valeur par défaut des espaces. <br /"
|
|
||||||
">Utilisez l'option <code>indent-spaces</code> pour contrôler le nombre d'onglets "
|
|
||||||
"Sortie par niveau de tiret. Notez que lorsque <code>indent-with-tabs</code> est "
|
|
||||||
"activée. La valeur par défaut de <code>indent-spaces</code> est réinitialisé à "
|
|
||||||
"<var>1</var>. <br/>Remarque <code>tab-size</code> contrôle la conversion des espaces "
|
|
||||||
"d'entrée. Définissez-le à zéro pour conserver onglets de saisie."
|
|
||||||
},
|
|
||||||
{ TidySkipNested, 0,
|
|
||||||
"Cette option spécifie que Tidy doit ignorer les balises imbriquées lors de l'analyse "
|
|
||||||
"des données de script et de style."
|
|
||||||
},
|
|
||||||
|
|
||||||
#if SUPPORT_CONSOLE_APP
|
#if SUPPORT_CONSOLE_APP
|
||||||
{ TidyDiagnostics, 0, "diagnostics" },
|
|
||||||
{ TidyEncoding, 0, "encoding" },
|
|
||||||
{ TidyMarkup, 0, "markup" },
|
|
||||||
{ TidyMiscellaneous, 0, "misc" },
|
|
||||||
{ TidyPrettyPrint, 0, "imprimer" },
|
|
||||||
{ TC_LABEL_COL, 0, "colonne" },
|
{ TC_LABEL_COL, 0, "colonne" },
|
||||||
{ TC_LABEL_FILE, 0, "fichier" },
|
{ TC_LABEL_FILE, 0, "fichier" },
|
||||||
{ TC_LABEL_LANG, 0, "lang" },
|
{ TC_LABEL_LANG, 0, "lang" },
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* Orginating PO file metadata:
|
* Orginating PO file metadata:
|
||||||
* PO_LAST_TRANSLATOR=jderry
|
* PO_LAST_TRANSLATOR=jderry
|
||||||
* PO_REVISION_DATE=2017-03-15 17:35:16
|
* PO_REVISION_DATE=2017-03-22 15:54:52
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
|
|
@ -486,8 +486,6 @@ void TY_(ReportAttrError)(TidyDocImpl* doc, Node *node, AttVal *av, uint code)
|
||||||
|
|
||||||
switch (code)
|
switch (code)
|
||||||
{
|
{
|
||||||
case UNKNOWN_ATTRIBUTE:
|
|
||||||
case INSERTING_ATTRIBUTE:
|
|
||||||
case MISSING_ATTR_VALUE:
|
case MISSING_ATTR_VALUE:
|
||||||
case XML_ATTRIBUTE_VALUE:
|
case XML_ATTRIBUTE_VALUE:
|
||||||
case PROPRIETARY_ATTRIBUTE:
|
case PROPRIETARY_ATTRIBUTE:
|
||||||
|
@ -937,28 +935,31 @@ void TY_(ReportNumWarnings)( TidyDocImpl* doc )
|
||||||
* For macro documentation, refer to the comments in `tidyenum.h`.
|
* For macro documentation, refer to the comments in `tidyenum.h`.
|
||||||
*********************************************************************/
|
*********************************************************************/
|
||||||
|
|
||||||
typedef struct tidyErrorFilterKeyItem {
|
typedef struct tidyStringsKeyItem {
|
||||||
ctmbstr key;
|
ctmbstr key;
|
||||||
int value;
|
int value;
|
||||||
} tidyErrorFilterKeyItem;
|
} tidyStringsKeyItem;
|
||||||
|
|
||||||
static const tidyErrorFilterKeyItem tidyErrorFilterKeysStruct[] = {
|
static const tidyStringsKeyItem tidyStringsKeys[] = {
|
||||||
{ "tidyMessageCodes_first", tidyMessageCodes_first },
|
|
||||||
FOREACH_MSG_ENTITIES(MAKE_STRUCT)
|
FOREACH_TIDYCONFIGCATEGORY(MAKE_STRUCT)
|
||||||
FOREACH_MSG_ELEMENT(MAKE_STRUCT)
|
FOREACH_MSG_MISC(MAKE_STRUCT)
|
||||||
FOREACH_MSG_ATTRIBUTE(MAKE_STRUCT)
|
FOREACH_DIALOG_MSG(MAKE_STRUCT)
|
||||||
FOREACH_MSG_ENCODING(MAKE_STRUCT)
|
FOREACH_REPORT_MSG(MAKE_STRUCT)
|
||||||
FOREACH_MSG_OTHER(MAKE_STRUCT)
|
|
||||||
|
{ "TIDYSTRINGS_FIRST", TIDYSTRINGS_FIRST },
|
||||||
|
|
||||||
#if SUPPORT_ACCESSIBILITY_CHECKS
|
#if SUPPORT_ACCESSIBILITY_CHECKS
|
||||||
FOREACH_MSG_ACCESS(MAKE_STRUCT) /* Defined in `access.h` */
|
FOREACH_ACCESS_MSG(MAKE_STRUCT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
FOREACH_MSG_MISC(MAKE_STRUCT)
|
|
||||||
FOREACH_MSG_CONSOLE(MAKE_STRUCT)
|
|
||||||
|
|
||||||
{ "tidyMessageCodes_last", tidyMessageCodes_last },
|
#if SUPPORT_CONSOLE_APP
|
||||||
{ NULL, 0 },
|
FOREACH_MSG_CONSOLE(MAKE_STRUCT)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
{ "TIDYSTRINGS_LAST", TIDYSTRINGS_LAST },
|
||||||
|
{ NULL, 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -968,9 +969,9 @@ static const tidyErrorFilterKeyItem tidyErrorFilterKeysStruct[] = {
|
||||||
ctmbstr TY_(tidyErrorCodeAsKey)(uint code)
|
ctmbstr TY_(tidyErrorCodeAsKey)(uint code)
|
||||||
{
|
{
|
||||||
uint i = 0;
|
uint i = 0;
|
||||||
while (tidyErrorFilterKeysStruct[i].key) {
|
while (tidyStringsKeys[i].key) {
|
||||||
if ( tidyErrorFilterKeysStruct[i].value == code )
|
if ( tidyStringsKeys[i].value == code )
|
||||||
return tidyErrorFilterKeysStruct[i].key;
|
return tidyStringsKeys[i].key;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return "UNDEFINED";
|
return "UNDEFINED";
|
||||||
|
@ -983,9 +984,9 @@ ctmbstr TY_(tidyErrorCodeAsKey)(uint code)
|
||||||
uint TY_(tidyErrorCodeFromKey)(ctmbstr code)
|
uint TY_(tidyErrorCodeFromKey)(ctmbstr code)
|
||||||
{
|
{
|
||||||
uint i = 0;
|
uint i = 0;
|
||||||
while (tidyErrorFilterKeysStruct[i].key) {
|
while (tidyStringsKeys[i].key) {
|
||||||
if ( strcmp(tidyErrorFilterKeysStruct[i].key, code) == 0 )
|
if ( strcmp(tidyStringsKeys[i].key, code) == 0 )
|
||||||
return tidyErrorFilterKeysStruct[i].value;
|
return tidyStringsKeys[i].value;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
return UINT_MAX;
|
return UINT_MAX;
|
||||||
|
@ -1001,7 +1002,7 @@ static const uint tidyErrorCodeListSize()
|
||||||
|
|
||||||
if ( array_size == 0 )
|
if ( array_size == 0 )
|
||||||
{
|
{
|
||||||
while ( tidyErrorFilterKeysStruct[array_size].key ) {
|
while ( tidyStringsKeys[array_size].key ) {
|
||||||
array_size++;
|
array_size++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1024,7 +1025,7 @@ TidyIterator TY_(getErrorCodeList)()
|
||||||
*/
|
*/
|
||||||
uint TY_(getNextErrorCode)( TidyIterator* iter )
|
uint TY_(getNextErrorCode)( TidyIterator* iter )
|
||||||
{
|
{
|
||||||
const tidyErrorFilterKeyItem *item = NULL;
|
const tidyStringsKeyItem *item = NULL;
|
||||||
size_t itemIndex;
|
size_t itemIndex;
|
||||||
assert( iter != NULL );
|
assert( iter != NULL );
|
||||||
|
|
||||||
|
@ -1032,7 +1033,7 @@ uint TY_(getNextErrorCode)( TidyIterator* iter )
|
||||||
|
|
||||||
if ( itemIndex > 0 && itemIndex <= tidyErrorCodeListSize() )
|
if ( itemIndex > 0 && itemIndex <= tidyErrorCodeListSize() )
|
||||||
{
|
{
|
||||||
item = &tidyErrorFilterKeysStruct[itemIndex - 1];
|
item = &tidyStringsKeys[itemIndex - 1];
|
||||||
itemIndex++;
|
itemIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -269,6 +269,11 @@ TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message )
|
||||||
return message.tidyDoc;
|
return message.tidyDoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint TY_(getMessageCode)( TidyMessageImpl message )
|
||||||
|
{
|
||||||
|
return message.code;
|
||||||
|
}
|
||||||
|
|
||||||
ctmbstr TY_(getMessageKey)( TidyMessageImpl message )
|
ctmbstr TY_(getMessageKey)( TidyMessageImpl message )
|
||||||
{
|
{
|
||||||
return message.messageKey;
|
return message.messageKey;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#define messageobj_h
|
#define messageobj_h
|
||||||
|
|
||||||
/**************************************************************************//**
|
/**************************************************************************//**
|
||||||
* @file messageobj.h
|
* @file
|
||||||
* Provides an external, extensible API for message reporting.
|
* Provides an external, extensible API for message reporting.
|
||||||
*
|
*
|
||||||
* This module implements the `_TidyMessageImpl` structure (declared in
|
* This module implements the `_TidyMessageImpl` structure (declared in
|
||||||
|
@ -65,6 +65,9 @@ void TY_(tidyMessageRelease)( TidyMessageImpl *message );
|
||||||
/** get the document the message came from. */
|
/** get the document the message came from. */
|
||||||
TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message );
|
TidyDocImpl* TY_(getMessageDoc)( TidyMessageImpl message );
|
||||||
|
|
||||||
|
/** get the message key code. */
|
||||||
|
uint TY_(getMessageCode)( TidyMessageImpl message );
|
||||||
|
|
||||||
/** get the message key string. */
|
/** get the message key string. */
|
||||||
ctmbstr TY_(getMessageKey)( TidyMessageImpl message );
|
ctmbstr TY_(getMessageKey)( TidyMessageImpl message );
|
||||||
|
|
||||||
|
|
|
@ -708,6 +708,12 @@ TidyDoc TIDY_CALL tidyGetMessageDoc( TidyMessage tmessage )
|
||||||
return tidyImplToDoc(doc);
|
return tidyImplToDoc(doc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint TIDY_CALL tidyGetMessageCode( TidyMessage tmessage )
|
||||||
|
{
|
||||||
|
TidyMessageImpl *message = tidyMessageToImpl(tmessage);
|
||||||
|
return TY_(getMessageCode)(*message);
|
||||||
|
}
|
||||||
|
|
||||||
ctmbstr TIDY_CALL tidyGetMessageKey( TidyMessage tmessage )
|
ctmbstr TIDY_CALL tidyGetMessageKey( TidyMessage tmessage )
|
||||||
{
|
{
|
||||||
TidyMessageImpl *message = tidyMessageToImpl(tmessage);
|
TidyMessageImpl *message = tidyMessageToImpl(tmessage);
|
||||||
|
@ -1452,7 +1458,7 @@ int tidyDocRunDiagnostics( TidyDocImpl* doc )
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( doc->errors > 0 && !force )
|
if ( doc->errors > 0 && !force )
|
||||||
TY_(DialogueMessage)(doc, TEXT_NEEDS_INTERVENTION, TidyDialogueDoc);
|
TY_(DialogueMessage)(doc, STRING_NEEDS_INTERVENTION, TidyDialogueDoc);
|
||||||
|
|
||||||
return tidyDocStatus( doc );
|
return tidyDocStatus( doc );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue