Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mockI18N option #110

Closed
blond opened this issue Sep 17, 2015 · 0 comments
Closed

mockI18N option #110

blond opened this issue Sep 17, 2015 · 0 comments
Assignees
Milestone

Comments

@blond
Copy link
Member

blond commented Sep 17, 2015

After unification of i18n mock for different core (block i18n or i-bem__i18n) will have to rewrite the HTML-references in your project.

To upgrade to the new version of this package was easier need add the ability to override the mock of i18n.

mockI18N: function(global, bem_) {
    global.BEM = bem_;

    var i18n = bem_.I18N = function(keyset, key, param) {
        var result = key;
        if(param){
            result += ": " + JSON.stringify(param);
        }
        return result;
    };

    i18n.keyset = function() { return i18n; };
    i18n.key = function(key) { return key; };
    i18n.lang = function() { return; };
}
@blond blond self-assigned this Sep 17, 2015
@blond blond added this to the 0.15 milestone Sep 17, 2015
@blond blond added the review label Sep 17, 2015
@blond blond removed the review label Sep 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant