Skip to content

Commit 52067b3

Browse files
committed
Make it possible to define language_map in several extensions.
1 parent d2f949d commit 52067b3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sphinx_exercise/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def setup(app: Sphinx) -> Dict[str, Any]:
156156
#Define the extension configuration variables
157157
app.add_config_value("exercise_title_text", "Exercise", "env") # The title of the exercise
158158
app.add_config_value("solution_title_text", "Solution to", "env") # The title of the solution
159-
app.add_config_value("language_map", None, "env") # A map of translated strings
159+
if not hasattr(app.config, "language_map"):
160+
app.add_config_value("language_map", None, "env") # A map of translated strings
160161
app.add_config_value("hide_solutions", False, "env")
161162

162163
app.connect("config-inited", init_numfig) # event order - 1

0 commit comments

Comments
 (0)