mirror of
https://github.com/cupcakearmy/svelte-i18n.git
synced 2024-06-30 18:54:49 +02:00
Add pluralization with interpolation test
This commit is contained in:
parent
50da3e798b
commit
10b44382b8
|
@ -16,6 +16,7 @@ const locales = {
|
||||||
key: 'Olá, {0}! Como está {1}?',
|
key: 'Olá, {0}! Como está {1}?',
|
||||||
named: 'Olá, {name}! Como está {time}?',
|
named: 'Olá, {name}! Como está {time}?',
|
||||||
},
|
},
|
||||||
|
interpolationPluralization: 'One thingie | {0} thingies',
|
||||||
wow: {
|
wow: {
|
||||||
much: {
|
much: {
|
||||||
deep: {
|
deep: {
|
||||||
|
@ -141,6 +142,8 @@ describe('Localization', () => {
|
||||||
expect(_.plural('pluralization', -1000)).toBe('Muito!')
|
expect(_.plural('pluralization', -1000)).toBe('Muito!')
|
||||||
expect(_.plural('pluralization', 2)).toBe('Muito!')
|
expect(_.plural('pluralization', 2)).toBe('Muito!')
|
||||||
expect(_.plural('pluralization', 100)).toBe('Muito!')
|
expect(_.plural('pluralization', 100)).toBe('Muito!')
|
||||||
|
expect(_.plural('interpolationPluralization', 1)).toBe('One thingie')
|
||||||
|
expect(_.plural('interpolationPluralization', 10, [10])).toBe('10 thingies')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user