-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gutenboarding: get plan from URL param #41679
Merged
razvanpapadopol
merged 2 commits into
master
from
add/gutenboarding-set-plan-using-url-param
May 5, 2020
+58
−13
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import * as plans from 'lib/plans/constants'; | ||
import { getPlan, getPlanPath } from 'lib/plans'; | ||
|
||
const supportedPlans = [ | ||
plans.PLAN_FREE, | ||
plans.PLAN_PERSONAL, | ||
plans.PLAN_PREMIUM, | ||
plans.PLAN_BUSINESS, | ||
plans.PLAN_ECOMMERCE, | ||
]; | ||
|
||
export const freePlan = plans.PLAN_FREE; | ||
export const defaultPaidPlan = plans.PLAN_PREMIUM; | ||
|
||
export const supportedPlansPaths: string[] = supportedPlans.map( getPlanPath ); | ||
|
||
export function getPlanSlugByPath( path?: string ): string | undefined { | ||
return supportedPlans.find( ( plan ) => getPlanPath( plan ) === path ); | ||
} | ||
|
||
export function getPlanTitle( planSlug: string ): string { | ||
return getPlan( planSlug ).getTitle(); | ||
} |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about this translation. It's not consistent with what we have over at WordPress.com/plans (both the logged-in page and logged-out marketing pages)
Many locales translate the plan names (Free, Business, and so on). I'm not arguing for one over the other, but for brand consistency, my guess is that we should describe the plans uniformly.
For example, take Japanese:
https://ja.wordpress.com/pricing/
and in Gutenboarding
Same for German, which only translations "Personal"
We already have 100% translation coverage for:
Business Plan
Personal Plan
Premium Plan
Strangely "eCommerce Plan" doesn't yet exist, but there's eCommerce
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood correctly, you suggested taking "Plan" word out of the header? I think it would be important to keep "Plan" word in the header for clarity ("Premium" what?). When plans are side-by-side on a grid, it's more clear that "personal" refers to a plan, but in the header it could refer e.g. to automatically assigned vertical. (@dubielzyk)
I think it's ok to merge this PR without changes to this I think and we can log follow-ups; generally we can bend the rest of the system for designs, vs try to bend designs for the code we happen to have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's make the least amount of copy changes for now and I'll follow-up where we should override. We wanna be as consistent with the previous designs as possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just highlighting that we need to be consistent.
We're introducing a new i18n string with
__( '%s Plan' )
.Because of this, I think we need to make sure that we use the same nomenclature across our application including marketing pages, or that we follow the existing implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point. I noted down consistently translating plans at #37665