home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4.07k stars 2.78k forks source link

plural and singular are swapped for condition matching display #21930

Open unclehack opened 2 months ago

unclehack commented 2 months ago

Checklist

Describe the issue you are experiencing

"Test if 3 condition matches" is displayed when 3 conditions are used for an automation. This is incorrect in proper English. It should read "Test if 3 conditions match".

The following patch fixes the issue:

diff --git a/src/translations/en.json b/src/translations/en.json
index df4945647..84a60453f 100644
--- a/src/translations/en.json
+++ b/src/translations/en.json
@@ -3115,7 +3115,7 @@
                   "description": {
                     "picker": "Test if multiple conditions are true.",
                     "no_conditions": "Test if multiple conditions match",
-                    "full": "Test if {count} {count, plural,\n one {condition match}\n other {conditions matches}\n}"
+                    "full": "Test if {count} {count, plural,\n one {condition matches}\n other {conditions match}\n}"
                   }
                 },
                 "device": {

Describe the behavior you expected

It should've been "Test if 3 conditions match".

Steps to reproduce the issue

  1. Create an automation
  2. Add more than one condition
  3. See that it says "Test if N condition matches" ...

What version of Home Assistant Core has the issue?

2024.9.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

any

Which operating system are you using to run this browser?

any

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

silamon commented 2 months ago

Feel free to make a pull request with your patch for this issue.