WordPress / openverse

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
https://openverse.org
MIT License
239 stars 189 forks source link

Normalise `verbose_name` and `verbose_name_plural` for audio models #4655

Open dhruvkb opened 1 month ago

dhruvkb commented 1 month ago

Description

Audio models have either none, or incorrect verbose_name_plural values. Additionally they all lack verbose_name.

Model Current verbose_name_plural Expected verbose_name_plural Expected verbose_name
Audio None "audio tracks" "audio track"
SensitiveAudio "Sensitive audio" "sensitive audio tracks" "sensitive audio track"
DeletedAudio "Deleted audio" "deleted audio tracks" "deleted audio track"

Note the lowercasing of the first letter in verbose_name_plural and the use of "track(s)" to differentiate singular and plural values.

This change will lead to a new no-op migration.

Additional context

These textual changes actually make a significant difference in the experience of moderation as the Django admin uses these values heavily to build menus and pages.

Yadavanurag13 commented 1 month ago
class Meta:
        verbose_name = "Deleted audio"
        verbose_name_plural = "Deleted audios"

class Meta:
        db_table = "api_matureaudio"
        verbose_name = "Sensitive audio"
        verbose_name_plural = "Sensitive audios"

@dhruvkb is this the expected solution?

dhruvkb commented 1 month ago

No @Yadavanurag13. The solution would be to specify the value in the expected columns for verbose_name and verbose_name_plural.