GlotPress / GlotPress

:earth_africa: :earth_americas: :earth_asia: GlotPress is a WordPress plugin to let you set up your own collaborative, web-based software translation tool.
https://wordpress.org/plugins/glotpress/
GNU General Public License v2.0
338 stars 121 forks source link

Glossary: Don't add 'es' as a default suffix to terms? #1386

Closed ocean90 closed 8 months ago

ocean90 commented 2 years ago

Looking at some examples generated by gp_sort_glossary_entries_terms() and in non of them the suffix es makes sense. Should we drop it from the default list?

https://github.com/GlotPress/GlotPress-WP/blob/3304c4e0244e412c29c1b4f2d8a9e7b0f205bc73/gp-templates/helper-functions.php#L114-L116

The examples:

'Human-readable|Human-readables|Human-readablees|Human-readableed|Human-readableing'
'notifications|notificationss|notificationses|notificationsed|notificationsing'
'administrator|administrators|administratores|administratored|administratoring'
'interjection|interjections|interjectiones|interjectioned|interjectioning'
'requirements|requirementss|requirementses|requirementsed|requirementsing'
'Customizing|Customizings|Customizinges|Customizinged|Customizinging'
'conjunction|conjunctions|conjunctiones|conjunctioned|conjunctioning'
'description|descriptions|descriptiones|descriptioned|descriptioning'
'major/minor|major/minors|major/minores|major/minored|major/minoring'
'permissions|permissionss|permissionses|permissionsed|permissionsing'
'Contributor|Contributors|Contributores|Contributored|Contributoring'
'recommended|recommendeds|recommendedes|recommendeded|recommendeding'
'preposition|prepositions|prepositiones|prepositioned|prepositioning'
'breadcrumbs|breadcrumbss|breadcrumbses|breadcrumbsed|breadcrumbsing'
'attachment|attachments|attachmentes|attachmented|attachmenting'
'unapproved|unapproveds|unapprovedes|unapproveded|unapproveding'
'blockquote|blockquotes|blockquotees|blockquoteed|blockquoteing'
'checkboxes|checkboxess|checkboxeses|checkboxesed|checkboxesing'
'permalinks|permalinkss|permalinkses|permalinksed|permalinksing'
'previewing|previewings|previewinges|previewinged|previewinging'
'reactivate|reactivates|reactivatees|reactivateed|reactivateing'
'childtheme|childthemes|childthemees|childthemeed|childthemeing'
pedro-mendonca commented 2 years ago

As I've mentioned on #1372, I think we should have different rules per part_of_speech, nouns, verbs, etc.

pedro-mendonca commented 2 years ago

Most of the above errors are fixed in #1373, especially if verbs are inserted in the infinitive or nouns are inserted in singular.

Wrong examples above:

'Customizing|Customizings|Customizinges|Customizinged|Customizinging'
'recommended|recommendeds|recommendedes|recommendeded|recommendeding'

The problem here is that the verbs aren't in the infinitive form, requiring some effort to predict, that isn't currently coded, not even in the #1373.

If both are on infinitive and set as verbs, the result is:

customiz ( e | ed | ing )
custom ( ize | ization )
recommend ( s | ed | ing )
amieiro commented 11 months ago

I have set up a glossary with these words with the https://github.com/GlotPress/GlotPress/pull/1373 PR:

The number of matches is much smaller, and with the approach I commented here, we can reduce it even further.

image

pedro-mendonca commented 11 months ago

As I've mentioned in https://github.com/GlotPress/GlotPress/issues/1384#issuecomment-1770932902 and above in https://github.com/GlotPress/GlotPress/issues/1386#issuecomment-1191547643, I think one of the premises and best practice of the Glossary usage is adding nouns in singular, and verbs in the infinitive. Adding nouns in plurals and verbs in any other verbal form introduces unnecessary logic to the suffix matching.

amieiro commented 8 months ago

Fixed in https://github.com/GlotPress/GlotPress/pull/1373.