Linked Pluralization
See original GitHub issueusing vue 2.2.6 and vue-i18n 6.1.1
Can this be done? I’m trying to do a “action string” ex: User added 1 photo - if there are more photos i want to show “photos”
i have this
export default {
en: {
actions: {
photo: 'added {count} @:photo'
},
photo: 'photo | photos'
}
}
How do I pass the count parameter in a pluralized linked locale message ?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:19 (1 by maintainers)
Top Results From Across the Web
Plurals of Linked Words - Grammar-Quizzes
Occasionally, we pluralize the final element, especially when the compound includes a preposition, a repeated word, linked words, or the suffix -ful.
Read more >linked - Wiktionary
linked (comparative more linked, superlative most linked). connected, either with links, or as if with links; (computing) having links (between modules, ...
Read more >Vue i18n : Pluralization and Linked Messages not interpreted ...
The Plurals and Linked messages syntax in the locales messages should be interpreted by vue-i18n and not display the full locale message string....
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 >They Exist! Introducing Plural Mentions to Coreference ...
This paper analyzes arguably the most challenging yet under-explored aspect of resolution tasks such as coreference resolution and entity linking, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
While I agree with @amertum’s point on duplicates not being a bad thing ,I don’t fully agree with the points on maintenance and other languages causing problems
In my particular use case:
the names
collection
andfile
are used in a lot of different instances (this is only a subset) and don’t change between instances. By using the linked locale messages feature, we can prevent spelling errors by only having to enter the “general” terms once.Next to this, additional translations can be a lot smaller by using the fallback language for the combined messages like follows:
If the combined message doesn’t fit well in the other language, the linked locale message can be updated on a per-instance basis:
First syntax ideas:
@:apple
@:apple(1)
@:apple(10, { count: 10 })
OR:
@:apple
@:apple:1
@:apple:10:{"count": 10}
@kazupon What are your thoughts on the matter? Would you be interested in figuring out an addition to the linked locale message syntax in order to support pluralization?
Hello all,
Is there any update on this issue?