• 
      

    Don't do i18n activities before setup.

    Review Request #8699 — Created Jan. 31, 2017 and submitted

    Information

    Review Board
    release-3.0.x
    296608d...

    Reviewers

    Django 1.8 has a very nice feature where trying to call ugettext before the
    i18n infrastructure has been started will result in an error (as opposed to
    before, where it would just return the English string, thereby skipping the
    translation).

    In our case, we had a couple different problems. In reviews/fields.py we were
    just using ugettext where we ought be be using ugettext_lazy. In the auth
    forms, we had a couple places where we used ugettext_lazy but then
    immediately did a string format operation on the result, which evaluated the
    lazy string. I've moved these into the __init__ method instead.

    • Ran unit tests.
    • Verified that help text showed up correctly.
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/accounts/forms/auth.py
          reviewboard/reviews/fields.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/accounts/forms/auth.py
          reviewboard/reviews/fields.py
      
      
    2. 
        
    brennie
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (945c264)