Mercurial > hg
annotate contrib/chg/README @ 29397:844f72885fb9
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)
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Tue, 21 Jun 2016 00:50:39 +0900 |
parents | 66d41c9e9222 |
children | 4c8d9b53b1c7 |
rev | line source |
---|---|
28060 | 1 cHg |
2 === | |
3 | |
4 A fast client for Mercurial command server running on Unix. | |
5 | |
6 Install: | |
7 | |
8 $ make | |
9 $ make install | |
10 | |
11 Usage: | |
12 | |
13 $ chg help # show help of Mercurial | |
14 $ alias hg=chg # replace hg command | |
15 $ chg --kill-chg-daemon # terminate background server | |
16 | |
17 Environment variables: | |
18 | |
19 Although cHg tries to update environment variables, some of them cannot be | |
20 changed after spawning the server. The following variables are specially | |
21 handled: | |
22 | |
28454 | 23 * configuration files are reloaded automatically by default. |
28060 | 24 * CHGHG or HG specifies the path to the hg executable spawned as the |
25 background command server. | |
26 | |
27 The following variables are available for testing: | |
28 | |
29 * CHGDEBUG enables debug messages. | |
30 * CHGSOCKNAME specifies the socket path of the background cmdserver. | |
29345 | 31 * CHGTIMEOUT specifies how many seconds chg will wait before giving up |
29357
66d41c9e9222
chg: change default connect timeout to 60 seconds
Jun Wu <quark@fb.com>
parents:
29345
diff
changeset
|
32 connecting to a cmdserver. If it is 0, chg will wait forever. Default: 60 |