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
Glossary: Match single word entries of parts of speech that have no suffix rules. #1791
Glossary: Match single word entries of parts of speech that have no suffix rules. #1791
Conversation
There is one case on .org that I can't find the reason why isn't behaving the same: I would expect this if there were any rules added for suffixes in the A translation where it is matching The glossary where "FAQ" is added. |
In Romanian and Swedish are marked as "expression" and are also currently matched. |
From my testing, found that for strings that are the exact match of the glossary, this isn't a problem, the match always happens. |
Confirmed. For strings that are a single word, the splitting will always return the exact key of the glossary entry, so, it didn't have the issue of matching through the |
Added a test for all the same terms belonging to single term strings. Also, as there are many strings to test, updated the test with a |
Problem
For any types of glossary items (part of speech), if the entry has multiple words won't try to add any suffixes, and is immediately added to the glossary list.
As explained in Meta Ticket https://meta.trac.wordpress.org/ticket/7473, if the glossary entry is a single word, currently it will only be added if there are rules for suffixes, which is wrong. Even if there isn't any rule, at least the exact word should be added.
Solution
For single word glossary terms of a
part_of_speech
that have no suffix rules, add the exact match to the glossary list.Fixes #1790
Thanks @marcarmengou for reporting.