Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use the misleading name "One" for a singular form used for numbers other than 1 #9675

Closed
danpla opened this issue Aug 2, 2023 · 9 comments · Fixed by #10136
Closed
Assignees
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. ux Issues related to user experience.
Milestone

Comments

@danpla
Copy link

danpla commented Aug 2, 2023

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

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

@nijel
Copy link
Member

nijel commented Aug 3, 2023

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

@github-actions
Copy link

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!

@github-actions github-actions bot added the wontfix Nobody will work on this. label Aug 18, 2023
@nijel nijel added enhancement Adding or requesting a new feature. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. good first issue Opportunity for newcoming contributors. ux Issues related to user experience. and removed wontfix Nobody will work on this. labels Aug 18, 2023
@github-actions
Copy link

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.

@nishitiwari22
Copy link

Is this issue still open? I am looking to contribute to it. I am newbie.

@t-cordonnier
Copy link

t-cordonnier commented Oct 9, 2023

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

@nijel nijel self-assigned this Oct 10, 2023
@nijel nijel added this to the 5.1 milestone Oct 10, 2023
nijel added a commit to nijel/weblate that referenced this issue Oct 10, 2023
nijel added a commit to nijel/weblate that referenced this issue Oct 10, 2023
Instead of the tooltip, the text is rendered in the page now.

Fixes WeblateOrg#9675
@nijel
Copy link
Member

nijel commented Oct 10, 2023

Many professional translators are used to these names, that's why I think the category names should stay visible.

The specific rules are language dependent (and vary between file formats or framework versions), so I don't think it's reasonable to have a verbose description for each of them.

So my original intention here was just to show the numbers directly, not only in a tooltip. This is what I've just implemented in #10136

@t-cordonnier
Copy link

t-cordonnier commented Oct 10, 2023

I understand but

Many professional translators are used to these names,

The fact that somebody (not me) opened such a ticket shows us that this is not the case for everybody.

The specific rules are language dependent [...] So my original intention here was just to show the numbers directly,

As the rule can depend from the number, you may have exactly same problem to display the correct number. For example what if some languages make agreement for 21 as singular and some as genitive plural like 25?
See also the comment I added on #10136

nijel added a commit to nijel/weblate that referenced this issue Oct 10, 2023
Instead of the tooltip, the text is rendered in the page now.

Fixes WeblateOrg#9675
@nijel
Copy link
Member

nijel commented Oct 10, 2023

I'm not saying that everybody understands these, but it's an industry standard. Omitting that would be confusing for many users. We definitely need to clarify this for users not familiar with CLDR categories.

nijel added a commit that referenced this issue Oct 11, 2023
Instead of the tooltip, the text is rendered in the page now.

Fixes #9675
@github-actions
Copy link

Thank you for your report; the issue you have reported has just been fixed.

  • In case you see a problem with the fix, please comment on this issue.
  • In case you see a similar problem, please open a separate issue.
  • If you are happy with the outcome, don’t hesitate to support Weblate by making a donation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adding or requesting a new feature. good first issue Opportunity for newcoming contributors. hacktoberfest This is suitable for Hacktoberfest. Don’t try to spam. help wanted Extra attention is needed. ux Issues related to user experience.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants