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

mock of i18n is too strict #108

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

mock of i18n is too strict #108

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

Comments

@blond
Copy link
Member

blond commented Sep 17, 2015

When you build with mock of i18n (langs: true) all blocks should be dependent on i18n (block i18n or elem i-bem__i18n).

If block has no dependency on i18n then assembly fails.

Error: Core of i18n is not found!
    at Object.parse (/Users/blond/projects/bem-core/node_modules/enb-bem-i18n/lib/keysets.js:70:15)
    at null.<anonymous> (/Users/blond/projects/bem-core/node_modules/enb-bem-i18n/techs/i18n.js:66:38)
    at Array.<anonymous> (/Users/blond/projects/bem-core/node_modules/enb/node_modules/vow/lib/vow.js:202:39)
    at Immediate.callFns [as _onImmediate] (/Users/blond/projects/bem-core/node_modules/enb/node_modules/vow/lib/vow.js:462:35)
    at processImmediate [as _immediateCallback] (timers.js:367:17)

It is not convenient if your project has only some i18n blocks.

@blond blond added the bug label Sep 17, 2015
@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
@ailsky
Copy link

ailsky commented Oct 9, 2015

И как же теперь быть?
https://github.com/bem/bem-core/tree/v2.8.0 - развернул, поставил языки [ru, en], аквтивировал в опциях i18n.
Ловлю эту ошибку - "Core of i18n is not found!", пробовал использовать пример из - https://github.com/bem/bem-bl/tree/dev, подсмотрел тут реализацию bemdecl, сделал также - не помогло.
Пользовался enb-bh.
Использовал enb-bh-i18n 1.0.0-beta2, всё равно данная ошибка.

Задача использовать ланг файлы в bh шаблонах блоков для перевода интерфейса. Как можно разобраться с данной ошибкой, если не всем блокам нужен перевод?

@ailsky ailsky mentioned this issue Oct 9, 2015
@tadatuta
Copy link
Member

tadatuta commented Oct 9, 2015

У блоков, которым нужны переводы, должна быть зависимость от блока i18n:

({ mustDeps: 'i18n' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants