diff --git a/sphinx/config.py b/sphinx/config.py index 0e49f0878..65146c210 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -72,9 +72,9 @@ class Config(object): nitpick_ignore = ([], 'html'), numfig = (False, 'env'), numfig_secnum_depth = (1, 'env'), - numfig_prefix = ({'figure': l_('Fig. '), - 'table': l_('Table '), - 'code-block': l_('Listing ')}, + numfig_prefix = ({'figure': l_('Fig. %s'), + 'table': l_('Table %s'), + 'code-block': l_('Listing %s')}, 'env'), # HTML options diff --git a/sphinx/locale/sphinx.pot b/sphinx/locale/sphinx.pot index d65ce7d67..e0d51efba 100644 --- a/sphinx/locale/sphinx.pot +++ b/sphinx/locale/sphinx.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Sphinx 1.3a0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2014-10-06 15:20+0200\n" +"POT-Creation-Date: 2014-10-06 15:34+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,15 +18,18 @@ msgstr "" "Generated-By: Babel 1.3\n" #: sphinx/config.py:75 -msgid "Fig. " +#, python-format +msgid "Fig. %s" msgstr "" #: sphinx/config.py:76 -msgid "Table " +#, python-format +msgid "Table %s" msgstr "" #: sphinx/config.py:77 -msgid "Listing " +#, python-format +msgid "Listing %s" msgstr "" #: sphinx/config.py:84 @@ -34,17 +37,17 @@ msgstr "" msgid "%s %s documentation" msgstr "" -#: sphinx/environment.py:1824 +#: sphinx/environment.py:1825 #, python-format msgid "see %s" msgstr "" -#: sphinx/environment.py:1827 +#: sphinx/environment.py:1828 #, python-format msgid "see also %s" msgstr "" -#: sphinx/environment.py:1883 +#: sphinx/environment.py:1884 msgid "Symbols" msgstr "" diff --git a/sphinx/writers/html.py b/sphinx/writers/html.py index cf92fc5ef..1d2cff051 100644 --- a/sphinx/writers/html.py +++ b/sphinx/writers/html.py @@ -251,7 +251,7 @@ class HTMLTranslator(BaseTranslator): self.body.append(self.starttag(node, 'span', '', CLASS='caption-number')) prefix = self.builder.config.numfig_prefix.get(figtype, '') numbers = self.builder.fignumbers[figtype][figure_id] - self.body.append(prefix + '.'.join(map(str, numbers)) + " ") + self.body.append(prefix % '.'.join(map(str, numbers)) + ' ') self.body.append('') if isinstance(node.parent, nodes.figure):