Fix Submit/Collect upgrade RHP to reflect the selected plan#93464
Draft
MelvinBot wants to merge 1 commit into
Draft
Fix Submit/Collect upgrade RHP to reflect the selected plan#93464MelvinBot wants to merge 1 commit into
MelvinBot wants to merge 1 commit into
Conversation
Propagate the plan chosen in the Plan RHP to the Upgrade RHP and the upgrade action so display copy, pricing, and the upgrade targetType match the selected plan instead of always defaulting to Control. Co-authored-by: Abdelrahman Khattab <abzokhattab@users.noreply.github.com>
7 tasks
Contributor
🦜 Polyglot Parrot! 🦜Squawk! Looks like you added some shiny new English strings. Allow me to parrot them back to you in other tongues: View the translation diffdiff --git a/src/languages/de.ts b/src/languages/de.ts
index d66a67c9f37..99eca551acc 100644
--- a/src/languages/de.ts
+++ b/src/languages/de.ts
@@ -6995,9 +6995,9 @@ Fordern Sie Spesendetails wie Belege und Beschreibungen an, legen Sie Limits und
commonFeatures: {
title: 'Upgrade auf den Control-Tarif',
collect: {
- title: 'Upgrade auf den Collect-Tarif',
+ title: 'Zum Collect-Tarif upgraden',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
- `<muted-text>Der Collect-Tarif beginnt bei <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `pro Mitglied und Monat.` : `pro aktivem Mitglied und Monat.`}. <a href="${learnMoreMethodsRoute}">Erfahre mehr</a> über unsere Tarife und Preise.</muted-text>`,
+ `<muted-text>Der Collect-Tarif beginnt bei <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `pro Mitglied pro Monat.` : `pro aktivem Mitglied und Monat.`} <a href="${learnMoreMethodsRoute}">Erfahren Sie mehr</a> über unsere Tarife und Preise.</muted-text>`,
},
note: 'Schalte unsere leistungsstärksten Funktionen frei, darunter:',
benefits: {
diff --git a/src/languages/es.ts b/src/languages/es.ts
index 371d5350e93..993cdb4e550 100644
--- a/src/languages/es.ts
+++ b/src/languages/es.ts
@@ -1753,7 +1753,6 @@ const translations: TranslationDeepObject<typeof en> = {
}
},
[CONST.NEXT_STEP.MESSAGE_KEY.WAITING_TO_MARK_AS_DONE]: (actor, actorType, _eta, _etaType) => {
- // eslint-disable-next-line default-case
switch (actorType) {
case CONST.NEXT_STEP.ACTOR_TYPE.CURRENT_USER:
return `Esperando a que <strong>tú</strong> lo marques como listo.`;
@@ -6979,7 +6978,7 @@ ${amount} para ${merchant} - ${date}`,
title: 'Mejorar al plan Controlar',
collect: {
title: 'Mejorar al plan Recopilar',
- startsAtFull: (learnMoreMethodsRoute, formattedPrice, hasTeam2025Pricing) =>
+ startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
`<muted-text>El plan Recopilar comienza desde <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `por miembro al mes.` : `por miembro activo al mes.`} <a href="${learnMoreMethodsRoute}">Más información</a> sobre nuestros planes y precios.</muted-text>`,
},
note: 'Desbloquea nuestras funciones más potentes, incluyendo:',
diff --git a/src/languages/fr.ts b/src/languages/fr.ts
index d73c15d57e9..9c317ece844 100644
--- a/src/languages/fr.ts
+++ b/src/languages/fr.ts
@@ -1,6 +1,7 @@
/**
* _____ __ __
* / ___/__ ___ ___ _______ _/ /____ ___/ /
+ * / (_ / -_) _ \/ -_) __/ _ \`/ __/ -_) _ /
* \___/\__/_//_/\__/_/ \_,_/\__/\__/\_,_/
*
* This file was automatically generated. Please consider these alternatives before manually editing it:
@@ -862,7 +863,7 @@ const translations: TranslationDeepObject<typeof en> = {
beginningOfChatHistory: (users: string) => `Cette discussion est avec ${users}.`,
beginningOfChatHistoryPolicyExpenseChat: (workspaceName: string, submitterDisplayName: string) =>
`C’est ici que <strong>${submitterDisplayName}</strong> soumettra des dépenses à <strong>${workspaceName}</strong>. Utilisez simplement le bouton +.`,
- beginningOfChatHistoryPolicyExpenseChatTrack: 'C\u2019est ici que vous suivrez vos dépenses',
+ beginningOfChatHistoryPolicyExpenseChatTrack: 'C’est ici que vous suivrez vos dépenses',
beginningOfChatHistorySelfDM: 'Ceci est votre espace personnel. Utilisez-le pour vos notes, tâches, brouillons et rappels.',
beginningOfChatHistorySystemDM: 'Bienvenue ! Procédons à la configuration.',
chatWithAccountManager: 'Discutez avec votre gestionnaire de compte ici',
@@ -7022,7 +7023,7 @@ Rendez obligatoires des informations de dépense comme les reçus et les descrip
collect: {
title: 'Passer au forfait Collect',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
- `<muted-text>Le plan Collect commence à <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `par membre et par mois.` : `par membre actif et par mois.`} <a href="${learnMoreMethodsRoute}">En savoir plus</a> sur nos plans et nos tarifs.</muted-text>`,
+ `<muted-text>Le forfait Collect commence à <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `par membre et par mois.` : `par membre actif et par mois.`} <a href="${learnMoreMethodsRoute}">En savoir plus</a> sur nos forfaits et nos tarifs.</muted-text>`,
},
note: 'Débloquez nos fonctionnalités les plus puissantes, notamment :',
benefits: {
diff --git a/src/languages/it.ts b/src/languages/it.ts
index c14ab78534f..41cc5805f08 100644
--- a/src/languages/it.ts
+++ b/src/languages/it.ts
@@ -6980,7 +6980,7 @@ Richiedi dettagli sulle spese come ricevute e descrizioni, imposta limiti e valo
collect: {
title: 'Passa al piano Collect',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
- `<muted-text>Il piano Collect parte da <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `per utente al mese.` : `per membro attivo al mese.`} <a href="${learnMoreMethodsRoute}">Scopri di più</a> sui nostri piani e prezzi.</muted-text>`,
+ `<muted-text>Il piano Collect parte da <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `per membro al mese.` : `per membro attivo al mese.`} <a href="${learnMoreMethodsRoute}">Scopri di più</a> sui nostri piani e prezzi.</muted-text>`,
},
note: 'Sblocca le nostre funzioni più potenti, tra cui:',
benefits: {
diff --git a/src/languages/ja.ts b/src/languages/ja.ts
index aab2628da08..52a71611cd5 100644
--- a/src/languages/ja.ts
+++ b/src/languages/ja.ts
@@ -6904,9 +6904,9 @@ ${reportName}
commonFeatures: {
title: 'Controlプランにアップグレード',
collect: {
- title: 'Collectプランにアップグレード',
+ title: 'Collect プランにアップグレード',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
- `<muted-text>Collect プランは <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `メンバー1人あたり月額` : `アクティブメンバー1人あたり月額`} からご利用いただけます。プランと料金の詳細は <a href="${learnMoreMethodsRoute}">こちら</a> をご覧ください。</muted-text>`,
+ `<muted-text>Collect プランは <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `メンバー1人あたり月額` : `アクティブメンバー1人あたり/月`} からご利用いただけます。プランと料金の詳細は <a href="${learnMoreMethodsRoute}">こちら</a> をご覧ください。</muted-text>`,
},
note: '以下を含む、最も強力な機能をアンロックしましょう:',
benefits: {
diff --git a/src/languages/nl.ts b/src/languages/nl.ts
index 37162401390..5a4ceaf2bc2 100644
--- a/src/languages/nl.ts
+++ b/src/languages/nl.ts
@@ -6959,7 +6959,7 @@ Vereis onkostendetails zoals bonnen en beschrijvingen, stel limieten en standaar
collect: {
title: 'Upgrade naar het Collect-abonnement',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
- `<muted-text>Het Collect-abonnement begint bij <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `per lid per maand.` : `per actieve deelnemer per maand.`} <a href="${learnMoreMethodsRoute}">Meer informatie</a> over onze abonnementen en prijzen.</muted-text>`,
+ `<muted-text>Het Collect-abonnement begint bij <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `per lid per maand.` : `per actief lid per maand.`} <a href="${learnMoreMethodsRoute}">Meer informatie</a> over onze abonnementen en prijzen.</muted-text>`,
},
note: 'Ontgrendel onze krachtigste functies, waaronder:',
benefits: {
diff --git a/src/languages/pl.ts b/src/languages/pl.ts
index 8b0008dd05c..e283a88119a 100644
--- a/src/languages/pl.ts
+++ b/src/languages/pl.ts
@@ -6953,7 +6953,7 @@ Wymagaj szczegółów wydatków, takich jak paragony i opisy, ustawiaj limity i
collect: {
title: 'Ulepsz do planu Collect',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
- `<muted-text>Plan Collect zaczyna się od <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `za użytkownika miesięcznie.` : `na aktywnego członka miesięcznie.`} <a href="${learnMoreMethodsRoute}">Dowiedz się więcej</a> o naszych planach i cenach.</muted-text>`,
+ `<muted-text>Plan Collect zaczyna się od <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `za użytkownika miesięcznie.` : `za aktywnego członka miesięcznie.`} <a href="${learnMoreMethodsRoute}">Dowiedz się więcej</a> o naszych planach i cenach.</muted-text>`,
},
note: 'Odblokuj nasze najpotężniejsze funkcje, w tym:',
benefits: {
diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts
index 5bc4808d8d0..fef411b5dd6 100644
--- a/src/languages/pt-BR.ts
+++ b/src/languages/pt-BR.ts
@@ -6955,7 +6955,7 @@ Exija dados de despesas como recibos e descrições, defina limites e padrões e
commonFeatures: {
title: 'Faça upgrade para o plano Control',
collect: {
- title: 'Faça upgrade para o plano Collect',
+ title: 'Fazer upgrade para o plano Collect',
startsAtFull: (learnMoreMethodsRoute: string, formattedPrice: string, hasTeam2025Pricing: boolean) =>
`<muted-text>O plano Collect começa em <strong>${formattedPrice}</strong> ${hasTeam2025Pricing ? `por membro por mês.` : `por membro ativo por mês.`} <a href="${learnMoreMethodsRoute}">Saiba mais</a> sobre nossos planos e preços.</muted-text>`,
},
Note You can apply these changes to your branch by copying the patch to your clipboard, then running |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
On a Submit workspace, choosing Collect in the Plan RHP and pressing Upgrade opened the Control upgrade RHP (wrong copy, wrong pricing, and the upgrade itself targeted Control). The same root cause produced the wrong RHP when a Collect workspace tried to upgrade. The upgrade screen never knew which plan the user actually picked — it always fell back to Control's intro view.
This change threads the plan the user selected in the Plan RHP through to the Upgrade RHP and the upgrade action:
ROUTES.WORKSPACE_UPGRADEnow accepts an optionalupgradePlanTypequery param, and the corresponding navigation param was added inNavigation/types.ts.DynamicWorkspaceOverviewPlanTypePagepasses the selected plan (currentPlan) when navigating to the upgrade screen for Submit→Team/Corporate and Team→Corporate.WorkspaceUpgradePagereadsupgradePlanTypeand uses it to drive the actualupgradeSubmittargetType, and forwards it toUpgradeIntro.UpgradeIntrousesupgradePlanTypeto select Team (Collect) pricing, andGenericFeaturesViewrenders Collect-specific title, "starts at" copy, and benefit bullets when the selected plan is Collect.workspace.upgrade.commonFeatures.collect.title/.startsAtFull) to all 10 locale files; Collect benefit bullets reuse the existingsubscription.yourPlan.collect.*strings.Fixed Issues
$ #93326
PROPOSAL: #93326 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review".
// Please describe what tests you performed that validate your changes worked.
submit2026beta).Offline tests
Same as Tests.
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari