init
This commit is contained in:
commit
44f31f8b9f
402 changed files with 47865 additions and 0 deletions
5
plugins/numbro/languages/index.js
Normal file
5
plugins/numbro/languages/index.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import ru from './ru'
|
||||
import uk from './uk'
|
||||
import zh from './zh'
|
||||
|
||||
export const locales = [ru, uk, zh]
|
53
plugins/numbro/languages/ru.js
Normal file
53
plugins/numbro/languages/ru.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
module.exports = {
|
||||
languageTag: 'ru-RU',
|
||||
delimiters: {
|
||||
thousands: ' ',
|
||||
decimal: ','
|
||||
},
|
||||
abbreviations: {
|
||||
thousand: 'k',
|
||||
million: 'm',
|
||||
billion: 'b',
|
||||
trillion: 't'
|
||||
},
|
||||
ordinal() {
|
||||
// not ideal, but since in Russian it can taken on
|
||||
// different forms (masculine, feminine, neuter)
|
||||
// this is all we can do
|
||||
return '.'
|
||||
},
|
||||
currency: {
|
||||
symbol: 'руб.',
|
||||
position: 'postfix',
|
||||
code: 'RUB'
|
||||
},
|
||||
currencyFormat: {
|
||||
thousandSeparated: true,
|
||||
totalLength: 4,
|
||||
spaceSeparated: true,
|
||||
average: true
|
||||
},
|
||||
formats: {
|
||||
fourDigits: {
|
||||
totalLength: 4,
|
||||
spaceSeparated: true,
|
||||
average: true
|
||||
},
|
||||
fullWithTwoDecimals: {
|
||||
output: 'currency',
|
||||
mantissa: 2,
|
||||
spaceSeparated: true,
|
||||
thousandSeparated: true
|
||||
},
|
||||
fullWithTwoDecimalsNoCurrency: {
|
||||
mantissa: 2,
|
||||
thousandSeparated: true
|
||||
},
|
||||
fullWithNoDecimals: {
|
||||
output: 'currency',
|
||||
spaceSeparated: true,
|
||||
thousandSeparated: true,
|
||||
mantissa: 0
|
||||
}
|
||||
}
|
||||
}
|
53
plugins/numbro/languages/uk.js
Normal file
53
plugins/numbro/languages/uk.js
Normal file
|
@ -0,0 +1,53 @@
|
|||
module.exports = {
|
||||
languageTag: 'uk-UA',
|
||||
delimiters: {
|
||||
thousands: ' ',
|
||||
decimal: ','
|
||||
},
|
||||
abbreviations: {
|
||||
thousand: 'k',
|
||||
million: 'm',
|
||||
billion: 'b',
|
||||
trillion: 't'
|
||||
},
|
||||
ordinal: () => {
|
||||
// not ideal, but since in Ukrainian it can taken on
|
||||
// different forms (masculine, feminine, neuter)
|
||||
// this is all we can do
|
||||
return ''
|
||||
},
|
||||
currency: {
|
||||
symbol: '\u20B4',
|
||||
position: 'postfix',
|
||||
code: 'UAH'
|
||||
},
|
||||
currencyFormat: {
|
||||
thousandSeparated: true,
|
||||
totalLength: 4,
|
||||
spaceSeparated: true,
|
||||
average: true
|
||||
},
|
||||
formats: {
|
||||
fourDigits: {
|
||||
totalLength: 4,
|
||||
spaceSeparated: true,
|
||||
average: true
|
||||
},
|
||||
fullWithTwoDecimals: {
|
||||
output: 'currency',
|
||||
mantissa: 2,
|
||||
spaceSeparated: true,
|
||||
thousandSeparated: true
|
||||
},
|
||||
fullWithTwoDecimalsNoCurrency: {
|
||||
mantissa: 2,
|
||||
thousandSeparated: true
|
||||
},
|
||||
fullWithNoDecimals: {
|
||||
output: 'currency',
|
||||
spaceSeparated: true,
|
||||
thousandSeparated: true,
|
||||
mantissa: 0
|
||||
}
|
||||
}
|
||||
}
|
47
plugins/numbro/languages/zh.js
Normal file
47
plugins/numbro/languages/zh.js
Normal file
|
@ -0,0 +1,47 @@
|
|||
module.exports = {
|
||||
languageTag: 'zh-CN',
|
||||
delimiters: {
|
||||
thousands: ',',
|
||||
decimal: '.'
|
||||
},
|
||||
abbreviations: {
|
||||
thousand: '千',
|
||||
million: '百万',
|
||||
billion: '十亿',
|
||||
trillion: '兆'
|
||||
},
|
||||
ordinal() {
|
||||
return '.'
|
||||
},
|
||||
currency: {
|
||||
symbol: '¥',
|
||||
position: 'prefix',
|
||||
code: 'CNY'
|
||||
},
|
||||
currencyFormat: {
|
||||
thousandSeparated: true,
|
||||
totalLength: 4,
|
||||
spaceSeparated: true,
|
||||
average: true
|
||||
},
|
||||
formats: {
|
||||
fourDigits: {
|
||||
totalLength: 4,
|
||||
spaceSeparated: true,
|
||||
average: true
|
||||
},
|
||||
fullWithTwoDecimals: {
|
||||
thousandSeparated: true,
|
||||
mantissa: 2
|
||||
},
|
||||
fullWithTwoDecimalsNoCurrency: {
|
||||
mantissa: 2,
|
||||
thousandSeparated: true
|
||||
},
|
||||
fullWithNoDecimals: {
|
||||
output: 'currency',
|
||||
thousandSeparated: true,
|
||||
mantissa: 0
|
||||
}
|
||||
}
|
||||
}
|
10
plugins/numbro/numbro.js
Normal file
10
plugins/numbro/numbro.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import numbro from 'numbro'
|
||||
import { locales } from './languages'
|
||||
|
||||
export default (ctx, inject) => {
|
||||
locales.forEach((lang) => {
|
||||
numbro.registerLanguage(lang)
|
||||
})
|
||||
ctx.$numbro = numbro
|
||||
inject('numbro', numbro)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue