Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
model: Use same name for legacy plan across the app.
Aman Agrawal34a1be80a4c9
diff --git a/analytics/views/support.py b/analytics/views/support.pyindex cfcad36e671..b9e91cfc051 100644--- a/analytics/views/support.py+++ b/analytics/views/support.py@@ -76,7 +76,9 @@ def get_plan_type_string(plan_type: int) -> str:Realm.PLAN_TYPE_STANDARD_FREE: "Standard free",Realm.PLAN_TYPE_PLUS: "Plus",RemoteZulipServer.PLAN_TYPE_SELF_MANAGED: "Self-managed",- RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACY: "Self-managed (legacy)",+ RemoteZulipServer.PLAN_TYPE_SELF_MANAGED_LEGACY: CustomerPlan.name_from_tier(+ CustomerPlan.TIER_SELF_HOSTED_LEGACY+ ),RemoteZulipServer.PLAN_TYPE_COMMUNITY: "Community",RemoteZulipServer.PLAN_TYPE_BUSINESS: "Business",RemoteZulipServer.PLAN_TYPE_ENTERPRISE: "Enterprise",diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.pyindex 52774317dea..28f40bd0e65 100644--- a/corporate/lib/stripe.py+++ b/corporate/lib/stripe.py@@ -2408,6 +2408,9 @@ class BillingSession(ABC):if plan is not None:context["plan_name"] = plan.namecontext["free_trial"] = plan.is_free_trial()+ context["is_server_on_legacy_plan"] = (+ plan.tier == CustomerPlan.TIER_SELF_HOSTED_LEGACY+ )self.add_sponsorship_info_to_context(context)return contextdiff --git a/corporate/models.py b/corporate/models.pyindex 3b46b226973..ce5626a18de 100644--- a/corporate/models.py+++ b/corporate/models.py@@ -298,7 +298,7 @@ class CustomerPlan(models.Model):CustomerPlan.TIER_CLOUD_STANDARD: "Zulip Cloud Standard",CustomerPlan.TIER_CLOUD_PLUS: "Zulip Cloud Plus",CustomerPlan.TIER_CLOUD_ENTERPRISE: "Zulip Enterprise",- CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Self-managed",+ CustomerPlan.TIER_SELF_HOSTED_LEGACY: "Self-managed (legacy plan)",CustomerPlan.TIER_SELF_HOSTED_BUSINESS: "Zulip Business",CustomerPlan.TIER_SELF_HOSTED_COMMUNITY: "Community",}[tier]diff --git a/templates/corporate/billing.html b/templates/corporate/billing.htmlindex aee107d9d60..0d46da55b44 100644--- a/templates/corporate/billing.html+++ b/templates/corporate/billing.html@@ -50,7 +50,7 @@</a>{% elif is_server_on_legacy_plan %}<a href="{{ billing_base_url }}/plans/">- {{ plan_name }}+ {{ plan_name.replace(" (legacy plan)", "") -}}</a><i>(legacy plan)</i>{% else %}diff --git a/templates/corporate/sponsorship.html b/templates/corporate/sponsorship.htmlindex 9494ddcbfe8..ff698cca90f 100644--- a/templates/corporate/sponsorship.html+++ b/templates/corporate/sponsorship.html@@ -53,11 +53,21 @@<label for="sponsored-org-current-plan" class="inline-block label-title">Your plan</label><div id="sponsored-org-current-plan" class="not-editable-realm-field">{% if is_sponsored %}+ <a href="{{ billing_base_url }}/plans/">{{ sponsorship_plan_name }}+ </a>{% elif free_trial %}- {{ plan_name }} <i>(free trial)</i>+ <a href="{{ billing_base_url }}/plans/">+ {{ plan_name -}}+ </a> <i>(free trial)</i>+ {% elif is_server_on_legacy_plan %}+ <a href="{{ billing_base_url }}/plans/">+ {{ plan_name.replace(" (legacy plan)", "") -}}+ </a> <i>(legacy plan)</i>{% else %}+ <a href="{{ billing_base_url }}/plans/">{{ plan_name }}+ </a>{% endif %}</div></div>