Skip to content

Commit

Permalink
chore(all): prepare release 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Nov 8, 2016
1 parent 1d5f312 commit 9a0c68e
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "1.2.0",
"version": "1.2.1",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down
6 changes: 5 additions & 1 deletion dist/amd/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ define(['exports', 'i18next', 'aurelia-pal', 'aurelia-event-aggregator', 'aureli
while (i--) {
var key = keys[i];

var re = /\[([a-z\-]*)\]/g;
var re = /\[([a-z\-]*)\]/ig;

var m = void 0;
var attr = 'text';
Expand All @@ -182,6 +182,10 @@ define(['exports', 'i18next', 'aurelia-pal', 'aurelia-event-aggregator', 'aureli
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

attr = attr.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});

switch (attr) {
case 'text':
var newChild = _aureliaPal.DOM.createTextNode(this.tr(key, params));
Expand Down
5 changes: 4 additions & 1 deletion dist/aurelia-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ export class I18N {
while (i--) {
let key = keys[i];
// remove the optional attribute
let re = /\[([a-z\-]*)\]/g;
let re = /\[([a-z\-]*)\]/ig;

let m;
let attr = 'text';
Expand All @@ -643,6 +643,9 @@ export class I18N {
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

// convert to camelCase
attr = attr.replace(/-([a-z])/g, function(g) { return g[1].toUpperCase(); });

//handle various attributes
//anything other than text,prepend,append or html will be added as an attribute on the element.
switch (attr) {
Expand Down
6 changes: 5 additions & 1 deletion dist/commonjs/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ var I18N = exports.I18N = (_temp = _class = function () {
while (i--) {
var key = keys[i];

var re = /\[([a-z\-]*)\]/g;
var re = /\[([a-z\-]*)\]/ig;

var m = void 0;
var attr = 'text';
Expand All @@ -185,6 +185,10 @@ var I18N = exports.I18N = (_temp = _class = function () {
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

attr = attr.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});

switch (attr) {
case 'text':
var newChild = _aureliaPal.DOM.createTextNode(this.tr(key, params));
Expand Down
6 changes: 5 additions & 1 deletion dist/es2015/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export let I18N = (_temp = _class = class I18N {
while (i--) {
let key = keys[i];

let re = /\[([a-z\-]*)\]/g;
let re = /\[([a-z\-]*)\]/ig;

let m;
let attr = 'text';
Expand All @@ -159,6 +159,10 @@ export let I18N = (_temp = _class = class I18N {
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

attr = attr.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});

switch (attr) {
case 'text':
let newChild = DOM.createTextNode(this.tr(key, params));
Expand Down
6 changes: 5 additions & 1 deletion dist/native-modules/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export var I18N = (_temp = _class = function () {
while (i--) {
var key = keys[i];

var re = /\[([a-z\-]*)\]/g;
var re = /\[([a-z\-]*)\]/ig;

var m = void 0;
var attr = 'text';
Expand All @@ -171,6 +171,10 @@ export var I18N = (_temp = _class = function () {
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

attr = attr.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});

switch (attr) {
case 'text':
var newChild = DOM.createTextNode(this.tr(key, params));
Expand Down
6 changes: 5 additions & 1 deletion dist/system/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ System.register(['i18next', 'aurelia-pal', 'aurelia-event-aggregator', 'aurelia-
while (i--) {
var key = keys[i];

var re = /\[([a-z\-]*)\]/g;
var re = /\[([a-z\-]*)\]/ig;

var m = void 0;
var attr = 'text';
Expand All @@ -182,6 +182,10 @@ System.register(['i18next', 'aurelia-pal', 'aurelia-event-aggregator', 'aurelia-
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

attr = attr.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});

switch (attr) {
case 'text':
var newChild = DOM.createTextNode(this.tr(key, params));
Expand Down
6 changes: 5 additions & 1 deletion dist/temp/aurelia-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ var I18N = exports.I18N = (_temp = _class2 = function () {
while (i--) {
var key = keys[i];

var re = /\[([a-z\-]*)\]/g;
var re = /\[([a-z\-]*)\]/ig;

var m = void 0;
var attr = 'text';
Expand All @@ -660,6 +660,10 @@ var I18N = exports.I18N = (_temp = _class2 = function () {
if (!node._textContent) node._textContent = node.textContent;
if (!node._innerHTML) node._innerHTML = node.innerHTML;

attr = attr.replace(/-([a-z])/g, function (g) {
return g[1].toUpperCase();
});

switch (attr) {
case 'text':
var newChild = _aureliaPal.DOM.createTextNode(this.tr(key, params));
Expand Down
11 changes: 11 additions & 0 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<a name="1.2.1"></a>
## [1.2.1](https://github.com/aurelia/i18n/compare/1.2.0...v1.2.1) (2016-11-08)


### Bug Fixes

* **attribute:** fix support for dashed bindables ([e70372c](https://github.com/aurelia/i18n/commit/e70372c))
* **debug:** remove debugger statement ([1d5f312](https://github.com/aurelia/i18n/commit/1d5f312))



<a name="1.2.0"></a>
# [1.2.0](https://github.com/aurelia/i18n/compare/1.1.2...v1.2.0) (2016-10-21)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-i18n",
"version": "1.2.0",
"version": "1.2.1",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down

0 comments on commit 9a0c68e

Please sign in to comment.