Skip to content

Commit

Permalink
added Hungarian language
Browse files Browse the repository at this point in the history
  • Loading branch information
sz committed Sep 11, 2016
1 parent 07204db commit a5db270
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
18 changes: 18 additions & 0 deletions locales/hu.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = function(number, index) {
return [
['éppen most', 'éppen most'],
['%s másodperce', '%s másodpercen belül'],
['1 perce', '1 percen belül'],
['%s perce', '%s percen belül'],
['1 órája', '1 órán belül'],
['%s órája', '%s órán belül'],
['1 napja', '1 napon belül'],
['%s napja', '%s napon belül'],
['1 hete', '1 héten belül'],
['%s hete', '%s héten belül'],
['1 hónapja', '1 hónapon belül'],
['%s hónapja', '%s hónapon belül'],
['1 éve', '1 éven belül'],
['%s éve', '%s éven belül']
][index];
}
8 changes: 4 additions & 4 deletions tests/locales_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ var fs = require('fs');
var test = require('tape');
var timeago = require('..');

var tobeTested = ['en', 'zh_CN', 'fr', 'nl_BE', 'pt_BR', 'da', 'in_ID', 'es', 'pl', 'zh_TW', 'sv']; // when add a new locale, add locale's name here
var tobeTested = ['en', 'zh_CN', 'fr', 'nl_BE', 'pt_BR', 'da', 'in_ID', 'es', 'pl', 'zh_TW', 'sv', 'hu']; // when add a new locale, add locale's name here

test('Testing locales', function (t) {
for (var i = 0; i < tobeTested.length ; i++) {
var locale_name = tobeTested[i];

console.log('\nTesting locales [' + locale_name + ']');

var locale = require('../locales/' + locale_name);
Expand All @@ -33,5 +33,5 @@ test('Testing locales', function (t) {

t.end();
});


0 comments on commit a5db270

Please sign in to comment.