Repository: WeblateOrg/weblate

Issue:
Don't use the misleading name "One" for a singular form used for numbers other than 1
### Describe the problem

Consider the following English source string with plural form (from a PO file):
```
msgid "One apple"
msgid_plural "{count} apples"
```
As you see, msgid uses "One apple" instead of "{count} apple", which is acceptable in English.

In other languages, however, the singular form may be used not only for 1. For example, in Russian, Ukrainian, Belarusian, Serbian, and Croatian the singular form is also used for numbers ending with 1. The problem with Webalte is that although it shows the right hint when you hover over the circled "i", the entry name literally says "One", which is simply not true for the mentioned languages:
![Untitled](https://github.com/WeblateOrg/weblate/assets/10910745/0ce5fc4b-942c-4e81-afcb-22059380fed4)

Naturally, this misguides translators: they think that the message will be used for exactly 1 item, and create a translation that doesn't work with 21, 31, 41, etc. - that is, in the example source string above, they will use the analog of "One apple" instead of "{count} apple". After all, if the entry clearly says "one", why would anyone check the hint button?

### Describe the solution you'd like

The entry label should probably not say "One", but instead include the example text currently hidden in (i).

### Describe alternatives you've considered

_No response_

### Screenshots

_No response_

### Additional context

_No response_


Discussion:
These are names defined by CLDR (see https://www.unicode.org/cldr/charts/40/supplemental/language_plural_rules.html#hr) and Weblate uses them for consistency with other tooling. Showing the examples more prominently might make it more clear, though.

PS: There are languages where the same applies to “Two”, see https://www.unicode.org/cldr/charts/40/supplemental/language_plural_rules.html#dsb
This issue has been automatically marked as stale because there wasn’t any recent activity.

It will be closed soon if no further action occurs.

Thank you for your contributions!
This issue seems to be a good fit for newbie contributors. You are welcome to contribute to Weblate! Don't hesitate to ask any questions you would have while implementing this.

You can learn about how to get started in our [contributors documentation](https://docs.weblate.org/en/latest/contributing/index.html).
Is this issue still open? I am looking to contribute to it. I am newbie. 
> These are names defined by CLDR

My impression is that these names are good as identifiers (in a database for example) but not very intuitive for humans who don't know them.

Let me propose two alternatives:

1) Grammatical point of view
The text may indicate what to do, such as
"Agree as genitive singular", "Agree as genitive plural" (this is what the translator must do in these cases)
Have a look to https://github.com/t-cordonnier/weblate/tree/9675-proposal1-grammatical

2) Non-grammatical point of view
Here we could also describe what makes rules working like that
"Spoken ending as 2,3 or 4"
Explanation:
In Croatian if I am not wrong, 22 =  dvadeset i dva, it ends with 2 when you read it; 12 = dvanaest, you don't ear "dva" at the end when you read it, reason why the rule does not apply.
Have a look to https://github.com/t-cordonnier/weblate/tree/9675-proposal2-spoken

I don't open pull request yet, I prefer to open the discussion (as I propose 2 solutions and you may like none of them). Also the patches do actually only treat the case of Croatian and languages with similar scheme: I will finish the work as newbee contribution as soon as we agree about the desired solution. Tell me what you think

Resolving patch:
diff --git a/weblate/lang/models.py b/weblate/lang/models.py
--- a/weblate/lang/models.py
+++ b/weblate/lang/models.py
@@ -33,14 +33,13 @@
 from weblate.trans.defines import LANGUAGE_CODE_LENGTH, LANGUAGE_NAME_LENGTH
 from weblate.trans.mixins import CacheKeyMixin
 from weblate.trans.util import sort_objects, sort_unicode
-from weblate.utils.templatetags.icons import icon
 from weblate.utils.validators import validate_plural_formula
 
 PLURAL_RE = re.compile(
     r"\s*nplurals\s*=\s*([0-9]+)\s*;\s*plural\s*=\s*([()n0-9!=|&<>+*/%\s?:-]+)"
 )
 PLURAL_TITLE = """
-{name} <span title="{examples}">{icon}</span>
+{name} <span class="text-muted" title="{title}">({examples})</span>
 """
 COPY_RE = re.compile(r"\([0-9]+\)")
 KNOWN_SUFFIXES = {"hant", "hans", "latn", "cyrl", "shaw"}
@@ -830,6 +829,9 @@ def examples(self):
             if len(result[ret]) >= 10:
                 continue
             result[ret].append(str(i))
+        for example in result.values():
+            if len(example) >= 10:
+                example.append("…")
         return result
 
     @staticmethod
@@ -873,11 +875,8 @@ def get_plural_label(self, idx):
         return format_html(
             PLURAL_TITLE,
             name=self.get_plural_name(idx),
-            icon=icon("info.svg"),
-            # Translators: Label for plurals with example counts
-            examples=gettext("For example: {0}").format(
-                ", ".join(self.examples.get(idx, []))
-            ),
+            examples=", ".join(self.examples.get(idx, [])),
+            title=gettext("Example counts for this plural form."),
         )
 
     def get_plural_name(self, idx):


Test patch:
diff --git a/weblate/lang/tests.py b/weblate/lang/tests.py
--- a/weblate/lang/tests.py
+++ b/weblate/lang/tests.py
@@ -474,7 +474,7 @@ def test_examples(self):
         plural = Plural(number=2, formula="n!=1")
         self.assertEqual(
             plural.examples,
-            {0: ["1"], 1: ["0", "2", "3", "4", "5", "6", "7", "8", "9", "10"]},
+            {0: ["1"], 1: ["0", "2", "3", "4", "5", "6", "7", "8", "9", "10", "…"]},
         )
 
     def test_plurals(self):