Skip to content

Commit

Permalink
Fix sidebars ablog translations (sunpy#80)
Browse files Browse the repository at this point in the history
Signed-off-by: Luís Henriques <[email protected]>
  • Loading branch information
lumigch authored and nabobalis committed Nov 14, 2022
1 parent 2d30658 commit 8d1b67d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ablog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from sphinx.builders.html import StandaloneHTMLBuilder
from sphinx.jinja2glue import BuiltinTemplateLoader, SphinxFileSystemLoader
from sphinx.locale import get_translation

from .blog import CONFIG, Blog
from .post import (
Expand All @@ -27,6 +28,9 @@

PKGDIR = os.path.abspath(os.path.dirname(__file__))

# name used for the *.pot, *.po and *.mo files
MESSAGE_CATALOG_NAME = 'sphinx'
_ = get_translation(MESSAGE_CATALOG_NAME)

__all__ = ["setup"]

Expand Down Expand Up @@ -148,5 +152,5 @@ def setup(app):
)
pkgdir = os.path.abspath(os.path.dirname(__file__))
locale_dir = os.path.join(pkgdir, "locales")
app.config.locale_dirs.append(locale_dir)
app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir)
return {"version": __version__} # identifies the version of our extension

0 comments on commit 8d1b67d

Please sign in to comment.