Inspectopedia Help

Implied Quantities

Implied Quantities

Plural strings should generally include a %s or %d formatting argument. In locales like English, the one quantity only applies to a single value, 1, but that's not true everywhere. For example, in Slovene, the one quantity will apply to 1, 101, 201, 301, and so on. Similarly, there are locales where multiple values match the zero and two quantities.

In these locales, it is usually an error to have a message which does not include a formatting argument (such as '%d'), since it will not be clear from the grammar what quantity the quantity string is describing.

Issue id: ImpliedQuantity

https://developer.android.com/guide/topics/resources/string-resource.html#Plurals

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3

Plugin:

Android, 2022.3.1 Beta 2

Last modified: 13 July 2023