@@ -278,12 +278,13 @@ def collect(self, identifier: str, options: PythonOptions) -> CollectorItem:
|
278 | 278 | |
279 | 279 | return doc_object |
280 | 280 | |
281 | | -def render(self, data: CollectorItem, options: PythonOptions) -> str: |
| 281 | +def render(self, data: CollectorItem, options: PythonOptions, locale: str | None = None) -> str: |
282 | 282 | """Render the collected data. |
283 | 283 | |
284 | 284 | Parameters: |
285 | 285 | data: The collected data. |
286 | 286 | options: The options to use for rendering. |
| 287 | + locale: The locale to use for rendering (default is "en"). |
287 | 288 | |
288 | 289 | Returns: |
289 | 290 | The rendered data (HTML). |
@@ -300,7 +301,8 @@ def render(self, data: CollectorItem, options: PythonOptions) -> str:
|
300 | 301 | # than as an item in a dictionary. |
301 | 302 | "heading_level": options.heading_level, |
302 | 303 | "root": True, |
303 | | -"locale": self.config.locale, |
| 304 | +# YORE: Bump 2: Regex-replace ` or .+` with ` or "en",` within line. |
| 305 | +"locale": locale or self.config.locale, |
304 | 306 | }, |
305 | 307 | ) |
306 | 308 | |
@@ -401,6 +403,7 @@ def get_handler(
|
401 | 403 | Parameters: |
402 | 404 | handler_config: The handler configuration. |
403 | 405 | tool_config: The tool (SSG) configuration. |
| 406 | + **kwargs: Additional arguments to pass to the handler. |
404 | 407 | |
405 | 408 | Returns: |
406 | 409 | An instance of `PythonHandler`. |
|