From 15fc4e291f470939c0906fc81188f8dbab2f4638 Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Tue, 22 Apr 2025 09:13:36 -0400 Subject: [PATCH] Merge pull request #24990 from overleaf/dk-paywall-modal-updates Updates to AI assist interstitial modal GitOrigin-RevId: d2365aaf36f1f61a39a0bd52357f4518736e2a7d --- .../app/src/Features/Project/ProjectController.js | 6 +++++- services/web/frontend/extracted-translations.json | 13 ++++++------- services/web/locales/en.json | 13 ++++++------- services/web/types/user.ts | 2 ++ 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/services/web/app/src/Features/Project/ProjectController.js b/services/web/app/src/Features/Project/ProjectController.js index 0919176281..5a01df534f 100644 --- a/services/web/app/src/Features/Project/ProjectController.js +++ b/services/web/app/src/Features/Project/ProjectController.js @@ -787,9 +787,11 @@ const _ProjectController = { let planCode = subscription?.planCode if (!planCode && !userInNonIndividualSub) { - planCode = 'free' + planCode = 'personal' } + const planDetails = Settings.plans.find(p => p.planCode === planCode) + res.render(template, { title: project.name, priority_title: true, @@ -820,6 +822,8 @@ const _ProjectController = { inactiveTutorials: TutorialHandler.getInactiveTutorials(user), isAdmin: hasAdminAccess(user), planCode, + planName: planDetails?.name, + isAnnualPlan: planCode && planDetails?.annual, isMemberOfGroupSubscription: userIsMemberOfGroupSubscription, hasInstitutionLicence: userHasInstitutionLicence, }, diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index cec5c60ebb..c11e77c2d6 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -61,6 +61,7 @@ "add_add_on_to_your_plan": "", "add_additional_certificate": "", "add_affiliation": "", + "add_ai_assist": "", "add_another_address_line": "", "add_another_email": "", "add_another_token": "", @@ -81,14 +82,13 @@ "add_on": "", "add_ons": "", "add_or_remove_project_from_tag": "", - "add_overleaf_assist": "", "add_overleaf_assist_to_your_group_subscription": "", "add_overleaf_assist_to_your_institution": "", - "add_overleaf_assist_to_your_plan": "", "add_people": "", "add_role_and_department": "", "add_to_dictionary": "", "add_to_tag": "", + "add_unlimited_ai_to_your_overleaf_plan": "", "add_your_comment_here": "", "add_your_first_group_member_now": "", "added_by_on": "", @@ -471,7 +471,7 @@ "edit_your_custom_dictionary": "", "editing": "", "editing_captions": "", - "editing_tools_to_paraphrase_change_style_and_more": "", + "editing_tools": "", "editor": "", "editor_and_pdf": "", "editor_disconected_click_to_reconnect": "", @@ -521,7 +521,6 @@ "equation_preview": "", "error": "", "error_assist": "", - "error_assist_to_help_fixing_latex_errors": "", "error_log": "", "error_opening_document": "", "error_opening_document_detail": "", @@ -866,7 +865,7 @@ "labels_help_you_to_reference_your_tables": "", "labs": "", "language": "", - "language_suggestions_for_texts_in_any_language": "", + "language_suggestions": "", "large_or_high-resolution_images_taking_too_long": "", "large_or_high_resolution_images_taking_too_long_to_process": "", "last_active": "", @@ -1141,7 +1140,6 @@ "output_file": "", "overall_theme": "", "overleaf": "", - "overleaf_assist_streamline_your_workflow": "", "overleaf_history_system": "", "overleaf_labs": "", "overleaf_logo": "", @@ -1700,7 +1698,7 @@ "test_configuration": "", "test_configuration_successful": "", "tex_live_version": "", - "texgpt_for_help_writing_latex": "", + "texgpt": "", "thank_you_exclamation": "", "thank_you_for_your_feedback": "", "thanks_for_being_part_of_this_labs_experiment_your_feedback_will_help_us_make_the_new_editor_the_best_yet": "", @@ -2051,6 +2049,7 @@ "work_offline_pull_to_overleaf": "", "work_with_non_overleaf_users": "", "work_with_other_github_users": "", + "write_faster_smarter_with_overleaf_and_writefull_ai_tools": "", "writefull": "", "writefull_loading_error_body": "", "writefull_loading_error_title": "", diff --git a/services/web/locales/en.json b/services/web/locales/en.json index 10b399e6e6..069c3fcb20 100644 --- a/services/web/locales/en.json +++ b/services/web/locales/en.json @@ -75,6 +75,7 @@ "add_add_on_to_your_plan": "Add __addOnName__ to your plan", "add_additional_certificate": "Add another certificate", "add_affiliation": "Add Affiliation", + "add_ai_assist": "Add AI Assist", "add_another_address_line": "Add another address line", "add_another_email": "Add another email", "add_another_token": "Add another token", @@ -96,14 +97,13 @@ "add_on": "Add-on", "add_ons": "Add-ons", "add_or_remove_project_from_tag": "Add or remove project from tag __tagName__", - "add_overleaf_assist": "Add Overleaf Assist", "add_overleaf_assist_to_your_group_subscription": "Add Overleaf Assist to your group subscription", "add_overleaf_assist_to_your_institution": "Add Overleaf Assist to your institution", - "add_overleaf_assist_to_your_plan": "Add Overelaf assist to your __planName__ plan", "add_people": "Add people", "add_role_and_department": "Add role and department", "add_to_dictionary": "Add to Dictionary", "add_to_tag": "Add to tag", + "add_unlimited_ai_to_your_overleaf_plan": "Add unlimited AI* to your Overleaf __planName__ plan", "add_your_comment_here": "Add your comment here", "add_your_first_group_member_now": "Add your first group members now", "added": "added", @@ -611,7 +611,7 @@ "editing": "Editing", "editing_and_collaboration": "Editing and collaboration", "editing_captions": "Editing captions", - "editing_tools_to_paraphrase_change_style_and_more": "<0>Editing tools to paraphrase, change style and more", + "editing_tools": "Editing tools", "editor": "Editor", "editor_and_pdf": "Editor & PDF", "editor_disconected_click_to_reconnect": "Editor disconnected, click anywhere to reconnect.", @@ -674,7 +674,6 @@ "equation_preview": "Equation preview", "error": "Error", "error_assist": "Error Assist", - "error_assist_to_help_fixing_latex_errors": "<0>Error Assist for help fixing LaTeX errors", "error_log": "Error log", "error_opening_document": "Error opening document", "error_opening_document_detail": "Sorry, something went wrong opening this document. Please try again.", @@ -1133,7 +1132,7 @@ "labs": "Labs", "labs_program_benefits": "By signing up for Overleaf Labs you can get your hands on in-development features and try them out as much as you like. All we ask in return is your honest feedback to help us develop and improve. It’s important to note that features available in this program are still being tested and actively developed. This means they could change, be removed, or become part of a premium plan.", "language": "Language", - "language_suggestions_for_texts_in_any_language": "Language suggestions for texts in any language", + "language_suggestions": "Language suggestions", "large_or_high-resolution_images_taking_too_long": "Large or high-resolution images taking too long to process. You may be able to <0>optimize them.", "large_or_high_resolution_images_taking_too_long_to_process": "Large or high-resolution images taking too long to process.", "last_active": "Last Active", @@ -1510,7 +1509,6 @@ "over_n_users_at_research_institutions_and_business": "Over __userCountMillion__ million users at research institutions and businesses worldwide love __appName__", "overall_theme": "Overall theme", "overleaf": "Overleaf", - "overleaf_assist_streamline_your_workflow": "Streamline your workflow with unlimited access to Overleaf and Writefull AI features.", "overleaf_group_plans": "Overleaf group plans", "overleaf_history_system": "Overleaf History System", "overleaf_individual_plans": "Overleaf individual plans", @@ -2212,7 +2210,7 @@ "test_configuration": "Test configuration", "test_configuration_successful": "Test configuration successful", "tex_live_version": "TeX Live version", - "texgpt_for_help_writing_latex": "<0>TeXGPT for help writing LaTeX", + "texgpt": "TexGPT", "thank_you": "Thank you!", "thank_you_email_confirmed": "Thank you, your email is now confirmed", "thank_you_exclamation": "Thank you!", @@ -2605,6 +2603,7 @@ "work_or_university_sso": "Work/university single sign-on", "work_with_non_overleaf_users": "Work with non Overleaf users", "work_with_other_github_users": "Work with other GitHub users", + "write_faster_smarter_with_overleaf_and_writefull_ai_tools": "Write faster, smarter, and with confidence with Overleaf and Writefull AI tools", "writefull": "Writefull", "writefull_loading_error_body": "Try refreshing the page. If this doesn’t work, try disabling any active browser extensions to check they aren’t blocking Writefull from loading.", "writefull_loading_error_title": "Writefull didn’t load correctly", diff --git a/services/web/types/user.ts b/services/web/types/user.ts index d8b7323efa..0c6c45facf 100644 --- a/services/web/types/user.ts +++ b/services/web/types/user.ts @@ -58,6 +58,8 @@ export type User = { } featureUsage?: FeatureUsage planCode?: string + planName?: string + isAnnualPlan?: boolean isMemberOfGroupSubscription?: boolean hasInstitutionLicence?: boolean }