Skip to content

Commit

Permalink
chore(all): prepare release 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
EisenbergEffect committed Aug 22, 2016
1 parent c8102c8 commit 2ab9e48
Show file tree
Hide file tree
Showing 22 changed files with 638 additions and 76 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.0.0",
"version": "1.1.0",
"description": "A plugin that provides i18n support.",
"keywords": [
"aurelia",
Expand Down
36 changes: 34 additions & 2 deletions dist/amd/df.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
define(['exports', 'aurelia-logging', './i18n'], function (exports, _aureliaLogging, _i18n) {
define(['exports', 'aurelia-logging', './i18n', 'aurelia-templating-resources', 'aurelia-binding'], function (exports, _aureliaLogging, _i18n, _aureliaTemplatingResources, _aureliaBinding) {
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.DfValueConverter = undefined;
exports.DfBindingBehavior = exports.DfValueConverter = undefined;

var LogManager = _interopRequireWildcard(_aureliaLogging);

Expand Down Expand Up @@ -57,4 +57,36 @@ define(['exports', 'aurelia-logging', './i18n'], function (exports, _aureliaLogg

return DfValueConverter;
}();

var DfBindingBehavior = exports.DfBindingBehavior = function () {
DfBindingBehavior.inject = function inject() {
return [_aureliaTemplatingResources.SignalBindingBehavior];
};

function DfBindingBehavior(signalBindingBehavior) {


this.signalBindingBehavior = signalBindingBehavior;
}

DfBindingBehavior.prototype.bind = function bind(binding, source) {
this.signalBindingBehavior.bind(binding, source, 'aurelia-translation-signal');

var sourceExpression = binding.sourceExpression;

if (sourceExpression.rewritten) {
return;
}
sourceExpression.rewritten = true;

var expression = sourceExpression.expression;
sourceExpression.expression = new _aureliaBinding.ValueConverter(expression, 'df', sourceExpression.args, [expression].concat(sourceExpression.args));
};

DfBindingBehavior.prototype.unbind = function unbind(binding, source) {
this.signalBindingBehavior.unbind(binding, source);
};

return DfBindingBehavior;
}();
});
15 changes: 11 additions & 4 deletions dist/amd/i18n.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
define(['exports', 'i18next', 'aurelia-pal'], function (exports, _i18next, _aureliaPal) {
define(['exports', 'i18next', 'aurelia-pal', 'aurelia-event-aggregator', 'aurelia-templating-resources'], function (exports, _i18next, _aureliaPal, _aureliaEventAggregator, _aureliaTemplatingResources) {
'use strict';

Object.defineProperty(exports, "__esModule", {
Expand All @@ -16,7 +16,9 @@ define(['exports', 'i18next', 'aurelia-pal'], function (exports, _i18next, _aure



var I18N = exports.I18N = function () {
var _class, _temp;

var I18N = exports.I18N = (_temp = _class = function () {
function I18N(ea, signaler) {
var _this = this;

Expand Down Expand Up @@ -243,12 +245,17 @@ define(['exports', 'i18next', 'aurelia-pal'], function (exports, _i18next, _aure
node.innerHTML = this.tr(key, params);
break;
default:
node.setAttribute(attr, this.tr(key, params));
if (node.au && node.au.controller.viewModel && node.au.controller.viewModel[attr]) {
node.au.controller.viewModel[attr] = this.tr(key, params);
} else {
node.setAttribute(attr, this.tr(key, params));
}

break;
}
}
};

return I18N;
}();
}(), _class.inject = [_aureliaEventAggregator.EventAggregator, _aureliaTemplatingResources.BindingSignaler], _temp);
});
36 changes: 34 additions & 2 deletions dist/amd/nf.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
define(['exports', 'aurelia-logging', './i18n'], function (exports, _aureliaLogging, _i18n) {
define(['exports', 'aurelia-logging', './i18n', 'aurelia-templating-resources', 'aurelia-binding'], function (exports, _aureliaLogging, _i18n, _aureliaTemplatingResources, _aureliaBinding) {
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});
exports.NfValueConverter = undefined;
exports.NfBindingBehavior = exports.NfValueConverter = undefined;

var LogManager = _interopRequireWildcard(_aureliaLogging);

Expand Down Expand Up @@ -57,4 +57,36 @@ define(['exports', 'aurelia-logging', './i18n'], function (exports, _aureliaLogg

return NfValueConverter;
}();

var NfBindingBehavior = exports.NfBindingBehavior = function () {
NfBindingBehavior.inject = function inject() {
return [_aureliaTemplatingResources.SignalBindingBehavior];
};

function NfBindingBehavior(signalBindingBehavior) {


this.signalBindingBehavior = signalBindingBehavior;
}

NfBindingBehavior.prototype.bind = function bind(binding, source) {
this.signalBindingBehavior.bind(binding, source, 'aurelia-translation-signal');

var sourceExpression = binding.sourceExpression;

if (sourceExpression.rewritten) {
return;
}
sourceExpression.rewritten = true;

var expression = sourceExpression.expression;
sourceExpression.expression = new _aureliaBinding.ValueConverter(expression, 'nf', sourceExpression.args, [expression].concat(sourceExpression.args));
};

NfBindingBehavior.prototype.unbind = function unbind(binding, source) {
this.signalBindingBehavior.unbind(binding, source);
};

return NfBindingBehavior;
}();
});
44 changes: 30 additions & 14 deletions dist/aurelia-i18n.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import {
EventAggregator
} from 'aurelia-event-aggregator';
import {
customAttribute
} from 'aurelia-templating';
import {
BindingSignaler,
SignalBindingBehavior
} from 'aurelia-templating-resources';
import {
ValueConverter
} from 'aurelia-binding';
import {
customAttribute
} from 'aurelia-templating';

/*eslint no-irregular-whitespace: 0*/
export declare const translations: any;
Expand All @@ -31,20 +32,23 @@ export declare class LazyOptional {

/*eslint no-cond-assign: 0*/
export declare class I18N {
static inject: any;
globalVars: any;
params: any;
i18nextDefered: any;
i18next: any;
ea: EventAggregator;
constructor(ea?: any, signaler?: any);
setup(options?: any): any;
i18nextReady(): any;
setLocale(locale?: any): any;
getLocale(): any;
nf(options?: any, locales?: any): any;
uf(number?: any, locale?: any): any;
df(options?: any, locales?: any): any;
tr(key?: any, options?: any): any;
registerGlobalVariable(key?: any, value?: any): any;
unregisterGlobalVariable(key?: any): any;
setup(options?: any): Promise<i18next.I18n>;
i18nextReady(): Promise<i18next.I18n>;
setLocale(locale?: any): Promise<any>;
getLocale(): string;
nf(options?: any, locales?: any): string;
uf(number?: any, locale?: any): number;
df(options?: any, locales?: any): string;
tr(key?: any, options?: any): string;
registerGlobalVariable(key?: any, value?: any): void;
unregisterGlobalVariable(key?: any): void;

/**
* Scans an element for children that have a translation attribute and
Expand All @@ -54,7 +58,7 @@ export declare class I18N {
*
* @param el HTMLElement to search within
*/
updateTranslations(el?: any): any;
updateTranslations(el?: any): void;
updateValue(node?: any, value?: any, params?: any): any;
}
export declare class BaseI18N {
Expand All @@ -68,11 +72,23 @@ export declare class DfValueConverter {
constructor(i18n?: any);
toView(value?: any, dfOrOptions?: any, locale?: any, df?: any): any;
}
export declare class DfBindingBehavior {
static inject(): any;
constructor(signalBindingBehavior?: any);
bind(binding?: any, source?: any): any;
unbind(binding?: any, source?: any): any;
}
export declare class NfValueConverter {
static inject(): any;
constructor(i18n?: any);
toView(value?: any, nfOrOptions?: any, locale?: any, nf?: any): any;
}
export declare class NfBindingBehavior {
static inject(): any;
constructor(signalBindingBehavior?: any);
bind(binding?: any, source?: any): any;
unbind(binding?: any, source?: any): any;
}
export declare class RelativeTime {
static inject(): any;
constructor(i18n?: any, ea?: any);
Expand Down
Loading

0 comments on commit 2ab9e48

Please sign in to comment.