A (slightly) smarter way to infer the plural spelling of singular entity names

This commit is contained in:
Fabio Manganiello 2022-11-02 16:35:20 +01:00
parent 3d1a08f7af
commit 440cd60d6e
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 9 additions and 1 deletions

View File

@ -98,7 +98,15 @@ export default {
methods: {
prettifyGroupingName(name) {
return name ? this.prettify(name) + 's' : ''
if (!name)
return ''
name = this.prettify(name)
if (name.endsWith('y'))
name = name.slice(0, name.length-1) + 'ie'
name += 's'
return name
},
iconForGroup(group) {