Browse Source

Check that all po/pot files are valid

Perform minimal checks on po and pot files so that no broken files can
get imported.

Change-Id: I9b5edbad9f4302ca24e4255f503ee2db45ebd5d7
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Related-Bug: #1299349
changes/43/84243/1
Andreas Jaeger 5 years ago
parent
commit
6c24c72de4
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      tox.ini

+ 5
- 1
tox.ini View File

@@ -7,6 +7,7 @@ skipsdist = True
7 7
 setenv =
8 8
    VIRTUAL_ENV={envdir}
9 9
 deps = -r{toxinidir}/test-requirements.txt
10
+whitelist_externals = bash
10 11
 
11 12
 [testenv:venv]
12 13
 commands = {posargs}
@@ -15,7 +16,10 @@ commands = {posargs}
15 16
 commands = openstack-doc-test --check-niceness {posargs}
16 17
 
17 18
 [testenv:checksyntax]
18
-commands = openstack-doc-test --check-syntax {posargs}
19
+commands =
20
+    openstack-doc-test --check-syntax {posargs}
21
+    # Check that .po and .pot files are valid:
22
+    bash -c "find doc -type f -regex '.*\.pot?' -print0|xargs --null -n 1 msgfmt --check-format -o /dev/null"
19 23
 
20 24
 [testenv:checkdeletions]
21 25
 commands = openstack-doc-test --check-deletions {posargs}

Loading…
Cancel
Save