Skip to content

Commit

Permalink
Get rid of BEM.I18N (close #129)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishanga committed Mar 16, 2015
1 parent 019d45c commit 0ad1ce8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions lib/bh.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ function BH() {
/**
* Неймспейс для библиотек. Сюда можно писать различный функционал для дальнейшего использования в шаблонах.
* ```javascript
* bh.lib.i18n = BEM.I18N;
* bh.lib.objects = bh.lib.objects || {};
* bh.lib.objects.inverse = bh.lib.objects.inverse || function(obj) { ... };
* ```
* @type {Object}
*/
this.lib = {};
this._inited = false;
/**
* Опции BH. Задаются через setOptions.
* @type {Object}
Expand Down Expand Up @@ -768,9 +768,6 @@ BH.prototype = {
*/
processBemJson: function(bemJson, blockName, ignoreContent) {
if (bemJson == null) return;
if (!this._inited) {
this._init();
}
var resultArr = [bemJson];
var nodes = [{
json: bemJson,
Expand Down Expand Up @@ -1001,19 +998,6 @@ BH.prototype = {
}
return res;
}
},

/**
* Инициализация BH.
*/
_init: function() {
this._inited = true;
/*
Копируем ссылку на BEM.I18N в bh.lib.i18n, если это возможно.
*/
if (typeof BEM !== 'undefined' && typeof BEM.I18N !== 'undefined') {
this.lib.i18n = this.lib.i18n || BEM.I18N;
}
}
};

Expand Down

0 comments on commit 0ad1ce8

Please sign in to comment.