Make security rules with All translatable

The security rule names that include the word "All" should be
translatable.  I've included a SECURITY_GROUP_RULES value with
the 3 translatable rules from local_settings.py.example so that
we will actually have translations for those values.

Change-Id: Id21ac0e6ea328ab18f35f7711de356015db5f50a
Closes-bug: #1334031
This commit is contained in:
Doug Fish
2014-06-24 17:33:26 -05:00
parent 8d54a24ecd
commit 95904bde34
2 changed files with 24 additions and 3 deletions

View File

@@ -381,19 +381,19 @@ LOGGING = {
# It is specified in the form.
SECURITY_GROUP_RULES = {
'all_tcp': {
'name': 'ALL TCP',
'name': _('All TCP'),
'ip_protocol': 'tcp',
'from_port': '1',
'to_port': '65535',
},
'all_udp': {
'name': 'ALL UDP',
'name': _('All UDP'),
'ip_protocol': 'udp',
'from_port': '1',
'to_port': '65535',
},
'all_icmp': {
'name': 'ALL ICMP',
'name': _('All ICMP'),
'ip_protocol': 'icmp',
'from_port': '-1',
'to_port': '-1',

View File

@@ -217,6 +217,27 @@ POLICY_FILES = {
SECRET_KEY = None
LOCAL_PATH = None
SECURITY_GROUP_RULES = {
'all_tcp': {
'name': _('All TCP'),
'ip_protocol': 'tcp',
'from_port': '1',
'to_port': '65535',
},
'all_udp': {
'name': _('All UDP'),
'ip_protocol': 'udp',
'from_port': '1',
'to_port': '65535',
},
'all_icmp': {
'name': _('All ICMP'),
'ip_protocol': 'icmp',
'from_port': '-1',
'to_port': '-1',
},
}
try:
from local.local_settings import * # noqa
except ImportError: