ZeroDataMessage should not start string after colon with capital letter
See original GitHub issueBug Description
The code in https://github.com/google/site-kit-wp/blob/4c156b533f57135c49dc64ff1adf2c1e143906cb/assets/js/modules/analytics/components/common/ZeroDataMessage.js#L41-L53 has grammatical issues:
There shouldn’t be a capital letter—essentially a “new sentence”, following the colon. Ideally, we should probably reformat this i18n string to have “page” or “site” be the %s part of the string, and not the entire sentence with the reasoning around it.
But given the logic of the component and the cost of that extra translation, we should instead change the prefix string to end with a full-stop/period instead of a colon.
Steps to reproduce
- Enable the
zeroDataStatesfeature flag - Connect an Analytics property with zero data, or use the tester plugin to simulate zero data for Analytics
- Visit the Site Kit dashboard and scroll to “Top Content over the last 28 days”.
- See text issue
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Translations for Search Console and Analytics zero data messages should contain correct English-language capitalisation.
- Translations used should be more distinct/not combined as they are currently.
Implementation Brief
Change the string values and logic in ZeroDataMessage.js to be:
if (skipPrefix) {
return url
? __("Your page hasn’t appeared in Search yet", "google-site-kit")
: __("Your site hasn’t appeared in Search yet", "google-site-kit");
}
return url
? __(
"No data to display: your page hasn’t appeared in Search yet",
"google-site-kit"
)
: __(
"No data to display: your site hasn’t appeared in Search yet",
"google-site-kit"
);
This should be done in both assets/js/modules/search-console/components/common/ZeroDataMessage.js and assets/js/modules/analytics/components/common/ZeroDataMessage.js, using the above text for Search Console and Your page hasn’t received any visitors yet in Analytics.
Note: the old Analytics text used “hasn’t gotten any visitors”, but I think “received” is a better verb to use here, so let’s go with that. 😅
Test Coverage
- No tests needed; VRTs might need updating.
QA Brief
- Visit the Site Kit dashboard with a site with zero data for both Search Console and Analytics. (This can be forced by using the Tester Plugin and setting Analytics and Search Console to return zero data reports.)
- The main dashboard should show this in a zero state table view:

- The page-specific dashboard should show this in a table view:

Changelog entry
- Fix zero data state message formatting issues.
Issue Analytics
- State:
- Created a year ago
- Comments:6

Top Related StackOverflow Question
@aaemnnosttv @wpdarren indeed when referring to the product (“Google Search” or “Search” for short), the word is capitalised. Here’s an example from a help article: “If you still can’t find your site or page in Search results…”
@wpdarren I wondered the same, but it’s used that way in several places so it seems to be intentional. My guess is that it’s short for Search Console. @marrrmarrr ?