背景
我在开发一个应用程序,里面有很多翻译。
我有下一个英文复数字符串:
<plurals name="something">
<item quantity="one">added photo</item>
<item quantity="other">added %d photos</item>
</plurals>
和法语翻译:
<plurals name="something">
<item quantity="one">a ajouté une photo</item>
<item quantity="other">a ajouté %d photos</item>
</plurals>
问题
对于法语和俄语,我收到下一个警告:
The quantity 'one' matches more than one specific number in this locale, but the message did not include a formatting argument (such as %d). This is usually an internationalization error. See full issue explanation for more.
选择显示详细信息时,它说:
好像是,我不知道应该做什么来修复它,即使有问题...
问题
我究竟应该如何处理这些字符串?我应该告诉译员什么?
最佳答案
在法语中,当计数为 0 或 1 时使用单数形式。在英语中,仅当计数为 1 时使用单数形式。0 使用复数形式。
这就是您需要在法语单数模式中插入占位符 (%d) 的原因。
关于android - 获取复数 : "The quantity ' one' matches more than one specific number. 的错误/警告 ..",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26159556/