-
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
Show DomainNotice in the all domains list #43849
Conversation
statusText: translate( 'Action required' ), | ||
statusClass: 'status-error', | ||
icon: 'info', | ||
listStatusText: translate( 'Expired %(timeSinceExpiry)s', { |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 29 times:
translate( 'Expired %(timeSinceExpiry)s', { context: 'timeSinceExpiry is of the form "[number] [time-period] ago" e.g. "3 days ago"'} )
ES Score: 12
See 2 additional suggestions in the PR translation status page
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~163 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
import { hasPendingGSuiteUsers } from 'lib/gsuite'; | ||
import { shouldRenderExpiringCreditCard } from 'lib/purchases'; | ||
|
||
export function resolveDomainStatus( |
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.
This is nice 👍. I like how you have extracted all the similarly named functions that "resolve status" for different domain types, and have integrated it into one function that works for all types. It is no doubt neater.
However in this PR, or a subsequent one, I think we should further extract the cases into different functions in this file to make the case statements easier to read and decipher at a glance.
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.
Works good!
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/4014094 Thank you @hambai for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
Changes proposed in this Pull Request
I decided to move the status resolving in a separate helper function so that we have consistency across different domain presentations (list vs status page).
Here's how it looks:
Testing instructions
Fixes #