Opened 2 months ago

Last modified 2 months ago

#7473 new defect (bug)

Some suggestions from the local glossary do not appear

Reported by: marc4's profile Marc4 Owned by:
Milestone: Priority: normal
Component: Translate Site & Plugins Keywords: has-unit-tests has-patch


For the past week or two, I've been noticing that some words from my localization glossary aren't showing up as suggestions in translation strings.

In trying to find out why, in the Catalan localization, I've noticed that the glossary words not appearing as suggestions have a "-" in the "Translation" field (I imagine someone put a hyphen to avoid leaving the field empty).

These entries were created in 2022, and until recently, the glossary suggestion appeared correctly, but for the past week or two, the suggestion hasn't been showing up when translating strings.

If I create a new glossary entry and put "-" in the "Translation" field, it works correctly, even with other punctuation marks. The problem lies only with the old entries, and I'm not sure if it's just with "-" or also with other signs or symbols.

I've tried removing the "-" from the "Translation" field by editing the entry, but the suggestion still doesn't appear. I've deleted the entry and recreated it, but it still doesn't show up. If I add another word to the original word, the suggestion is created.

Could it be that another localization has "-" in the "Translation" field or another symbol and is experiencing the same issue? Does it make sense to avoid including only symbols? Only empty fields or text? Is it a punctuation problem or a recent change?

Change History (8)

#1 @Marc4
2 months ago

Now I am seeing that other words in the glossary, which have one or more words in the "Translation" field are not suggested.

You can see an example of this with, for example, the word "Welcome" in the Catalan glossary:

Here is an example plugin where the word Welcome appears without the suggestion:

The same goes for "your", "sorry", "please" and maybe a few more words of our glossary.

Yesterday I edited the "Translation" field of "your" and it still does not give the hint. I deleted "your" and created it again and it still doesn't give the suggestion. If I use "your + anyword" it does add the glossary suggestion to the translation strings.

Last edited 2 months ago by Amieiro (previous) (diff)

#2 @pedromendonca
2 months ago

Hi @Marc4,
Can you please make a small test, and change the "Welcome" glossary entry from "expression" to "noun" and check if it gets matched?
Recently was released GlotPress 4.0.0-beta.1 ( and deployed to that introduced a huge makover on glossary matches and I'm suspecting on that change.

#3 @Marc4
2 months ago

Hi @pedromendonca. That's it. I made the change you suggested and now the suggestion does appear.

#4 @pedromendonca
2 months ago

I've found the cause of part of what you report.

Description of the current glossary match logic:
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.

The problem:
If 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. (Fixing it as we speak).

This seems to fix the cases for "Welcome", "please", "your" and "sorry" for other than nouns and verbs, which are the ones that currently have rules for matching suffixes (

For the other cases with hyphen, I didn't understood, could you show some examples please?

#5 @Marc4
2 months ago

Thank's @pedromendonca . Indeed, it seems that only "nouns", "verbs", and anything that is not "nouns" and "verbs" but has more than one word are being suggested.

Some examples of this:

  • successfully: adverb, does not give suggestions
  • regular: adjective, does not give suggestions
  • oops: interjection, does not give suggestions
  • something went wrong: if it gives suggestion, although it is not "noun", nor "verb" but it has more than one word.

For the other cases with hyphen, I didn't understood, could you show some examples please?

You can forget about the hyphens. It was coincidence that some of the words that didn't give a suggestion had only a hyphen in the "Translation" field, and I thought that might be the problem, but the problem clearly seems to affect everything other than "nouns" and "verbs".

#6 @pedromendonca
2 months ago

So it should all be fixed soon :)
Thanks for reporting it!

You can follow the issue and PR in

#7 @pedromendonca
2 months ago

  • Keywords has-unit-tests has-patch added

The issue is patched and pending review.

After review and merge, it can be included in the next GlotPress beta and deployed to
@amieiro can you please check this ticket after the reviewing and deploy GlotPress, to close it?

Thanks :)

Last edited 2 months ago by pedromendonca (previous) (diff)

#8 @Marc4
2 months ago

That's great, thanks @pedromendonca :)

Note: See TracTickets for help on using tickets.