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 untrusted user: blacklight
GPG key ID: D90FBA7F76362774

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) {