i18n-dialect
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,3 +5,3 @@ "use strict"; | ||
exports.TranslationController = controller_1.TranslationController; | ||
exports._t = function (ctrl) { return function (str, substitutions) { | ||
exports._tGen = function (ctrl) { return function (str, substitutions) { | ||
if (substitutions === void 0) { substitutions = []; } | ||
@@ -15,3 +15,3 @@ return ctrl.getString({ | ||
}; }; | ||
exports._pt = function (ctrl) { return function (context, str, substitutions) { | ||
exports._ptGen = function (ctrl) { return function (context, str, substitutions) { | ||
if (substitutions === void 0) { substitutions = []; } | ||
@@ -26,3 +26,3 @@ return ctrl.getString({ | ||
}; }; | ||
exports._nt = function (ctrl) { return function (plurals, factor, substitutions) { | ||
exports._ntGen = function (ctrl) { return function (plurals, factor, substitutions) { | ||
if (substitutions === void 0) { substitutions = []; } | ||
@@ -38,3 +38,3 @@ return ctrl.getString({ | ||
}; }; | ||
exports._npt = function (ctrl) { return function (context, plurals, factor, substitutions) { | ||
exports._nptGen = function (ctrl) { return function (context, plurals, factor, substitutions) { | ||
if (substitutions === void 0) { substitutions = []; } | ||
@@ -54,6 +54,6 @@ return ctrl.getString({ | ||
this.ctrl = ctrl; | ||
this._t = exports._t(this.ctrl); | ||
this._pt = exports._pt(this.ctrl); | ||
this._nt = exports._nt(this.ctrl); | ||
this._npt = exports._npt(this.ctrl); | ||
this._t = exports._tGen(this.ctrl); | ||
this._pt = exports._ptGen(this.ctrl); | ||
this._nt = exports._ntGen(this.ctrl); | ||
this._npt = exports._nptGen(this.ctrl); | ||
} | ||
@@ -60,0 +60,0 @@ return TranslationProvider; |
16
index.ts
@@ -10,3 +10,3 @@ import { | ||
export const _t: (ctrl: TranslationController) => SimpleTranslation = | ||
export const _tGen: (ctrl: TranslationController) => SimpleTranslation = | ||
(ctrl) => (str, substitutions = []): string => { | ||
@@ -21,3 +21,3 @@ return ctrl.getString({ | ||
export const _pt: (ctrl: TranslationController) => ContextualTranslation = | ||
export const _ptGen: (ctrl: TranslationController) => ContextualTranslation = | ||
(ctrl) => (context, str, substitutions = []): string => { | ||
@@ -33,3 +33,3 @@ return ctrl.getString({ | ||
export const _nt: (ctrl: TranslationController) => PluralTranslation = | ||
export const _ntGen: (ctrl: TranslationController) => PluralTranslation = | ||
(ctrl) => (plurals, factor, substitutions = []): string => { | ||
@@ -46,3 +46,3 @@ return ctrl.getString({ | ||
export const _npt: (ctrl: TranslationController) => PluralContextualTranslation = | ||
export const _nptGen: (ctrl: TranslationController) => PluralContextualTranslation = | ||
(ctrl) => (context, plurals, factor, substitutions = []): string => { | ||
@@ -62,6 +62,6 @@ return ctrl.getString({ | ||
constructor(private ctrl: TranslationController) { } | ||
public _t: SimpleTranslation = _t(this.ctrl); | ||
public _pt: ContextualTranslation = _pt(this.ctrl); | ||
public _nt: PluralTranslation = _nt(this.ctrl); | ||
public _npt: PluralContextualTranslation = _npt(this.ctrl); | ||
public _t: SimpleTranslation = _tGen(this.ctrl); | ||
public _pt: ContextualTranslation = _ptGen(this.ctrl); | ||
public _nt: PluralTranslation = _ntGen(this.ctrl); | ||
public _npt: PluralContextualTranslation = _nptGen(this.ctrl); | ||
} |
{ | ||
"name": "i18n-dialect", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Internationalization support library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
183979
17
1
73