Remove all localizations from rbext.

Review Request #2092 — Created Feb. 9, 2021 and submitted

guest828
Review Board
c9f3c4f...
guest830
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.

Testing Done:
Ran `rbext --help`, both as-is and for each subcommand. Verified that
the output was correct, and that I could execute the commands successfully.

Reviewed at https://reviews.reviewboard.org/r/11425/

Not a test is done yet.

Description From Last Updated

It looks good to me. May be you can add more changes to it later.

guest830guest830
guest830
  1. 
      
    1. Ok, I will make more changes later.

  2. It looks good to me.
    May be you can add more changes to it later.

  3. 
      
guest830
  1. Ship It!
  2. 
      
guest828
Review request changed

Status: Closed (submitted)

Loading...