Fix display of prevent inheritance with no value specified
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 13 Oct 2016 23:05:40 +0200
changeset 1841 488fb224e689
parent 1840 e183d3e35d7a
child 1842 ece22f65f9e5
Fix display of prevent inheritance with no value specified
i18n/en.po
i18n/fr.po
views/mgmt_rules.py
--- a/i18n/en.po	Thu Oct 13 23:01:55 2016 +0200
+++ b/i18n/en.po	Thu Oct 13 23:05:40 2016 +0200
@@ -4507,6 +4507,9 @@
 msgid "prevent all rules"
 msgstr ""
 
+msgid "prevent inheritance or not to be specified"
+msgstr ""
+
 #, python-brace-format
 msgid "prevent rule {0}"
 msgstr ""
--- a/i18n/fr.po	Thu Oct 13 23:01:55 2016 +0200
+++ b/i18n/fr.po	Thu Oct 13 23:05:40 2016 +0200
@@ -4525,6 +4525,9 @@
 msgid "prevent all rules"
 msgstr "bloquer toutes les règles"
 
+msgid "prevent inheritance or not to be specified"
+msgstr "blocage de l'héritage libre"
+
 #, python-brace-format
 msgid "prevent rule {0}"
 msgstr "bloquer la règle {0}"
--- a/views/mgmt_rules.py	Thu Oct 13 23:01:55 2016 +0200
+++ b/views/mgmt_rules.py	Thu Oct 13 23:05:40 2016 +0200
@@ -101,8 +101,10 @@
                 #     alternatives.append(_('XXX prevent to be specified'))
                 if prevent.prevent_inheritance:
                     alternatives.append(xml_escape(_('prevent all rules')))
-                else:
+                elif prevent.prevent_inheritance is False:
                     alternatives.append(xml_escape(_("don't prevent inheritance")))
+                else:  # unspecified
+                    alternatives.append(xml_escape(_("prevent inheritance or not to be specified")))
             non_rules = []
             for non_rule in ctrl.reverse_seda_ref_non_rule_id_from:
                 if non_rule.seda_ref_non_rule_id_to: