Problem description: If a host has multiple templates linked to it, and then a user unlinks one of them and unlinks and clears another one in a single host update, then the message details that is returned to the user is grammatically incorrect:
1 - As You can see, both words "templates" and "hosts" in the message are used in plural even though there is just one host and we have a row for each unlinked template.
2 - Identical messages are displayed for both unlinked templates, even though the actions that were performed are different. If actions would be the same (unlink for both templates) then both templates would be included into a single message. Maybe the same should be done when different actions ("unlink" and "unlink and clear") are performed for templates?
Steps to reproduce:
- Create two templates
- Create a host
- Link both of these templates to this host
- Open host configuration in edit mode
- Unlink 1st template and unlink and clear second template
- Submit host configuration form
- Check message details
As shown in message above, words "templates" and "hosts" are in plural, even though each line contains records for a single template and a single host.
Expected: if there is 1 template unlinked from one host the above words should be used as singular. Since the message is the same for both unlinked and unlinked and cleared templates, why not mention both of them in a single row?