sapling/doc
FUJIWARA Katsunori f46b49a0e3 check-code: detect "missing _() in ui message" more exactly
Before this patch, "missing _() in ui message" rule overlooks
translatable message, which starts with other than alphabet.

To detect "missing _() in ui message" more exactly, this patch
improves the regexp with assumptions below.

  - sequence consisting of below might precede "translatable message"
    in same string token

    - formatting string, which starts with '%'
    - escaped character, which starts with 'b' (as replacement of '\\'), or
    - characters other than '%', 'b' and 'x' (as replacement of alphabet)

  - any string tokens might precede a string token, which contains
    "translatable message"

This patch builds an input file, which is used to examine "missing _()
in ui message" detection, before '"$check_code" stringjoin.py' in
test-contrib-check-code.t, because this reduces amount of change churn
in subsequent patch.

This patch also applies "()" instead of "_()" on messages below to
hide false-positives:

  - messages for ui.debug() or debug commands/tools
    - contrib/debugshell.py
    - hgext/win32mbcs.py (ui.write() is used, though)
    - mercurial/commands.py
      - _debugchangegroup
      - debugindex
      - debuglocks
      - debugrevlog
      - debugrevspec
      - debugtemplate

  - untranslatable messages
    - doc/gendoc.py (ReST specific text)
    - hgext/hgk.py (permission string)
    - hgext/keyword.py (text written into configuration file)
    - mercurial/cmdutil.py (formatting strings for JSON)
2016-06-21 00:50:39 +09:00
..
check-seclevel.py py3: make check-seclevel use absolute_import 2016-04-17 00:14:42 +05:30
docchecker py3: make doc/docchecker use print_function 2016-05-13 02:41:35 +05:30
gendoc.py check-code: detect "missing _() in ui message" more exactly 2016-06-21 00:50:39 +09:00
hgmanpage.py py3: convert to next() function 2016-05-16 21:30:53 +00:00
Makefile doc: make i18n man and html 2013-07-03 21:50:20 +09:00
README doc/README: simplify instructions 2009-09-03 21:40:45 +02:00
runrst doc: translate from :hg:help config.SECTION to a valid link to hgrc.5.html 2016-02-11 23:15:34 +09:00
style.css urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00

Mercurial's documentation is kept in reStructuredText format, which is
a simple plain text format that's easy to read and edit:

  http://docutils.sourceforge.net/rst.html

It's also convertible to a variety of other formats including standard
UNIX man page format and HTML. You'll need to install Docutils:

  http://docutils.sourceforge.net/

Use the Makefile in this directory to generate the man and HTML pages.