Skip to content
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

Buttons: Update button labels to sentence case #39692

Merged
merged 17 commits into from Mar 13, 2020

Conversation

danhauk
Copy link
Contributor

@danhauk danhauk commented Feb 26, 2020

Create more consistency throughout Calypso by standardizing sentence case on button labels.

Why sentence case?

  • Sentence case improves readability by allowing users to see proper shapes of words without the breaking flow of Capital Letters.
  • Sentence case respects the difference between proper nouns and the other words.
  • i18n: some languages capitalize different things (e.g. all nouns are capitalized in German). Title case adds cognitive load when users have to figure out which words are nouns, for example.

Fixes #38231

Before After
Screen Shot 2020-02-26 at 7 12 14 AM Screen Shot 2020-02-27 at 11 06 59 PM
Screen Shot 2020-02-27 at 11 05 27 PM Screen Shot 2020-02-27 at 11 06 09 PM
Screen Shot 2020-02-27 at 11 10 20 PM Screen Shot 2020-02-27 at 11 10 31 PM

Testing Instructions

  • Checkout this branch locally or visit https://calypso.live/?branch=update/button-sentence-case
  • Go through each section looking for all buttons making sure they all have sentence case.
  • Try with different site types (simple, atomic, jetpack), different plans (free, paid), or any other combination you can think of.
  • Post any buttons I missed with any special instructions to reproduce it.

Sections

  • Pages
  • My Plan
  • Posts
  • Media
  • Comments
  • Themes
  • Plugins
  • Import
  • Export
  • Marketing
  • Earn
  • Activity
  • Hosting
  • Domains
  • People
  • Settings
  • Reader

Me

  • Profile
  • Account Settings
  • Manage Purchases
  • Security
  • Privacy
  • Notification Settings
  • Blocked Sites

@danhauk danhauk self-assigned this Feb 26, 2020
@matticbot
Copy link
Contributor

@@ -299,7 +299,7 @@ class Pages extends Component {
return (
<SectionHeader label={ translate( 'Pages' ) }>
<Button primary compact className="pages__add-page" href={ newPageLink }>
{ translate( 'Add New Page' ) }
{ translate( 'Add new page' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.

@@ -324,7 +324,7 @@ class Page extends Component {
return (
<PopoverMenuItem onClick={ this.copyPage } href={ duplicateUrl }>
<Gridicon icon="clipboard" size={ 18 } />
{ this.props.translate( 'Copy Page' ) }
{ this.props.translate( 'Copy page' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 22 times:
translate( 'Copying page...' ) ES Score: 6

@@ -333,7 +333,7 @@ class Page extends Component {
const { page, translate } = this.props;
return (
<PopoverMenuItemClipboard text={ page.URL } onCopy={ this.copyPageLink } icon={ 'link' }>
{ translate( 'Copy Link' ) }
{ translate( 'Copy link' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.

@@ -170,14 +170,14 @@ class PurchasesListing extends Component {
return null;
}

let label = translate( 'Manage Plan' );
let label = translate( 'Manage plan' );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 26 times:
translate( 'Manage Plans' ) ES Score: 8

@@ -58,7 +58,7 @@ const PlanFeaturesActions = ( {
if ( current && ! isInSignup ) {
upgradeButton = (
<Button className={ classes } href={ manageHref } disabled={ ! manageHref }>
{ canPurchase ? translate( 'Manage Plan' ) : translate( 'View Plan' ) }
{ canPurchase ? translate( 'Manage plan' ) : translate( 'View plan' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.


if ( isJetpackBackup( purchase ) ) {
label = translate( 'Manage Product' );
label = translate( 'Manage product' );
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.

@@ -18,7 +18,7 @@ import { infoNotice } from 'state/notices/actions';
function PostActionsEllipsisMenuCopyLink( { onCopyLinkClick, copyLink } ) {
return (
<PopoverMenuItemClipboard text={ copyLink } onCopy={ onCopyLinkClick } icon={ 'link' }>
{ translate( 'Copy Link' ) }
{ translate( 'Copy link' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.

@@ -39,7 +39,7 @@ function PostActionsEllipsisMenuDuplicate( {
return (
<PopoverMenuItem href={ duplicateUrl } onClick={ onDuplicateClick } icon="clipboard">
<QueryJetpackModules siteId={ siteId } />
{ translate( 'Copy Post' ) }
{ translate( 'Copy post' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.

@@ -348,7 +348,7 @@ class ThemeShowcase extends React.Component {
<hr />
) : (
<Button onClick={ this.toggleShowcase } data-e2e-value="open-themes-button">
{ translate( 'Show All Themes' ) }
{ translate( 'Show all themes' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.

@danhauk danhauk requested a review from a team as a code owner February 26, 2020 06:54
@@ -315,7 +315,7 @@ export class CommentNavigation extends Component {

{ hasComments && (
<Button compact onClick={ toggleBulkMode }>
{ translate( 'Bulk Edit' ) }
{ translate( 'Bulk edit' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 1 times:
translate( 'Bulk Edit', 'NULL', { context: 'NULL'} ) ES Score: 10
See 1 additional suggestions in the PR translation status page

<span className="is-desktop">
{ this.props.translate( 'Add New', { context: 'Media upload' } ) }
<span className="media-library__upload-button-label">
{ this.props.translate( 'Add new', { context: 'Media upload' } ) }
Copy link

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 12 times:
translate( 'Add new', { context: 'new image'} ) ES Score: 9
See 2 additional suggestions in the PR translation status page

ℹ️ This string already exists with the following contexts:

  • null (no context)
  • add new media
  • Block
  • Customize Changeset
  • event
  • file
  • link
  • Media upload
  • page
  • plugin
  • post
  • site
  • Template
  • Template Part
  • theme
  • user

Would it make sense to reuse one of the above?

@@ -64,7 +64,7 @@ class AdvancedSettings extends React.Component {
loading={ this.props.shouldShowProgress }
isPrimary={ false }
onClick={ this.props.onClickExport }
text={ this.props.translate( 'Export Selected Content' ) }
text={ this.props.translate( 'Export selected content' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.

@@ -42,7 +42,7 @@ class ExportCard extends Component {
loading={ this.props.shouldShowProgress }
isPrimary={ false }
onClick={ this.props.exportAll }
text={ translate( 'Export All' ) }
text={ translate( 'Export all' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.

@@ -40,7 +39,7 @@ const MarketingToolsHeader: FunctionComponent< Props > = ( { handleButtonClick }

<div className="tools__header-button-row">
<Button onClick={ handleButtonClick } primary>
{ translate( 'Boost My Traffic' ) }
{ translate( 'Boost my traffic' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.

@@ -92,7 +92,7 @@ export const MarketingTools: FunctionComponent< Props > = ( {
imagePath="/calypso/images/marketing/social-media-logos.svg"
>
<Button compact onClick={ handleStartSharingClick }>
{ translate( 'Start Sharing' ) }
{ translate( 'Start sharing' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 This change will be queued for retranslation. We'll use the existing translations in the meantime.

@@ -29,7 +29,7 @@ const SettingsSectionHeader = ( {
{ children }
{ showButton && (
<Button compact primary onClick={ onButtonClick } disabled={ disabled } { ...buttonProps }>
{ isSaving ? translate( 'Saving…' ) : translate( 'Save Settings' ) }
{ isSaving ? translate( 'Saving…' ) : translate( 'Save settings' ) }
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 95 times:
translate( 'Save Settings' ) ES Score: 8

@gwwar
Copy link
Contributor

gwwar commented Mar 6, 2020

the button labels are being pulled from the API so we'll need a back-end patch

Thanks @danhauk! Let us know if folks need help with this one or if you or @sixhours are interested in leading the patch.

@sixhours
Copy link
Contributor

sixhours commented Mar 6, 2020

Thanks @danhauk! Let us know if folks need help with this one or if you or @sixhours are interested in leading the patch.

Happy to take the lead on this, I want to learn more about how our API works with Calypso anyway. :)

@sixhours
Copy link
Contributor

sixhours commented Mar 6, 2020

@gwwar @danhauk Added a patch here to get this started: D40003-code

@danhauk
Copy link
Contributor Author

danhauk commented Mar 6, 2020

Snapshots are updated and client tests should pass. Please give a review when you get a chance and we can land the back-end patch separately if translations are finished before that.

@sixhours Thanks for kicking off the patch! I'll keep my eye on it.

@gwwar
Copy link
Contributor

gwwar commented Mar 6, 2020

Found a few more while testing with a premium plan. I don't think we have to get everything to 💯(we can catch the rest with follow ups) but it may be worth a quick audit with all plan types: free, personal, premium, business, ecommerce.

Earn:
Screen Shot 2020-03-06 at 3 06 42 PM
Screen Shot 2020-03-06 at 3 06 45 PM
Screen Shot 2020-03-06 at 3 06 56 PM

Marketing:
Screen Shot 2020-03-06 at 3 07 47 PM

Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving tentative approval here ✅. Please do not merge until:

  • Strings are fully translated
  • Please prep updates to the Readmes in Calypso / internal messaging so folks are aware of the Sentence case rule

Things that don't block this PR

  • D40003-code for customizing the API page/post labels
  • Chatting with core to see if sentence case can be adopted in general
  • Stray usages. If we happen to miss some and miss translation, just add them in follow up PRs. Any other changes here should also wait for the String Freeze check to pass.

@danhauk
Copy link
Contributor Author

danhauk commented Mar 7, 2020

I left those examples intentionally since things like Google Analytics, Google Ads, and Business (in this case) are product names and should be capitalized. Although that To in your last screenshot should definitely not be capitalized.

I'll give a quick run through again with all plans and site types on Monday while we wait for strings to translate.

@akirk
Copy link
Member

akirk commented Mar 9, 2020

Thanks for adding a [Status] String Freeze here. Turns out we are not great prepared for simple case changes in combination with "String Freeze." Normally our algorithms will detect a slightly changed original and just continue to use the translations (which is also fine in this case because they have their own word casing rules [e.g. in German nouns are always spelled with a upper case first letter]), but since the old strings are still being used, this didn't work.

We noticed this at sending the Weekly Kit and held back the translations and semi-manually processed these (and in the course I found an instance of same text that wasn't caught in this PR, so I just committed that change to this one).

Long story short: translations are ready without sending them for translation.

@danhauk danhauk requested a review from a team as a code owner March 12, 2020 18:13
@danhauk
Copy link
Contributor Author

danhauk commented Mar 12, 2020

I think failing tests are unrelated to this PR but maybe someone could give a second look? @gwwar @kwight @mmtr

Otherwise this is ready to merge. Guidelines are in the README for the button component and internal messaging seems to be well received in the post p9Jlb4-1ly-p2

Copy link
Contributor

@gwwar gwwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E2Es look mostly like timeouts so I think we're okay. This tests pretty well for me @danhauk, let's try 🚢ing!

@danhauk danhauk merged commit 9af6717 into master Mar 13, 2020
@danhauk danhauk deleted the update/button-sentence-case branch March 13, 2020 13:29
@matticbot matticbot removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. [Status] String Freeze Add the [Status] String Freeze label to your PR to ensure new strings are translated before merging labels Mar 13, 2020
@mmtr mmtr mentioned this pull request Mar 30, 2020
@a8ci18n
Copy link

a8ci18n commented May 22, 2020

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/2909838

Thank you @danhauk for including a screenshot in the description! This is really helpful for our translators.

@a8ci18n
Copy link

a8ci18n commented Jun 18, 2020

Translation for this Pull Request has now been finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent case for buttons
8 participants