Fix i18n issues with the diff viewer.
Review Request #4454 — Created Aug. 14, 2013 and submitted
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".
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/diffviewer/renderers.py reviewboard/diffviewer/chunk_generator.py reviewboard/diffviewer/diffutils.py Ignored Files: reviewboard/templates/diffviewer/diff_file_fragment.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/renderers.py reviewboard/diffviewer/chunk_generator.py reviewboard/diffviewer/diffutils.py Ignored Files: reviewboard/templates/diffviewer/diff_file_fragment.html
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/diffviewer/renderers.py reviewboard/diffviewer/chunk_generator.py reviewboard/diffviewer/diffutils.py Ignored Files: reviewboard/templates/diffviewer/diff_file_fragment.html
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/diffviewer/renderers.py reviewboard/diffviewer/chunk_generator.py reviewboard/diffviewer/diffutils.py Ignored Files: reviewboard/templates/diffviewer/diff_file_fragment.html
-
This is a review from Review Bot. Tool: Pyflakes Processed Files: reviewboard/diffviewer/renderers.py reviewboard/diffviewer/chunk_generator.py reviewboard/diffviewer/diffutils.py Ignored Files: reviewboard/templates/diffviewer/diff_file_fragment.html