Skip to content

Missing plural forms #5458

@mKoonrad

Description

@mKoonrad

Steps To Reproduce

In many languages, there is more than one plural form. App currently does not support plural forms. There is no way to translate some strings correctly. You need to add full support for plurals. Then Crowdin translator will have opportunity to translate plurals in specific country format.

Example English:
1 character
2 characters,
10 characters
etc.

Polish:
1 znak
2 znaki
5 znaków

Expected Result

Strings with missing plurals to add:

1.

<string name="master_password_length_val_message_x">Master password must be at least %1$s characters long.</string>

to

<plurals name="master_password_length_val_message_x">
    <item quantity="one">Master password must be at least %1$s character long.</item>
    <item quantity="other">Master password must be at least %1$s characters long.</item>
</plurals>

and changes in Kotlin files, which I do not know how to fix.

2.

<string name="password_exposed">This password has been exposed %1$s time(s) in data breaches. You should change it.</string>

to

<plurals name="password_exposed">
    <item quantity="one">This password has been exposed %1$s time in data breaches. You should change it.</item>
    <item quantity="other">This password has been exposed %1$s times in data breaches. You should change it.</item>
</plurals>

and changes in Kotlin files, which I do not know how to fix.

3.

<string name="your_master_password_cannot_be_recovered_if_you_forget_it_x_characters_minimum">Your master password cannot be recovered if you forget it! %1$s characters minimum.</string>

to

<plurals name="your_master_password_cannot_be_recovered_if_you_forget_it_x_characters_minimum">
    <item quantity="one">Your master password cannot be recovered if you forget it! %1$s character minimum.</item>
    <item quantity="other">Your master password cannot be recovered if you forget it! %1$s characters minimum.</item>
</plurals>

and changes in Kotlin files, which I do not know how to fix.

4.

<string name="minimum_characters">%1$s characters</string>

to

<plurals name="minimum_characters">
    <item quantity="one">%1$s character</item>
    <item quantity="other">%1$s characters</item>
</plurals>

and changes in Kotlin files, which I do not know how to fix.

Actual Result

Missing plural forms. Can't translate some strings correctly.

Screenshots or Videos

No response

Additional Context

More info about plurals: https://developer.android.com/guide/topics/resources/string-resource?hl=en#Plurals
https://www.unicode.org/cldr/charts/47/supplemental/language_plural_rules.html

Build Version

not relevant

What server are you connecting to?

N/A

Self-host Server Version

No response

Environment Details

No response

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions