| 255 | # the other time for the n-parameter of the ngettext function. |
| 256 | |
| 257 | def __init__(self, environment: Environment) -> None: |
| 258 | super().__init__(environment) |
| 259 | environment.globals["_"] = _gettext_alias |
| 260 | environment.extend( |
| 261 | install_gettext_translations=self._install, |
| 262 | install_null_translations=self._install_null, |
| 263 | install_gettext_callables=self._install_callables, |
| 264 | uninstall_gettext_translations=self._uninstall, |
| 265 | extract_translations=self._extract, |
| 266 | newstyle_gettext=False, |
| 267 | ) |
| 268 | |
| 269 | def _install( |
| 270 | self, translations: "_SupportedTranslations", newstyle: t.Optional[bool] = None |