summaryrefslogtreecommitdiff
path: root/sphinx/transforms/i18n.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/transforms/i18n.py')
-rw-r--r--sphinx/transforms/i18n.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/sphinx/transforms/i18n.py b/sphinx/transforms/i18n.py
index 145eb9cbb..d54a6ac1d 100644
--- a/sphinx/transforms/i18n.py
+++ b/sphinx/transforms/i18n.py
@@ -39,7 +39,7 @@ EXCLUDED_PENDING_XREF_ATTRIBUTES = ('refexplicit',)
N = TypeVar('N', bound=nodes.Node)
-def publish_msgstr(app: "Sphinx", source: str, source_path: str, source_line: int,
+def publish_msgstr(app: Sphinx, source: str, source_path: str, source_line: int,
config: Config, settings: Any) -> Element:
"""Publish msgstr (single line) into docutils document
@@ -64,7 +64,7 @@ def publish_msgstr(app: "Sphinx", source: str, source_path: str, source_line: in
parser = app.registry.create_source_parser(app, filetype)
doc = reader.read(
source=StringInput(source=source,
- source_path="%s:%s:<translated>" % (source_path, source_line)),
+ source_path=f"{source_path}:{source_line}:<translated>"),
parser=parser,
settings=settings,
)
@@ -516,7 +516,7 @@ class RemoveTranslatableInline(SphinxTransform):
inline.parent += inline.children
-def setup(app: "Sphinx") -> dict[str, Any]:
+def setup(app: Sphinx) -> dict[str, Any]:
app.add_transform(PreserveTranslatableMessages)
app.add_transform(Locale)
app.add_transform(RemoveTranslatableInline)