Commit graph

56 commits

Author SHA1 Message Date
Jim Derry f2b87ccd7b Address #542
- change message to indicated missing quote is only suspected.
- change severity to TidyWarning.
- Update POT with new string.
2017-09-29 10:42:21 -04:00
Jim Derry 0a8154b97e Merge branch 'next' into issue_476 2017-09-28 13:25:45 -04:00
Jim Derry df3bde38ec Introduced auto behavior to the fix-bad-comments option so that yes or
`no` could be applied automatically per the document type. This is the new
default.
2017-09-25 15:26:03 -04:00
Jim Derry 483e0fec9e Address issue #476, which started out as a simple message update.
- Change default value of `--fix-bad-comments` to `no`.
  - Ensure that when _not_ fixing, nothing is actually fixed.
  - Ensure that when fixing, initial adjacent hyphens actually are fixed.
  - Issue tidyinfo for all fixes made.
  - Issue tidywarning when when not making fixes for non-HTML5 doctypes.
2017-09-24 18:15:40 -04:00
Jim Derry 965b92a09c Addresses #435 by updating documentation. 2017-09-24 13:42:16 -04:00
Jim Derry 20a1b7bb69 Updated documentation relating to new option. 2017-09-23 07:53:57 -04:00
Rafael Fontenelle b5db02aeb9 Update Brazilian Portuguese translation 2017-09-21 00:43:48 -03:00
Jim Derry 9614019e8c Added Portuguese (Brazil) localization to Tidy.
Rebased the new language due to organization of strings in newest-next.
Bumped version for external changes.
2017-09-20 17:57:42 -04:00
Jim Derry c88f9c318c Merge branch 'include-portuguese-brazil' of https://github.com/rffontenelle/tidy-html5 into rffontenelle-include-portuguese-brazil 2017-09-20 17:49:22 -04:00
Rafael Fontenelle c1a4f018df Add Brazilian Portuguese translation 2017-09-19 15:38:49 -03:00
Jim Derry 55ceb55fad Updated PO's and languages with minor changes from English. 2017-09-19 14:03:45 -04:00
Jim Derry 51e2e0f3bd Following the example of the recent changes in the "reports" aspect of Tidy's
output, classify and organize all of the dialogue type of messages. This paves
the way towards formalizing (and expanding!) the footnotes system with much
greater explanatory text, as well as providing much better fine-grained control
over which types of output that Tidy will produce.

Moved STRING_DOCTYPE_GIVEN, STRING_CONTENT_LOOKS, and STRING_NO_SYSID to the
Report paradigm from the Dialogue paradigm, as these are items that are
traditionally TidyInfo and included in the Report table, rather than any type
of dialogue.

At this point, we are exactly passing all tests.
2017-09-19 13:52:27 -04:00
Jim Derry 6bce1b377f Updated the POs and POT to reflect the re-sorted strings.
Updated language_fr.h reflect the re-sorted strings.
2017-09-06 20:55:36 -04:00
Jim Derry 279dd55280 Regenerated PO's and POT. 2017-09-04 17:46:07 -04:00
Jim Derry 2c82cfa23b Inventoried current error strings, and removed/commented out several:
- BAD_COMMENT_CHARS
  - BAD_XML_COMMENT
  - DTYPE_NOT_UPPER_CASE
  - ENCODING_IO_CONFLICT
  - INCONSISTENT_NAMESPACE
  - INCONSISTENT_VERSION
  - INDICATE_CHANGES_IN_LANGUAGE
  - UNESCAPED_ELEMENT
  - XML_ATTRIBUTE_VALUE
Re-sorted new tidy options.
All tests passing.
Bump version to reflect strings that are externally accessible to API.
2017-08-31 12:57:58 -04:00
Jim Derry 2780f01e9a Merge pull request #589 from niczero/f_en-gb
Fixed some en_gb spellings
2017-08-28 14:24:49 -04:00
Jim Derry e8e83dbe9f Regenerated POs and POT for new strings. No version bump required. 2017-08-28 10:06:41 -04:00
Nic Sandfield 090e3fca73 Fixed some en_gb spellings 2017-08-24 11:28:17 +01:00
Sébastien Ballesté-Antich e07b54a4da Improve french language with poconvert. 2017-05-16 22:38:39 +02:00
Sébastien Ballesté-Antich cc4ad195c5 Add 3 msgid introduced in commit 5791c55 2017-05-16 21:43:58 +02:00
Sébastien Ballesté-Antich 7feab96480 Improve french translations. 2017-05-16 19:03:12 +02:00
Jim Derry 5791c55081 Update languages against current English. 2017-05-13 21:07:02 -04:00
Jim Derry 5f05add439 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.
2017-03-22 16:05:13 -04:00
Jim Derry 929575afb4 Picklist enums should all start at zero for external LibTidy user compatibility.
Restore the new custom-tags enum to this state, and add separate string keys.
Updated PO's to reflect; no change to headers.
2017-03-20 12:20:51 -04:00
Jim Derry a4f752f274 Implement TODO:
- tidyDetectedHtmlVersion()
- tidyDetectedXhtml()
- added two new fields to W3C_Doctypes[] in order to simplify this.
- added TY_(HTMLVersionNumberFromCode)() to enable lookup.
- Implement tidyDetectedGenericXml()
- Added a warning message if an XML declaration exists but the document is not
  XHTML.
- Remove dead commented code.
- Updated POs and POT. Headers not affected, but translators should check
  their translations.
- Testing is clean on Mac OS X, Ubuntu 16.04, and Windows 10.
2017-03-19 15:41:51 -04:00
Jim Derry 0c5550b06f I think the messages are where I want them to be. Will generate test cases
for comparison. Also regen'd all pots and language headers.
2017-03-15 17:36:05 -04:00
Jim Derry 66de84bc2b - Add support for the is attribute.
- Add support for autonomous custom elements.
2017-03-13 13:45:32 -04:00
Jim Derry 4dc8a2cf9a Bump version to 5.5.5 for this fiasco, and fix poor planning and unfortunate
merge.
  - Sort all of the existing options and re-indent per Tidy standards. This is
    simply for cosmetic effect.
  - Allow the iterator to return all options again, even "internal" options.
    Things are too embedded with N_TIDY_OPTIONS, etc., to try to hide them.
  - Instead, simply add documentation to LibTidy users that they shouldn't use
    internal options.
  - Also added `TidyInternalCategory` to `TidyConfigCategory` without adding a
    new field to the struct. API users should check for this category before
    use.
  - Defined a two character macro for `TidyInternalCategory` for use in
    `option_defs[]`.
  - Changed struct `option_defs[]` to reflect the new category for affected
    options.
  - Removed string indicating * refers to internal options, since it no longer
    applies.
  - Regen'd all strings for previous point.
  - `tidy.c` now checks for `TidyInternalCategory` everywhere in order to
    suppress output.
2017-03-10 09:13:21 -05:00
Jim Derry 978756a482 Restore the previous status of gnu-emacs-file
- Updated strings files to match.
- Inhibit internal options from being output via the iterator. Internals should
  never have the chance to be exposed if they shouldn't be use.
- Added tidySetEmacsFile() and TidyGetEmacsFile() to the public API, and use it
  instead of secret API to set the filename in the console application.

The end result is that `gnu-emacs-file` (and also `doctype-mode`) officially no
longer exist to CLI users nor to API users, and tidy console behaves properly
by using a published API to set the filename for emacs.
2017-03-07 20:11:31 -05:00
Jim Derry 74a4fa4049 Merge branch 'next' into clean_deprecations 2017-03-02 11:40:14 -05:00
Jim Derry 3be515b1f9 Merge branch 'next' into messages_squashed 2017-03-02 09:34:58 -05:00
Jim Derry bb2cb26372 Update README documents with information for the upcoming 5.4.0 release. 2017-02-24 14:30:42 -05:00
Jim Derry c54c10f857 - Removed deprecated options:
- TidySlideStyle
  - TidyBurstSlides

- Added documentation for TidyEmacsFile, since it's a valid option.

- Because TidyEmacsFile is a valid option, tweaked tidy.c so that it can
  be specified in a configuration file without being overwritten by the console
  app. Why a user might do this is dumb, but who are we to stop them.
2017-02-18 18:30:41 -05:00
Jim Derry 165acc4f3e 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.
2017-02-17 15:29:26 -05:00
Marc-Etienne Vargenau fb10e80099 Improve French translation. 2016-06-29 18:12:26 +02:00
Geoff McLane e87f26c247 Merge pull request #388 from htacg/fr.po
Merge fr.po to master
2016-03-27 19:54:54 +02:00
Geoff McLane 193320571b add WIP fr.po 2016-03-26 20:20:42 +01:00
Jim Derry 7d2ddee775 Add new rebase command to CLI.
This is intended to make it very, very easy to update the POT and all of the POs when
changes are made to `language_en.h`. Used without an sha-1 hash, untranslated strings
(i.e., the "source" strings) are updated in the POT/PO's.

However if you specify an --sha=HASH (or -c HASH) option, then the script will use git
to examine the `language_en.h` file from that specified commit, determing the strings
that have changed, and mark all of these strings as `fuzzy` in the POs. This will serve
as a flag to translators that the original has changed. In addition, this `fuzzy` flag
will appear in the headers as "(fuzzy) " in the item comments.

If a translator edits the header directly, he should remove the "(fuzzy )" in the
comment. Then when the PO is rebuilt, the fuzzy flag will be removed automatically.
The reverse is also true; if a translator is working with the PO, he or she should
clear the fuzzy flag and the comment will be adjusted accordingly in the generated
header.
2016-03-25 09:21:21 +08:00
Jim Derry ad7bdee3b9 Added translator comments to new TidyEscapeScripts option, and updated POT and POs to reflect this. 2016-03-24 11:00:47 +08:00
Jim Derry a353523873 Spaceing 2016-03-24 10:40:21 +08:00
Jim Derry d0ec84c169 Merge branch 'master' into lang_help_enhance 2016-03-24 10:37:37 +08:00
Jim Derry 9ecdf30774 Localization fixes:
- Correct format specifiers.
- Fix missing trailing quote if following escaped quote. #385
- Don't put developer comments into generated headers unless --force-comments is used.
- Ruby 1.9.3 fix.
- Initial fuzzy support.
- Fix two character lang codes not working.
2016-03-24 10:31:56 +08:00
Jim Derry 71d6ca1392 Oops. Didn't commit es changes. This fixes that. 2016-03-23 15:10:07 +08:00
Jim Derry d54785c933 language help enhancements:
- Show the language Tidy is using.
- Update the POT and POs with the modified string.
- Regen language_es.h, which uses the string.

Note that the new header uses the new commentless behavior that's still
pending in another branch. In addition the proper c style hints have
been added to all PO's, as their previous absense was a bug.
2016-03-23 14:56:36 +08:00
Jim Derry ee151f07f1 Ruby 1.9.3 fix. 2016-03-23 13:27:17 +08:00
Jim Derry 39e4f16b48 Don't put developer comments into generated headers unless --force-comments is used. 2016-03-22 11:26:32 +08:00
Jim Derry 3cd1a87c44 Fix missing trailing quote if following escaped quote. #385 2016-03-22 11:01:41 +08:00
Jim Derry 91e8e6bf1e Correct format specifiers. 2016-03-22 10:35:03 +08:00
Jim Derry da8205b2dc Regen'd POT, POs, and headers in order to capture documentation changes in all of them. 2016-02-17 20:07:00 +08:00
Jim Derry 7b8019c6ef Regenerated PO's for new strings. 2016-02-16 11:46:20 +08:00