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 123 forks source link

Glossary Entry import doesn't validate part_of_speech #1200

Closed dd32 closed 3 years ago

dd32 commented 4 years ago

It seems like the Glossary Import doesn't validate the value of the part_of_speech field, which can be problematic for two reasons:

For example, see the month entry on https://translate.wordpress.org/locale/fa/default/glossary/

I see two options here

It looks like the mismatched values on WordPress.org can be translated, typos, and combinations (ie. adj, subst). Abbreviation was common enough that I've created #1199 for that.

dd32 commented 4 years ago

Example notice:

PHP Notice: Undefined index: abbreviation   wp-content/plugins/glotpress/gp-templates/glossary-entry-row.php:4
ocean90 commented 4 years ago

Yeah, we should reject any unknown value.