Remove all localizations from rbext.
Review Request #11425 — Created Feb. 1, 2021 and submitted
Django's localization support expects to be run within the context of an
HTTP request. Middleware activates a locale based on the headers sent by
the browser. Activation also requires that the app registry is fully
activated, which in turns requires settings to be populated. As none of
that is safe for extension testing, we need to disable localization at
the command level.This change removes all the localization support in rbext, ensuring
nothing is trying to activate at command parsing or execution time. This
solves the inability to get help output, which was a problem when we
upgraded to Django 1.11.Ideally, we'll revisit this down the road and more carefully activate
localization, avoiding the Django requirements (which is doable), but
the work required is non-trivial.It's also worth noting that Django's own management commands explicitly
disable localization as well by default, and avoid localizing any
strings involved in command initialization or argument parsing.
Ran
rbext --help
, both as-is and for each subcommand. Verified that
the output was correct, and that I could execute the commands successfully.
Summary | ID |
---|---|
b195e2fd3f51fe16dde8dfd1a44b872748e0b2f1 |