Skip to content

485 improve translatability of strings for the subheading distribution assessment#22044

Merged
rohans456 merged 18 commits intotrunkfrom
485-improve-translatability-of-strings-for-the-subheading-distribution-assessment
Feb 20, 2025
Merged

485 improve translatability of strings for the subheading distribution assessment#22044
rohans456 merged 18 commits intotrunkfrom
485-improve-translatability-of-strings-for-the-subheading-distribution-assessment

Conversation

@FAMarfuaty
Copy link
Copy Markdown
Contributor

@FAMarfuaty FAMarfuaty commented Feb 14, 2025

Context

  • Currently, the strings that contain the words 'word(s)' or 'character(s)' inside Subheading distribution assessment are not created in a way that makes it easy/possible to translate them correctly. This PR addresses that problem.

Summary

This PR can be summarized in the following changelog entry:

  • [yoastseo] Improves the feedback strings in subheading distribution assessment for better translatability.
  • [shopify-seo] Improves the feedback strings of the subheading distribution assessment for better translatability.
  • Improves the feedback strings of the subheading distribution assessment for better translatability.

Relevant technical choices:

  • In the plugin, the feedback strings for subheading distribution assessment that are changed is for this condition:
    • When there is one or multiple long sections of text that are not split by subheadings, and the long section doesn't occur at the beginning of the text.
  • For other cases, the feedback strings are exactly the same as before
  • I lowered the number of maximum eslint warnings from 21 to 20 since I fixed one warnings inside packages/yoastseo/src/scoring/assessments/readability/SubheadingDistributionTooLongAssessment.js

Test instructions

Test instructions for the acceptance test before the PR gets merged

This PR can be acceptance tested by following these steps:

  • Please use this ATP to test the PR
  • Focus on the assessment's feedback
  • Scenario 2.1.3 and Scenario 2.1.4 covers from the document must be tested thoroughly since this PR changes the feedback texts for those scenarios. Other scenarios can be smoked tested

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 further impact other than what is already covered in the testing instruction

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.
    • I've updated the analysis documentation inside the yoastseo package and the analysis documentation in Confluence

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/485

@coveralls
Copy link
Copy Markdown

coveralls commented Feb 14, 2025

Pull Request Test Coverage Report for Build 2f845742bc8347e43b06611c60f80892e14b8c70

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

  • 33 of 33 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on 485-improve-translatability-of-strings-for-the-subheading-distribution-assessment at 57.813%

Totals Coverage Status
Change from base Build 087732f2047ad5cf21353460a2a6fe9cb60de842: 57.8%
Covered Lines: 13652
Relevant Lines: 23252

💛 - Coveralls

@FAMarfuaty FAMarfuaty added changelog: other Needs to be included in the 'Other' category in the changelog Shopify This PR impacts Shopify. labels Feb 14, 2025
import JapaneseResearcher from "../../../../src/languageProcessing/languages/ja/Researcher.js";
import japaneseConfig from "../../../../src/languageProcessing/languages/ja/config/subheadingsTooLong.js";

const subheadingDistributionTooLong = new SubheadingDistributionTooLong();
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I moved this declaration to inside each test case to make sure that each test case has a fresh initialization of this assessment

@FAMarfuaty FAMarfuaty marked this pull request as ready for review February 17, 2025 13:34
@rohans456
Copy link
Copy Markdown
Contributor

Testing was successful.

@rohans456 rohans456 added this to the 24.7 milestone Feb 20, 2025
@rohans456 rohans456 merged commit 1e8e684 into trunk Feb 20, 2025
@rohans456 rohans456 deleted the 485-improve-translatability-of-strings-for-the-subheading-distribution-assessment branch February 20, 2025 08:07
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.

4 participants