From 9d60342ec746d0d4bafc96c6ac90ce718e23541c Mon Sep 17 00:00:00 2001 From: Jason Novinger Date: Mon, 24 Nov 2025 15:41:55 -0600 Subject: [PATCH] Switch to sentence case for filter pill text --- netbox/utilities/forms/mixins.py | 108 +++++++++++++++---------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/netbox/utilities/forms/mixins.py b/netbox/utilities/forms/mixins.py index 31264aeda..751323c61 100644 --- a/netbox/utilities/forms/mixins.py +++ b/netbox/utilities/forms/mixins.py @@ -25,76 +25,76 @@ FORM_FIELD_LOOKUPS = { forms.BooleanField: [], forms.NullBooleanField: [], forms.CharField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - ('ic', _('Contains')), - ('isw', _('Starts With')), - ('iew', _('Ends With')), - ('ie', _('Equals (case-insensitive)')), - ('regex', _('Matches Pattern')), - ('iregex', _('Matches Pattern (case-insensitive)')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + ('ic', _('contains')), + ('isw', _('starts with')), + ('iew', _('ends with')), + ('ie', _('equals (case-insensitive)')), + ('regex', _('matches pattern')), + ('iregex', _('matches pattern (case-insensitive)')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], forms.IntegerField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - ('gt', _('Greater Than (>)')), - ('gte', _('At Least (≥)')), - ('lt', _('Less Than (<)')), - ('lte', _('At Most (≤)')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + ('gt', _('greater than (>)')), + ('gte', _('at least (≥)')), + ('lt', _('less than (<)')), + ('lte', _('at most (≤)')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], forms.DecimalField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - ('gt', _('Greater Than (>)')), - ('gte', _('At Least (≥)')), - ('lt', _('Less Than (<)')), - ('lte', _('At Most (≤)')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + ('gt', _('greater than (>)')), + ('gte', _('at least (≥)')), + ('lt', _('less than (<)')), + ('lte', _('at most (≤)')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], forms.DateField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - ('gt', _('After')), - ('gte', _('On or After')), - ('lt', _('Before')), - ('lte', _('On or Before')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + ('gt', _('after')), + ('gte', _('on or after')), + ('lt', _('before')), + ('lte', _('on or before')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], forms.ModelChoiceField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], ColorField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], TagFilterField: [ - ('exact', _('Has These Tags')), - ('n', _('Does Not Have These Tags')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('has these tags')), + ('n', _('does not have these tags')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], forms.ChoiceField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], forms.MultipleChoiceField: [ - ('exact', _('Is')), - ('n', _('Is Not')), - (MODIFIER_EMPTY_TRUE, _('Is Empty')), - (MODIFIER_EMPTY_FALSE, _('Is Not Empty')), + ('exact', _('is')), + ('n', _('is not')), + (MODIFIER_EMPTY_TRUE, _('is empty')), + (MODIFIER_EMPTY_FALSE, _('is not empty')), ], }