From 440cd60d6e029f7592abfe4a1034111cfb655848 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 2 Nov 2022 16:35:20 +0100 Subject: [PATCH] A (slightly) smarter way to infer the plural spelling of singular entity names --- .../webapp/src/components/panels/Entities/Selector.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue b/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue index d8abd90b4..ee627cb03 100644 --- a/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue +++ b/platypush/backend/http/webapp/src/components/panels/Entities/Selector.vue @@ -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) {