Handle translations, update RELEASE NOTES
Ignore patches that only update the po files unless translations should be built. Update release information for 0.19. Change-Id: I587688d207d244e72e1fc035d4fe5d72a1b5da88
This commit is contained in:
parent
48ee5d3f5e
commit
58e92c0ce6
|
@ -1,8 +1,16 @@
|
|||
Release notes
|
||||
=============
|
||||
|
||||
0.19
|
||||
----
|
||||
|
||||
* ``openstack-doc-test``: Optimize translation imports, improve output
|
||||
messages.
|
||||
* ``autohelp.py``: Improve sanitizer.
|
||||
|
||||
0.18.1
|
||||
------
|
||||
|
||||
* Fix ``doc-tools-check-languages`` to handle all repositories and
|
||||
setups.
|
||||
|
||||
|
|
|
@ -319,6 +319,27 @@ def www_touched():
|
|||
return www_changed and not other_changed
|
||||
|
||||
|
||||
def only_po_touched():
|
||||
"""Check whether only files in locale directory are touched."""
|
||||
|
||||
try:
|
||||
git_args = ["git", "diff", "--name-only", "HEAD~1", "HEAD"]
|
||||
modified_files = check_output(git_args).strip().split()
|
||||
except (subprocess.CalledProcessError, OSError) as e:
|
||||
print("git failed: %s" % e)
|
||||
sys.exit(1)
|
||||
|
||||
locale_changed = False
|
||||
other_changed = False
|
||||
for f in modified_files:
|
||||
if "/locale/" in f and f.endswith((".po", ".pot")):
|
||||
locale_changed = True
|
||||
else:
|
||||
other_changed = True
|
||||
|
||||
return locale_changed and not other_changed
|
||||
|
||||
|
||||
def check_modified_affects_all(rootdir):
|
||||
"""Check whether special files were modified.
|
||||
|
||||
|
@ -1447,6 +1468,10 @@ def doctest():
|
|||
print("Only files in www directory changed, nothing to do.\n")
|
||||
return
|
||||
|
||||
if not CONF.force and not CONF.language and only_po_touched():
|
||||
print("Only files in locale directories changed, nothing to do.\n")
|
||||
return
|
||||
|
||||
if CONF.check_syntax or CONF.check_niceness or CONF.check_links:
|
||||
if CONF.force:
|
||||
errors += validate_all_files(doc_path, FILE_EXCEPTIONS,
|
||||
|
|
Loading…
Reference in New Issue