Merge pull request #24816 from overleaf/jdt-update-checkout-for-bundle

Update checkout pages for AI Assist bundle content

GitOrigin-RevId: e2e1b705dd92e0858835d18eb6d8c5750030e550
This commit is contained in:
Jimmy Domagala-Tang
2025-05-07 10:13:22 -04:00
committed by Copybot
parent 6973ba4244
commit fbbba7a3df
6 changed files with 23 additions and 17 deletions

View File

@@ -62,6 +62,9 @@
"add_additional_certificate": "",
"add_affiliation": "",
"add_ai_assist": "",
"add_ai_assist_annual_and_get_unlimited_access": "",
"add_ai_assist_monthly_and_get_unlimited_access": "",
"add_ai_assist_to_your_plan": "",
"add_another_address_line": "",
"add_another_email": "",
"add_another_token": "",
@@ -72,8 +75,6 @@
"add_company_details": "",
"add_email_address": "",
"add_email_to_claim_features": "",
"add_error_assist_annual_to_your_projects": "",
"add_error_assist_to_your_projects": "",
"add_files": "",
"add_more_collaborators": "",
"add_more_licenses_to_my_plan": "",

View File

@@ -16,7 +16,7 @@ import isInFreeTrial from '../../../../util/is-in-free-trial'
import AddOns from '@/features/subscription/components/dashboard/states/active/add-ons'
import {
AI_ADD_ON_CODE,
AI_STANDALONE_PLAN_CODE,
AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE,
isStandaloneAiPlanCode,
} from '@/features/subscription/data/add-on-codes'
import getMeta from '@/utils/meta'
@@ -74,7 +74,11 @@ export function ActiveSubscriptionNew({
const handlePlanChange = () => setModalIdShown('change-plan')
const handleManageOnWritefull = () => setModalIdShown('manage-on-writefull')
const handleCancelClick = (addOnCode: string) => {
if ([AI_STANDALONE_PLAN_CODE, AI_ADD_ON_CODE].includes(addOnCode)) {
if (
[AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE, AI_ADD_ON_CODE].includes(
addOnCode
)
) {
setModalIdShown('cancel-ai-add-on')
}
}

View File

@@ -6,8 +6,8 @@ import MaterialIcon from '@/shared/components/material-icon'
import {
ADD_ON_NAME,
AI_ADD_ON_CODE,
AI_STANDALONE_ANNUAL_PLAN_CODE,
AI_STANDALONE_PLAN_CODE,
AI_ASSIST_STANDALONE_ANNUAL_PLAN_CODE,
AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE,
} from '@/features/subscription/data/add-on-codes'
import sparkle from '@/shared/svgs/sparkle.svg'
import { PaidSubscription } from '../../../../../../../../types/subscription/dashboard/subscription'
@@ -32,8 +32,8 @@ type AddOnProps = {
function resolveAddOnName(addOnCode: string) {
switch (addOnCode) {
case AI_ADD_ON_CODE:
case AI_STANDALONE_ANNUAL_PLAN_CODE:
case AI_STANDALONE_PLAN_CODE:
case AI_ASSIST_STANDALONE_ANNUAL_PLAN_CODE:
case AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE:
return ADD_ON_NAME
}
}
@@ -156,11 +156,12 @@ function AddOns({
const hasAiAssistViaWritefull = getMeta('ol-hasAiAssistViaWritefull')
const addOnsDisplayPrices = onStandalonePlan
? {
[AI_STANDALONE_PLAN_CODE]: subscription.payment.displayPrice,
[AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE]:
subscription.payment.displayPrice,
}
: subscription.payment.addOnDisplayPricesWithoutAdditionalLicense
const addOnsToDisplay = onStandalonePlan
? [{ addOnCode: AI_STANDALONE_PLAN_CODE }]
? [{ addOnCode: AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE }]
: subscription.addOns?.filter(addOn => addOn.addOnCode !== LICENSE_ADD_ON)
const hasAddons =

View File

@@ -108,7 +108,7 @@ function PreviewSubscriptionChange() {
{aiAddOnChange && (
<div>
<Trans
i18nKey="add_error_assist_to_your_projects"
i18nKey="add_ai_assist_to_your_plan"
components={{
sparkle: (
<img

View File

@@ -1,14 +1,14 @@
import { PaidSubscription } from "../../../../../types/subscription/dashboard/subscription"
import { PendingPaymentProviderPlan } from "../../../../../types/subscription/plan"
export const AI_STANDALONE_PLAN_CODE = 'assistant'
export const AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE = 'assistant'
export const AI_ADD_ON_CODE = 'assistant'
// we dont want translations on plan or add-on names
export const ADD_ON_NAME = "Error Assist"
export const AI_STANDALONE_ANNUAL_PLAN_CODE = 'assistant-annual'
export const AI_ASSIST_STANDALONE_ANNUAL_PLAN_CODE = 'assistant-annual'
export function isStandaloneAiPlanCode(planCode: string) {
return planCode === AI_STANDALONE_PLAN_CODE || planCode === AI_STANDALONE_ANNUAL_PLAN_CODE
return planCode === AI_ASSIST_STANDALONE_MONTHLY_PLAN_CODE || planCode === AI_ASSIST_STANDALONE_ANNUAL_PLAN_CODE
}

View File

@@ -76,6 +76,9 @@
"add_additional_certificate": "Add another certificate",
"add_affiliation": "Add Affiliation",
"add_ai_assist": "Add AI Assist",
"add_ai_assist_annual_and_get_unlimited_access": "Add <sparkle/> AI Assist Annual and get unlimited* access to Overleaf and Writefull AI features.",
"add_ai_assist_monthly_and_get_unlimited_access": "Add <sparkle/> AI Assist Monthly and get unlimited* access to Overleaf and Writefull AI features.",
"add_ai_assist_to_your_plan": "Add <sparkle/> AI Assist to your plan and get unlimited* access to Overleaf and Writefull AI features.",
"add_another_address_line": "Add another address line",
"add_another_email": "Add another email",
"add_another_token": "Add another token",
@@ -87,8 +90,6 @@
"add_email": "Add Email",
"add_email_address": "Add email address",
"add_email_to_claim_features": "Add an institutional email address to claim your features.",
"add_error_assist_annual_to_your_projects": "Add Error Assist Annual <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
"add_error_assist_to_your_projects": "Add Error Assist <sparkle/> to your projects and get unlimited AI help to fix LaTeX errors faster.",
"add_files": "Add Files",
"add_more_collaborators": "Add more collaborators",
"add_more_licenses_to_my_plan": "Add more licenses to my plan",
@@ -818,7 +819,6 @@
"generic_something_went_wrong": "Sorry, something went wrong",
"get_collaborative_benefits": "Get the collaborative benefits from __appName__, even if you prefer to work offline",
"get_discounted_plan": "Get discounted plan",
"get_error_assist": "Get Error Assist",
"get_exclusive_access_to_labs": "Get exclusive access to early-stage experiments when you join Overleaf Labs. All we ask in return is your honest feedback to help us develop and improve.",
"get_in_touch": "Get in touch",
"get_in_touch_having_problems": "<a href=\"__link__\">Get in touch with support</a> if youre having problems",