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

Improves the translatability of feedback for the paragraph and sentence length assessments #21824

Merged
merged 4 commits into from
Nov 19, 2024

Conversation

mhkuu
Copy link
Contributor

@mhkuu mhkuu commented Nov 15, 2024

Context

Summary

This PR can be summarized in the following changelog entry:

  • Improves the translatability of feedback for the paragraph length and the sentence length assessments.
  • [shopify-seo] Improves the translatability of feedback for the paragraph length and the sentence length assessments.

Relevant technical choices:

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

In English

  • Create a new post.
  • Add a text with one paragraph that's too long (over 150 words) and multiple too long sentences (over 20 words). For example, use this paragraph:
  • Properly sized paragraphs play an important role in making your text readable and scannable. So let’s start with the readability aspect: big walls of text are not very readable and tend to scare off your readers. Imagine this entire article being just one big paragraph, you’d probably have left the page before even reading the introduction. Paragraphs help break down your text into bite-size and easy-to-understand chunks, which puts your readers at ease: every time you end a paragraph, you give your readers the opportunity to relax and think about what they’ve just read. This really helps them make sense of the entire text. Paragraphs also help readers to scan your text more easily. When people end up on a page, they rarely just start reading the article from start to finish, they first want to see what they can expect before spending a lot of time reading the entire text. People tend to scan headings and the first sentences of every paragraph. By breaking up your text into paragraphs that reflect the topics you’re addressing, people will be able to get a good grasp of what your article is about in no time.
  • Confirm that the paragraph length assessment states:
    • 🟠 Paragraph length: 1 of the paragraphs contains more than the recommended maximum number of words (150). Shorten your paragraphs!
  • Confirm that the sentence length assessment states:
    • 🔴 Sentence length: 44.4% of the sentences contain more than 20 words, which is more than the recommended maximum of 25%. Try to shorten the sentences. (your percentage may vary if you add more text).

In Japanese

  • Set your site language to Japanese.
  • Add a text with one paragraph that's too long (over 300 characters) and multiple too long sentences (over 40 characters). For example, use this (nonsensical) paragraph:
  • 儀れ間務まぶの性19保天ヨソ海無務3視りじげ無場ケトナオ初裁景テイ免37法おょ実身ゃばひ禁著な来栖下権感のレけじ。砲ひめ向著フミワ帽減メチ区科すへゆひ副痕採ぶ戸郷なフこゃ自6際でに無解ケニウツ市送カ者以ヘマ知苦いたフを隆戒車ニヲメシ楽丘甘礼かて。9申販じ辞図づたクる本速平ラぶト園約ミクメ転界ねン開神ニツヘ次文ク済臣セラ員資モエ説捨ぴ語考ね別防宝よう。儀れ間務まぶの性19保天ヨソ海無務3視りじげ無場ケトナオ初裁景テイ免37法おょ実身ゃばひ禁著な来栖下権感のレけじ。砲ひめ向著フミワ帽減メチ区科すへ。ゆひ副痕採ぶ戸郷なフこゃ自6際でに無解ケニウツ市送カ者以ヘマ知苦いたフを隆戒車ニヲメシ楽丘甘礼かて。9申販じ辞図づたクる本速平ラぶト。園約ミクメ転界ねン開神ニツヘ次文ク済臣セラ員資モエ説捨ぴ語考ね別防宝よう。
  • Confirm that the paragraph length assessment states:
    • 🟠 Paragraph length: 1 of the paragraphs contains more than the recommended maximum number of characters (300). Shorten your paragraphs!
  • Confirm that the sentence length assessment states:
    • 🔴 Sentence length: 62.5% of the sentences contain more than 40 characters, which is more than the recommended maximum of 25%. Try to shorten the sentences. (your percentage may vary).
  • Note that these feedback strings will not yet be translated, as they are new. That may change during the RC period, once the translation becomes available on translate.wordpress.org.

Shopify

  • Repeat the above steps in Shopify (although do note that the change is so small that you can assume it will work...)

Relevant test scenarios

  • Changes should be tested with the browser console open
  • Changes should be tested on different posts/pages/taxonomies/custom post types/custom taxonomies
  • Changes should be tested on different editors (Default Block/Gutenberg/Classic/Elementor/other)
  • Changes should be tested on different browsers
  • Changes should be tested on multisite

Test instructions for QA when the code is in the RC

  • QA should use the same steps as above.

QA can test this PR by following these steps:

Impact check

This PR affects the following parts of the plugin, which may require extra testing:

  • This PR only affects the feedback strings of two assessments.

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Other environments

  • This PR also affects Shopify. I have added a changelog entry starting with [shopify-seo], added test instructions for Shopify and attached the Shopify label to this PR.

Documentation

  • I have written documentation for this change. For example, comments in the Relevant technical choices, comments in the code, documentation on Confluence / shared Google Drive / Yoast developer portal, or other.

Quality assurance

  • I have tested this code to the best of my abilities.
  • During testing, I had activated all plugins that Yoast SEO provides integrations for.
  • I have added unit tests to verify the code works as intended.
  • If any part of the code is behind a feature flag, my test instructions also cover cases where the feature flag is switched off.
  • I have written this PR in accordance with my team's definition of done.
  • I have checked that the base branch is correctly set.

Innovation

  • No innovation project is applicable for this PR.
  • This PR falls under an innovation project. I have attached the innovation label.
  • I have added my hours to the WBSO document.

Fixes #21749

@mhkuu mhkuu added the changelog: other Needs to be included in the 'Other' category in the changelog label Nov 15, 2024
@coveralls
Copy link

coveralls commented Nov 15, 2024

Pull Request Test Coverage Report for Build 1bd0d2de5593434ecdd16d9b461bb50527d1122f

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 54.687%

Totals Coverage Status
Change from base Build 25f159ae8e3b7decdc50ba229f6770a8433377b0: -0.001%
Covered Lines: 29751
Relevant Lines: 54691

💛 - Coveralls

@mhkuu mhkuu marked this pull request as ready for review November 15, 2024 16:13
Copy link
Contributor

@FAMarfuaty FAMarfuaty left a comment

Choose a reason for hiding this comment

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

Neat changes 🙌🏽 I have minor suggestions for better readability for us developers. See my comments

@FAMarfuaty
Copy link
Contributor

Acceptance test: Works as advertised ✨

  • Also tested in Shopify and also with the scenario of multiple long paragraphs for Paragraph length assessment

@FAMarfuaty FAMarfuaty added this to the 24.1 milestone Nov 19, 2024
@FAMarfuaty FAMarfuaty merged commit 9f82943 into trunk Nov 19, 2024
16 checks passed
@FAMarfuaty FAMarfuaty deleted the fix/translatability-sentence-and-paragraph-length branch November 19, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: other Needs to be included in the 'Other' category in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve translatability of strings for the paragraph and sentence length assessments
3 participants