sphinxext: Include branch information in source name

It is nice if POT files generated by sphinx gettext contains
branch information in source name as translators can easily know
which string comes from which release.

Currently, all strings rendered by reno have "../../../<reno.sphinxext>:1"
as source name. This patch adds branch information to this.

Change-Id: Ie48d6c869aa7768dc08be62aeea1404a5104f2ef
This commit is contained in:
Akihiro Motoki 2017-03-10 00:26:16 +09:00
parent 6d67626e2b
commit d12c211172
1 changed files with 1 additions and 1 deletions

View File

@ -96,7 +96,7 @@ class ReleaseNotesDirective(rst.Directive):
versions,
title=title,
)
source_name = '<' + __name__ + '>'
source_name = '<%s %s>' % (__name__, branch or 'current branch')
result = statemachine.ViewList()
for line in text.splitlines():
result.append(line, source_name)