question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Linked message with Pluralization

See original GitHub issue

I’m using Vue 2.6.6 and 8.8.1 of vue-i18n. There seems to be a bug when plurals are used inside of linked messages and parameters

Here is the jsfiddle - https://jsfiddle.net/4ufbypz3/1/

The following code works for plural -

  {{ $i18n.tc("tropical_fruits",2,{flavor: taste})}}<br/>

which prints “mangoes tastes sweet”

while this code for singular fails -

{{ $i18n.tc("tropical_fruits",1,{flavor: taste})}}<br/>

which prints only “mango”

I would like to use plurals inside linked message and parameters as this simplifies the language files.

I’m not also sure if using the syntax properly

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
zhouxianjuncommented, Jul 15, 2022

@kazupon Can this support be migrated to v8? because v9 don’t supports vue2

0reactions
kazuponcommented, Mar 5, 2021

we supported in Vue I18n v9. please try it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Linked Pluralization · Issue #195 · kazupon/vue-i18n - GitHub
Having duplicated string in i18n messages is normal and provide flexibility and room for change.
Read more >
When to use singular and plurals - LinkedIn
Here's a handy quick guide to when certain nouns are singular and when they are plural. Collective nouns – as well as ...
Read more >
Handling plurals in notification messages - UX Stack Exchange
"adding (s) for multiple messages seems dated." - Ironically, I've gone the other way. Adding the plural "s" (as required) was always something ......
Read more >
Plurality in user messages - Stack Overflow
I once wrote an app without using a single dialog or confirmation message. ... To be able to have pluralized messages which will...
Read more >
Pluralization in software tutorial: JavaScript & Java examples
linkedin. Due to its deceptive simplicity, pluralization can be a somewhat overlooked element when handling strings in programs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found