geting error/warning for plurals : “The quantity 'one' matches more than one specific number…”

旧巷老猫 提交于 2019-12-03 12:34:49

In French singular form is used when count is 0 or 1. In English singular form is used only when count is 1. 0 uses a plural form.

This is why you need to insert a placeholder (%d) in your French singular pattern.

I'm going to write an answer since this is quite an difficult explanation.

In various languages, nouns use the singular form if they end with 1. Refer to: http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html

Explaining in English there are languages where it's correct to say "added 1 photo" as well as "added 101 photo". Notice the "photo". So this means that you should always add "%d" on one strings as well. Android will choose the best scenario to use. Which means that in English it will choose "other" for numbers > 1 and on other languages it will choose "one" for numbers ended in one.

Resuming, add to %d to your one string and should be fine. Also make sure your translators respect the plural rules for their language.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!