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

Forms: update copies from title case to sentence case and add translations #41086

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

simison
Copy link
Member

@simison simison commented Jan 15, 2025

Proposed changes:

  • Add few missing translations
  • Update copies from title case to sentence case

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

Does this pull request change what data or activity we track or use?

Testing instructions:

  • Forms block continues to work in the editor and no deprecation warnings.

@simison simison added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Focus] i18n Internationalization / i18n, adaptation to different languages [Package] Forms [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. labels Jan 15, 2025
@simison simison requested a review from a team January 15, 2025 13:01
Copy link
Contributor

Are you an Automattician? The PR will need to be tested on WordPress.com. This comment will be updated with testing instructions as soon the build is complete.

@github-actions github-actions bot added [Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form labels Jan 15, 2025
Copy link
Contributor

github-actions bot commented Jan 15, 2025

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • 🔴 Add a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!

@github-actions github-actions bot added [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Jan 15, 2025
@@ -401,7 +404,7 @@ export const childBlocks = [
...FieldDefaults.attributes,
label: {
type: 'string',
default: 'Email',
default: __( 'Email', 'jetpack-forms' ),
Copy link
Member Author

Choose a reason for hiding this comment

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

@Automattic/jetpack-vulcan any reason why default label values might've been untranslated? E.g. deprecation warnings between switching site locale?

Copy link
Contributor

Choose a reason for hiding this comment

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

No idea. I can't think of any reasons why it wouldn't be the case in a JS file.

@simison simison added [Status] In Progress and removed [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! labels Jan 15, 2025
@simison
Copy link
Member Author

simison commented Jan 15, 2025

While lots of other things in Gutenberg and WP.com/Jetpack are sentence case, block names seem to still be title case:

Screenshot 2025-01-15 at 15 04 01

@jasmussen I've seen you active with title case/sentence case work — do you we have documented guidance on how to go about copy in editor?

@jasmussen
Copy link
Member

I've seen you active with title case/sentence case work — do you we have documented guidance on how to go about copy in editor?

Thanks for the ping, excellent PR.

The guidance for core, to the best of my recollection (though CC: @jameskoster and @auareyou for design system guidance, and @Automattic/dotcom-design for good measure), is that for all UI, we use sentence case with capital proper nouns. Example:

Sentence case:

  • New post
  • Open settings

Capitalized proper nouns:

  • Google Maps
  • Open WordPress settings

I recall also discussing this with @talldan, in case he has additional context.

@jasmussen
Copy link
Member

Beyond that rule, though, I just want to acknowledge that there are a ton of inconsistencies where that rule is not yet properly applied.

@simison
Copy link
Member Author

simison commented Jan 15, 2025

Gotha, so your advice is to go ahead sentence casing everything, including block names, even if it might, on the surface, create inconsistencies with some Gutenberg UIs.

@jasmussen
Copy link
Member

Not specifically, no. I'd say to apply it as a general rule to everything we build in general, menus, buttons, UIs, dropdowns, buttons and so on. I wouldn't hack/override anything, and we might even want to make an exception on block names until those are more consistent there, or just decide that "Media & Text" is the title of a block, and therefore fully a proper noun. Similarly, "Google Photos" would be a proper noun, though in the case that I fixed recently, "Pexels free photos" would be sentence case.

@jameskoster
Copy link
Contributor

It's by no means ideal, but I'd lean towards aiming for contextual consistency in the short term. Gutenberg tends to favor sentence case while wp-admin favors title case. So if it's an editor UI use sentence case, and if it's a wp-admin UI use title case. If it's a string that can appear in either context then sentence case probably makes sense, if we assume Gutenberg better represents the general design vision.

@simison
Copy link
Member Author

simison commented Jan 16, 2025

Next up is looking into E2E tests in Jetpack and Calypso as this introduces a lot of changes that likely throw those tests off.

@talldan
Copy link
Contributor

talldan commented Jan 16, 2025

I recall also discussing this with @talldan, in case he has additional context.

I don't have any, other than it's difficult to know what's right, but most of the time consistency is the best option.

Block names are difficult. In general they are capitalized as nouns, but might be different when used in a sentence. One situation I remember was 'Manage Reusable Blocks' vs. 'Manage reusable blocks'.

I think there are also still inconsistencies as Joen mentions, like in the editor Options menu 'Welcome Guide' is inconsistent with everything else (e.g. 'Code editor' or 'Distraction free'). Also lots of the tabs/tooltips/buttons in the editor are inconsistent with that menu - 'Document Overview', 'List View', Block Inserter'. I think in general the trend has been towards sentence casing most things in the editor, so those are probably wrong. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Contact Form Form block (also see Contact Form label) [Feature] Contact Form [Feature] Forms Blocks Blocks designed to streamline user input and engagement, such as contact, newsletter sign-ups, etc. [Focus] i18n Internationalization / i18n, adaptation to different languages [Package] Forms [Status] In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants