1- ## msgcheck
1+ = msgcheck
2+ :author: Sébastien Helleu
3+ :email: flashcode@flashtux.org
4+ :lang: en
25
3- [ ![ Build Status ] ( https://travis-ci.org/flashcode/msgcheck.svg?branch=master )] ( https://travis-ci.org/flashcode/msgcheck )
6+ image: https://travis-ci.org/flashcode/msgcheck.svg?branch=master["Build Status", link=" https://travis-ci.org/flashcode/msgcheck"]
47
58`msgcheck` performs various checks on gettext files (with extension ".po"):
69
710* compilation (with command `msgfmt -c` )
811* for each translation:
9- * number of lines in translated strings
10- * whitespace at beginning/end of strings
11- * trailing whitespace at end of lines inside strings
12- * punctuation at end of strings
13- * spelling (messages and translations)
12+ * * number of lines in translated strings
13+ * * whitespace at beginning/end of strings
14+ * * trailing whitespace at end of lines inside strings
15+ * * punctuation at end of strings
16+ * * spelling (messages and translations)
1417
1518 The script requires Python >= 2.7.
1619
1720Module `pyenchant` is required if spelling is checked (option `-s` ).
1821
19- ## Install
22+ == Install
2023
2124Install a released version from the Python package index with pip:
2225
23- $ pip install msgcheck
26+ ----
27+ $ pip install msgcheck
28+ ----
2429
2530Install via source distribution:
2631
27- $ python setup.py install
32+ ----
33+ $ python setup.py install
34+ ----
2835
29- ## Usage
36+ == Usage
3037
3138Syntax:
3239
33- $ msgcheck [options] file.po [file.po...]
40+ ----
41+ $ msgcheck [options] file.po [file.po...]
42+ ----
3443
3544Options:
3645
@@ -57,39 +66,43 @@ Options:
5766
5867Environment variable `MSGCHECK_OPTIONS` can be set with some default options.
5968
60- The script returns following exit code:
61- 0: all files checked are OK (0 errors) (or --extract given)
62- n: number of files with errors (n >= 1)
63-
64- ## Example
65-
66- $ msgcheck fr.po
67- ======================================================================
68- /path/to/fr.po:242: [punct] end punctuation: ":" in translation, ":" not in string:
69- ---
70- error
71- ---
72- erreur:
73- ======================================================================
74- /path/to/fr.po:262: [lines] number of lines: 1 in string, 2 in translation:
75- ---
76- Message filters:
77- ---
78- Filtres de
79- messages:
80- ======================================================================
81- /path/to/fr.po:336: [whitespace] spaces at beginning: 0 in string, 1 in translation:
82- ---
83- current value
84- ---
85- valeur courante
86- ======================================================================
87- /path/to/fr.po: 3 errors (almost good!)
88-
89- ## Copyright
69+ The script returns exit code *0* if all files checked are OK
70+ (0 errors or option `--extract` given) or it returns *n*: number of files with
71+ errors (n >= 1).
72+
73+ == Example
74+
75+ ----
76+ $ msgcheck fr.po
77+ ======================================================================
78+ /path/to/fr.po:242: [punct] end punctuation: ":" in translation, ":" not in string:
79+ ---
80+ error
81+ ---
82+ erreur:
83+ ======================================================================
84+ /path/to/fr.po:262: [lines] number of lines: 1 in string, 2 in translation:
85+ ---
86+ Message filters:
87+ ---
88+ Filtres de
89+ messages:
90+ ======================================================================
91+ /path/to/fr.po:336: [whitespace] spaces at beginning: 0 in string, 1 in translation:
92+ ---
93+ current value
94+ ---
95+ valeur courante
96+ ======================================================================
97+ /path/to/fr.po: 3 errors (almost good!)
98+ ----
99+
100+ == Copyright
90101
91102Copyright (C) 2009-2016 Sébastien Helleu <flashcode@flashtux.org>
92103
104+ This file is part of msgcheck.
105+
93106This program is free software; you can redistribute it and/or modify
94107it under the terms of the GNU General Public License as published by
95108the Free Software Foundation; either version 3 of the License, or
0 commit comments