From 2330f0cecdd57bbb1a3bf57f453cddcd8e0f6848 Mon Sep 17 00:00:00 2001 From: Roger Ostrander Date: Tue, 1 Apr 2014 15:43:27 -0700 Subject: [PATCH] Admin notes: Include translation targets for IP addresses --- r2/r2/lib/pages/admin_pages.py | 8 +++++++- r2/r2/templates/adminnotessidebar.html | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/pages/admin_pages.py b/r2/r2/lib/pages/admin_pages.py index af7b384cb..92db25fcd 100644 --- a/r2/r2/lib/pages/admin_pages.py +++ b/r2/r2/lib/pages/admin_pages.py @@ -85,8 +85,14 @@ class AdminLinkMenu(NavMenu): class AdminNotesSidebar(Templated): EMPTY_MESSAGE = { "domain": N_("No notes for this domain"), + "ip": N_("No notes for this IP address"), } - + + SYSTEMS = { + "domain": N_("domain"), + "ip": N_("IP address"), + } + def __init__(self, system, subject): from r2.models.admin_notes import AdminNotesBySystem diff --git a/r2/r2/templates/adminnotessidebar.html b/r2/r2/templates/adminnotessidebar.html index 70d8c47d7..97133fcc9 100644 --- a/r2/r2/templates/adminnotessidebar.html +++ b/r2/r2/templates/adminnotessidebar.html @@ -24,6 +24,7 @@ <%namespace file="utils.html" import="md" />
+ ${_(thing.SYSTEMS[thing.system])}: ${thing.subject}