Skip to content

Improve translatability of text length assessment feedback strings #22307

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

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

Conversation

agnieszkaszuba
Copy link
Contributor

@agnieszkaszuba agnieszkaszuba commented May 26, 2025

Context

Summary

This PR can be summarized in the following changelog entry:

  • Improves the translatability of the feedback strings for the text length assessment.
  • [shopify-seo] Improves the translatability of the feedback strings for the text length assessment.
  • [wordpress-seo enhancement] Changes one of the feedback texts for the text length assessment to be consistent with the others.
  • [shopify-seo enhancement] Changes one of the feedback texts for the text length assessment to be consistent with the others.
  • [yoastseo] Improves the translatability of the feedback strings for the text length assessment.
  • [yoastseo] Changes one of the feedback texts for the text length assessment to be consistent with the others.

Relevant technical choices:

  • The feedback strings for the slightly below condition were the same for taxonomies and non-taxonomies, with the exception of the call to action sentence. There was no good reason for this difference, so I removed one of the strings and use the same string for both taxonomies and non-taxonomies.
  • wordCount was renamed to textLength since the value can also be the number of characters (for Japanese texts).

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

Posts in English (WordPress)

  • Create a new post without any content
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: The text contains 0 words. This is far below the recommended minimum of 300 words. Add more content.
  • Add the following text and confirm the feedback stays the same (only 0 is changed to 101):
Text with 101 words Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse eu molestie est, sit amet dignissim nisl. Cras imperdiet maximus euismod. Fusce posuere nunc sed ultrices efficitur. Suspendisse potenti. Donec mattis neque vitae enim facilisis, eu ultricies erat commodo. Nunc ut varius justo. Proin malesuada congue nunc condimentum mattis. Donec vel rutrum felis. Integer mattis urna sit amet nibh tristique lacinia. Ut augue mauris, porta eu mauris sed, auctor sagittis nulla. Nulla imperdiet iaculis odio et vestibulum. Aenean imperdiet luctus odio, eget porttitor nisi. Curabitur bibendum viverra enim vel fermentum. Aliquam sollicitudin condimentum massa sed varius. Proin pulvinar feugiat pellentesque. In eleifend.
  • Duplicate the existing text
  • Confirm that the text length assessment returns a red traffic light and the following feedback:
    • Text length: The text contains 202 words. This is below the recommended minimum of 300 words. Add more content.
  • Add the following text:
Text with 50 words Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lacinia ultrices leo vel blandit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus viverra felis nec viverra varius. Proin ac tristique ex. Praesent posuere quis lectus et eleifend. Curabitur aliquet felis nec nisl dictum mollis. Phasellus feugiat mi in erat.
  • Confirm that the text length assessment returns an orange traffic light and the following feedback:
    • Text length: The text contains 252 words. This is slightly below the recommended minimum of 300 words. Add more content.
  • Add the 50 word text again
  • Confirm that the text length assessment returns a green traffic light and the following feedback:
    • Text length: The text contains 302 words. Good job!

Posts in Japanese (WordPress)

  • Create a new post without any content
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: The text contains 0 character. This is far below the recommended minimum of 600 character. Add more content.
  • Add the following text and confirm the feedback stays the same (only 0 is changed to 237):
Text with 237 characters 先りびよス現郡ラ理掲むご弁9属森所ミシハワ英国タホエ障屋じすがた共護と投話ウ能記らかス断案エオワ質89動こトが港述じき部練くぞの待写しら警静ねいフ範嘉塁クイえぜ。資オヲニサ遅検き応村メマヲヒ辺味情ユエヤロ説30取ぼうはて常読責リ出環カナヌ追開教84三以ゃさずふ。調ユワヘス定型な配棋テワツサ規石ネウヱ重2教供ムキ島細サカ誤族ラぞぐぜ西能込トらお削検サ委芸際い始強伯堤墜きりー。一ヒ好問座ウソネケ親帯ネノ線図イネ野果サルホイ報棋フじ物応市る史拶ち歩3温ヨワヱキ光子もやご新押間法喜ト。
  • Duplicate the existing text
  • Confirm that the text length assessment returns a red traffic light and the following feedback:
    • Text length: The text contains 474 character. This is below the recommended minimum of 600 character. Add more content.
  • Add the following text:
Text with 121 characters 張ウセニ庁最書あ軸問はレわい工3合加オナヲル有標りぼずそ月電タリモホ削禁シスコ躍原チトヒ海終く記垣ぽーこ素動ぴ西自詳侍勃おは。険オ賞終や治稿らみレゆ路史供フ箱息っの録禁ドみ話分メ現7題でほ良4物クなそ覧6載フノ個会ッド属速くす続楽八列岸ちしさお。
  • Confirm that the text length assessment returns an orange traffic light and the following feedback:
    • Text length: The text contains 595 character. This is slightly below the recommended minimum of 600 character. Add more content.
  • Add the 121 character text again.
  • Confirm that the text length assessment returns a green traffic light and the following feedback:
    • Text length: The text contains 716 character. Good job!

Taxonomies (WordPress) or collections (Shopify) in English

  • Create a new taxonomy without any content
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: Please add some content.
  • Add the following text: I love cats and dogs.
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: The text contains 5 words. This is below the recommended minimum of 30 words. Add more content.
  • Duplicate the existing text
  • Confirm that the text length assessment returns an orange traffic light and the following feedback:
    • Text length: The text contains 10 words. This is slightly below the recommended minimum of 30 words. Add more content.
  • Duplicate the existing text twice
  • Confirm that the text length assessment returns a green traffic light and the following feedback:
    • Text length: The text contains 30 words. Good job!

Taxonomies (WordPress) or collections (Shopify) in Japanese

  • Create a new taxonomy without any content
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • テキストの長さ: コンテンツを追加してください。
  • Add the following text: 私は猫と犬が大好きです。
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: The text contains 11 character. This is below the recommended minimum of 60 character. Add more content.
  • Duplicate the existing text
  • Confirm that the text length assessment returns an orange traffic light and the following feedback:
    • Text length: The text contains 22 character. This is slightly below the recommended minimum of 60 character. Add more content.
  • Duplicate the existing text twice
  • Confirm that the text length assessment returns a green traffic light and the following feedback:
    • Text length: The text contains 66 character. Good job!

Product in English (Shopify)

  • Create a new post without any content
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: The text contains 0 words. This is far below the recommended minimum of 200 words. Add more content.
  • Add the following text and confirm the feedback stays the same (only 0 is changed to 50):
Text with 50 words Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque tempor est sapien, molestie pulvinar orci faucibus non. Integer et sodales massa. Sed eget mauris eu dui malesuada feugiat et vel magna. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Quisque scelerisque elit ut ligula convallis.
  • Duplicate the existing text
  • Confirm that the text length assessment returns a red traffic light and the following feedback:
    • Text length: The text contains 100 words. This is below the recommended minimum of 200 words. Add more content.
  • Add the following text:
Text with 50 words Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas lacinia ultrices leo vel blandit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus viverra felis nec viverra varius. Proin ac tristique ex. Praesent posuere quis lectus et eleifend. Curabitur aliquet felis nec nisl dictum mollis. Phasellus feugiat mi in erat.
  • Confirm that the text length assessment returns an orange traffic light and the following feedback:
    • Text length: The text contains 150 words. This is slightly below the recommended minimum of 200 words. Add more content.
  • Add the 50 word text again
  • Confirm that the text length assessment returns a green traffic light and the following feedback:
    • Text length: The text contains 200 words. Good job!

Product in Japanese (Shopify)

  • Create a new post without any content
  • Confirm that the text length assessment shows a red traffic light and the following feedback:
    • Text length: The text contains 0 character. This is far below the recommended minimum of 400 character. Add more content.
  • Add the following text and confirm the feedback stays the same (only 0 is changed to 114):
Text with 114 characters 一ヒ好問座ウソネケ親帯ネノ線図イネ野果サルホイ報棋フじ物応市る史拶ち歩3温ヨワヱキ光子もやご新押間法喜ト。張ウセニ庁最書あ軸問はレわい工3合加オナヲル有標りぼずそ月電タリモホ削禁シスコ躍原チトヒ海終く記垣ぽーこ素動ぴ西自詳侍勃おは。
  • Duplicate the existing text
  • Confirm that the text length assessment returns a red traffic light and the following feedback:
    • Text length: The text contains 228 character. This is below the recommended minimum of 400 character. Add more content.
  • Add the following text:
Text with 90 characters 険オ賞終や治稿らみレゆ路史供フ箱息っの録禁ドみ話分メ現7題でほ良4物クなそ覧6載フノ個会ッド属速くす続楽八列岸ちしさお。達ぼねそふ回予ワ訪職と服建気タフ批環ユヌヨ阪71武断ヒ聞成へてがぜ腹第部だんざ話巡ト智話ケウ門任助伴ば
  • Confirm that the text length assessment returns an orange traffic light and the following feedback:
    • Text length: The text contains 338 character. This is slightly below the recommended minimum of 400 character. Add more content.
  • Add the 90 character text again
  • Confirm that the text length assessment returns a green traffic light and the following feedback:
    • Text length: The text contains 448 character. Good job!

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:

  • No other impact.

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 https://github.com/Yoast/lingo-other-tasks/issues/486

@agnieszkaszuba agnieszkaszuba added changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog changelog: other Needs to be included in the 'Other' category in the changelog Shopify This PR impacts Shopify. and removed changelog: non-user-facing Needs to be included in the 'Non-userfacing' category in the changelog labels May 26, 2025
@coveralls
Copy link

coveralls commented May 26, 2025

Pull Request Test Coverage Report for Build a679b683ff82f9ba84402954dc8a442f041c6a0c

Details

  • 33 of 33 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.5%) to 52.802%

Totals Coverage Status
Change from base Build d51584948daa306f55e437e459c53f16647f62be: 0.5%
Covered Lines: 29702
Relevant Lines: 57505

💛 - Coveralls

@agnieszkaszuba agnieszkaszuba marked this pull request as ready for review May 26, 2025 14:36
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 Shopify This PR impacts Shopify.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants