Skip to content

Commit

Permalink
Release 0.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
spikebrehm committed Jun 26, 2015
1 parent 76bc3a4 commit eec8d15
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 32 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ polyglot.t("i_like_to_write_in_language", {

## History

### v0.4.3: June 26, 2015
* Add `.has(key)` method (thanks @scarfacedeb).
* Add UMD wrapper for AMD support (thanks @TomOne).

### v0.4.2: March 13, 2015
* Allow blank translations.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "polyglot",
"description": "Give your JavaScript the ability to speak many languages.",
"version": "0.4.2",
"version": "0.4.3",
"keywords": [
"i18n",
"internationalization",
Expand Down
34 changes: 23 additions & 11 deletions build/polyglot.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@
// your client- or server-side JavaScript application.
//

!function(root) {

(function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([], function() {
return factory(root);
});
} else if (typeof exports === 'object') {
module.exports = factory(root);
} else {
root.Polyglot = factory(root);
}
}(this, function(root) {
'use strict';

// ### Polyglot class constructor
Expand All @@ -29,7 +40,7 @@
}

// ### Version
Polyglot.VERSION = '0.4.2';
Polyglot.VERSION = '0.4.3';

// ### polyglot.locale([locale])
//
Expand Down Expand Up @@ -175,6 +186,14 @@
};


// ### polyglot.has(key)
//
// Check if polyglot has a translation for given key
Polyglot.prototype.has = function(key) {
return key in this.phrases;
};


// #### Pluralization methods
// The string that separates the different phrase possibilities.
var delimeter = '||||';
Expand Down Expand Up @@ -278,12 +297,5 @@
return ret;
}


// Export for Node, attach to `window` for browser.
if (typeof module !== 'undefined' && module.exports) {
module.exports = Polyglot;
} else {
root.Polyglot = Polyglot;
}

}(this);
return Polyglot;
}));
2 changes: 1 addition & 1 deletion build/polyglot.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed build/polyglot.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "polyglot",
"repo": "airbnb/polyglot.js",
"description": "Give your JavaScript the ability to speak many languages.",
"version": "0.4.2",
"version": "0.4.3",
"keywords": [
"i18n",
"internationalization",
Expand Down
Loading

0 comments on commit eec8d15

Please sign in to comment.