bem / bem-core

BEM Core Library
https://ru.bem.info/technologies/classic/i-bem/
Other
276 stars 95 forks source link

i18n: tech for ENB #950

Open aristov opened 9 years ago

aristov commented 9 years ago

We need to implement ENB techs as described in #576 and in branch issues/576@v3

aristov commented 9 years ago

cc @veged @narqo @dfilatov

aristov commented 9 years ago

@blond ping

blond commented 9 years ago

WIP — https://github.com/blond/enb-bem-core-i18n

veged commented 9 years ago

@blond do you have any time estimates?

blond commented 9 years ago

@veged one week

narqo commented 9 years ago

@blond is there anything to look at?

aristov commented 9 years ago

@narqo the ball is on my side: I promised to look and try enb-bem-core-i18n, but just start to do this. I'll be glad to receive any help if possible.

blond commented 9 years ago

@aristov, Now we are making these changes to the enb-bem-i18n package in 1.x branch.

aristov commented 9 years ago

I've created enb-bem-i18n-test branch with simple config and special i18n testing bundle. Everything works fine, but I'm not sure, that I build ?.{lang}.js files properly. @blond, could you check if I do things right, please?

blond commented 9 years ago

@aristov, it looks good.

Some comments:

Instead of ./techs/i18n-bemjson-to-html tech need use enb-bemxjst/techs/bemjson-to-html.

For merge client JavaScript files with i18n need use option lang: '{lang}':

nodeConfig.addTech([require('enb/techs/file-merge'), {
    lang: '{lang}',
    sources : ['?.pre.js', '?.i18n.{lang}.js'],
    target : '?.pre.{lang}.js' 
}]);
aristov commented 9 years ago

If everything is done, we can release the new package version to use it in #1108.