你好,我正在尝试根据https://kazupon.github.io/vue-i18n/guide/pluralization.html进行复数化。
imageCount== 1
? $t("message.imageMessage", 1, { imageCount})
: $t("message.imageMessage", imageCount, {
imageCount
})
imageMessage: '{imageCount} image downloaded | {imageCount} images downloaded'
问题:目前它显示了两个信息,这不应该发生,我实现的方式有什么问题吗?
Codesandbox: https://codesandbox.io/s/lingering-haze-z9jzt?file=/src/components/HelloWorld.vue
代码沙盒:https://codesandbox.io/s/lingering-haze-z9jzt?file=/src/components/HelloWorld.vue
$tc()
代替$t()
”。示例 - https://codesandbox.io/s/recursing-neumann-e2gdn?file=/src/components/HelloWorld.vue - Phil