Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Release 0.0.4

  • Loading branch information...
commit 33602c1c81c3d688a6f5bc160e1d821f974d3508 1 parent 0587582
@tj authored
View
6 History.md
@@ -1,4 +1,10 @@
+0.0.4 / 2010-11-27
+==================
+
+ * Added `Language#name` [Pau Ramon]
+ * Added Spanish inflector (needs more testing) [Pau Ramon]
+
0.0.3 / 2010-10-25
==================
View
6 lib/language.js
@@ -12,14 +12,16 @@
var lingo = require('./lingo');
/**
- * Initialize a new `Language` with the given `code`.
+ * Initialize a new `Language` with the given `code` and `name`.
*
* @param {String} code
+ * @param {String} name
* @api public
*/
-var Language = module.exports = function Language(code) {
+var Language = module.exports = function Language(code, name) {
this.code = code;
+ this.name = name;
this.translations = {};
this.rules = {
plural: []
View
4 lib/languages/en.js
@@ -15,9 +15,7 @@ var Language = require('../language');
* English.
*/
-var en = module.exports = new Language('en');
-
-en.name = 'English';
+var en = module.exports = new Language('en', 'English');
/**
* Number pluraluzation rule
View
4 lib/languages/es.js
@@ -15,9 +15,7 @@ var Language = require('../language');
* English.
*/
-var es = module.exports = new Language('es');
-
-es.name = 'Español';
+var es = module.exports = new Language('es', 'Español');
/**
* Number pluraluzation rule
View
2  lib/lingo.js
@@ -17,7 +17,7 @@ var fs = require('fs');
* @type String
*/
-exports.version = '0.0.3';
+exports.version = '0.0.4';
/**
* Expose `Language`.
View
2  package.json
@@ -1,6 +1,6 @@
{ "name": "lingo"
, "description": "linguistics module sporting inflection and more"
- , "version": "0.0.3"
+ , "version": "0.0.4"
, "author": "TJ Holowaychuk <tj@vision-media.ca>"
, "keywords": ["language", "linguistics", "inflection"]
, "main": "./index.js"
View
4 test/inflection.en.test.js
@@ -7,6 +7,10 @@ var lingo = require('./..')
, en = lingo.en;
module.exports = {
+ 'test .name': function(assert){
+ assert.equal('English', en.name);
+ },
+
'test .isUncountable()': function(assert){
assert.equal(true, en.isUncountable('moose'));
assert.equal(false, en.isUncountable('person'));
Please sign in to comment.
Something went wrong with that request. Please try again.