• 
      

    Fix i18n issues with the diff viewer.

    Review Request #4454 — Created Aug. 14, 2013 and submitted — Latest diff uploaded

    Information

    Review Board
    master

    Reviewers

    Fix i18n issues with the diff viewer.
    
    The diff viewer had several small issues which caused problems with i18n:
    - Because the diff chunks can contain localizable strings, we need to make sure
      that we don't show someone cached data from when it was rendered in a
      different language. Add the language name to the cache keys.
    - The "New File" and "New Change" strings used for the revisions on the right
      hand side were using _() at the top level of the file, which performed the
      localization when the file was evaluated. This meant we'd localize them to
      whatever LANGUAGE_CODE was set to.
    - A few strings in diffutils.py weren't marked for translation.
    - The "<n> lines" items in the expand blocks weren't properly marked for
      translation.
    
    - Verified that we were using the correct cache keys.
    - Tested changing my language at runtime and reloading and saw that the diff
      entries were rendered in other languages.
    - Verified that the generated message catalogs contained a proper pluralized
      message extraction for "<n> lines".