Skip to content

Commit

Permalink
add locales dir with unmagnified
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Draper authored and Adam Draper committed Dec 17, 2016
1 parent f598436 commit 0e500ee
Show file tree
Hide file tree
Showing 35 changed files with 1,153 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Gruntfile.js
Expand Up @@ -78,6 +78,20 @@ module.exports = function(grunt) {
configFile: 'karma-ci.conf.js'
}
},
copy: {
locales: {
files: [
{
expand: true,
cwd: 'src/',
src: [
'locales/*.js'
],
dest: './'
}
]
}
},
compile: {
locales: {
type: 'locales'
Expand Down Expand Up @@ -138,6 +152,7 @@ module.exports = function(grunt) {
}
});

grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');
Expand All @@ -154,7 +169,8 @@ module.exports = function(grunt) {
grunt.registerTask('build', [
'jshint',
'compile',
'compile:numeral'
'compile:numeral',
'copy'
]);

grunt.registerTask('test', [
Expand Down
34 changes: 34 additions & 0 deletions locales/be-nl.js
@@ -0,0 +1,34 @@
// numeral.js locale configuration
// locale : belgium-dutch (be-nl)
// author : Dieter Luypaert : https://github.com/moeriki

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'be-nl', {
delimiters: {
thousands: ' ',
decimal : ','
},
abbreviations: {
thousand : 'k',
million : ' mln',
billion : ' mld',
trillion : ' bln'
},
ordinal : function (number) {
var remainder = number % 100;

return (number !== 0 && remainder <= 1 || remainder === 8 || remainder >= 20) ? 'ste' : 'de';
},
currency: {
symbol: '€ '
}
});
}));
40 changes: 40 additions & 0 deletions locales/bg.js
@@ -0,0 +1,40 @@
// numeral.js locale configuration
// locale : Bulgarian
// author : Don Vince : https://github.com/donvince/

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'bg', {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: { // I found these here http://www.unicode.org/cldr/charts/28/verify/numbers/bg.html
thousand: 'хил',
million: 'млн',
billion: 'млрд',
trillion: 'трлн'
},
ordinal: function (number) {
// google translate suggests:
// 1st=1-ви; 2nd=2-ри; 7th=7-ми;
// 8th=8-ми and many others end with -ти
// for example 3rd=3-ти
// However since I've seen suggestions that in
// Bulgarian the ordinal can be taken in
// different forms (masculine, feminine, neuter)
// I've opted to wimp out on commiting that to code
return '';
},
currency: {
symbol: 'лв'
}
});
}));
32 changes: 32 additions & 0 deletions locales/chs.js
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : simplified chinese (chs)
// author : badplum : https://github.com/badplum

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'chs', {
delimiters: {
thousands: ',',
decimal: '.'
},
abbreviations: {
thousand: '千',
million: '百万',
billion: '十亿',
trillion: '兆'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: '¥'
}
});
}));
32 changes: 32 additions & 0 deletions locales/cs.js
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : czech (cs)
// author : Anatoli Papirovski : https://github.com/apapirovski

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'cs', {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'tis.',
million: 'mil.',
billion: 'b',
trillion: 't'
},
ordinal: function () {
return '.';
},
currency: {
symbol: 'Kč'
}
});
}));
32 changes: 32 additions & 0 deletions locales/da-dk.js
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : danish denmark (dk)
// author : Michael Storgaard : https://github.com/mstorgaard

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'da-dk', {
delimiters: {
thousands: '.',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'mio',
billion: 'mia',
trillion: 'b'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'DKK'
}
});
}));
32 changes: 32 additions & 0 deletions locales/de-ch.js
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : German in Switzerland (de-ch)
// author : Michael Piefel : https://github.com/piefel (based on work from Marco Krage : https://github.com/sinky)

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'de-ch', {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: 'CHF'
}
});
}));
32 changes: 32 additions & 0 deletions locales/de.js
@@ -0,0 +1,32 @@
// numeral.js locale configuration
// locale : German (de) – generally useful in Germany, Austria, Luxembourg, Belgium
// author : Marco Krage : https://github.com/sinky

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'de', {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
return '.';
},
currency: {
symbol: '€'
}
});
}));
36 changes: 36 additions & 0 deletions locales/en-au.js
@@ -0,0 +1,36 @@
// numeral.js locale configuration
// locale : English Australia
// author : Don Vince : https://github.com/donvince/

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'en-au', {
delimiters: {
thousands: ',',
decimal: '.'
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
},
currency: {
symbol: '$'
}
});
}));
36 changes: 36 additions & 0 deletions locales/en-gb.js
@@ -0,0 +1,36 @@
// numeral.js locale configuration
// locale : english united kingdom (uk)
// author : Dan Ristic : https://github.com/dristic

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'en-gb', {
delimiters: {
thousands: ',',
decimal: '.'
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
},
currency: {
symbol: '£'
}
});
}));
36 changes: 36 additions & 0 deletions locales/en-za.js
@@ -0,0 +1,36 @@
// numeral.js locale configuration
// locale : english south africa (uk)
// author : Etienne Boshoff : etienne@zailab.com

(function (global, factory) {
if (typeof define === 'function' && define.amd) {
define(['../numeral'], factory);
} else if (typeof module === 'object' && module.exports) {
factory(require('../numeral'));
} else {
factory(global.numeral);
}
}(this, function (numeral) {
numeral.register('locale', 'en-za', {
delimiters: {
thousands: ' ',
decimal: ','
},
abbreviations: {
thousand: 'k',
million: 'm',
billion: 'b',
trillion: 't'
},
ordinal: function (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
},
currency: {
symbol: 'R'
}
});
}));

0 comments on commit 0e500ee

Please sign in to comment.