This PR can be summarized in the following changelog entry:
[non-user-facing] Makes it possible to load language-specific morphology data in the specs and in the dev-tool.
Relevant technical choices:
To keep it simple for now, getMorphologyData currently imports all language-specific morphology files and then sets the right one based on the language. In the future, we should import only the specific language file that's needed.
Test instructions
This PR can be tested by following these steps:
Run yarn test and make sure that all unit tests pass.
In the dev-tool, set your locale to en_US.
Add an English keyphrase, e.g. story.
Add a text with >150 words, including the word stories.
Make sure stories gets recognized.
Set your locale to de_DE.
Add a German keyphrase, e.g. Geschichte.
Add a text with >150 words, including the word Geschichten.
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
getMorphologyData
currently imports all language-specific morphology files and then sets the right one based on the language. In the future, we should import only the specific language file that's needed.Test instructions
This PR can be tested by following these steps:
yarn test
and make sure that all unit tests pass.en_US
.story
.stories
.stories
gets recognized.de_DE
.Geschichte
.Geschichten
.Geschichten
gets recognized.Fixes https://github.com/Yoast/YoastSEO.js-premium-configuration/issues/14