Closed ericof closed 9 months ago
I think you just need to set the zope_i18n_compile_mo_files
environment variable to true
, then zope.i18n will take care of it
@pytest.fixture(scope="session", autouse=True)
def generate_mo():
"""Generate .mo files."""
key = "zope_i18n_compile_mo_files"
current_value = os.getenv(key, None)
os.environ[key] = "1"
yield
if current_value is None:
os.environ.pop(key)
else:
os.environ[key] = current_value
Example usage: