summaryrefslogtreecommitdiff
path: root/sphinx
diff options
context:
space:
mode:
authorshimizukawa <shimizukawa@gmail.com>2013-01-30 00:13:58 +0900
committershimizukawa <shimizukawa@gmail.com>2013-01-30 00:13:58 +0900
commit04e38ec4c4d97499afc7c734dbd8cffdab771ce1 (patch)
treeee606ca141006ddb2be23f6c3194ee33e89770ad /sphinx
parent2725068ad0ae80a0d2ee37ad5e81901266f595db (diff)
downloadsphinx-04e38ec4c4d97499afc7c734dbd8cffdab771ce1.tar.gz
Fix gettext does not extract glossary terms. Closes #1090
Diffstat (limited to 'sphinx')
-rw-r--r--sphinx/domains/std.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/domains/std.py b/sphinx/domains/std.py
index 56b7015a..31db31db 100644
--- a/sphinx/domains/std.py
+++ b/sphinx/domains/std.py
@@ -22,7 +22,7 @@ from sphinx.locale import l_, _
from sphinx.domains import Domain, ObjType
from sphinx.directives import ObjectDescription
from sphinx.util import ws_re
-from sphinx.util.nodes import clean_astext, make_refnode
+from sphinx.util.nodes import clean_astext, make_refnode, set_source_info
from sphinx.util.compat import Directive
@@ -313,6 +313,8 @@ class Glossary(Directive):
# make a single "term" node with all the terms, separated by termsep
# nodes (remove the dangling trailing separator)
term = nodes.term('', '', *termnodes[:-1])
+ set_source_info(self, term)
+ term.rawsource = term.astext()
term['ids'].extend(ids)
term['names'].extend(ids)
term += system_messages