Closed tadatuta closed 8 years ago
the same problem is in the dropdown block etc. What should we do? @veged @mishanga
we does not merge https://github.com/bem/bem-core/pull/514 yet — how it can work?
@veged the question is not about this particular block or i18n engine but about the way we write our templates. we test fields of bemjson to be isSimple
to replace them with some block which content is source string in quite a few blocks already.
if we consider such approach is fine @sipayRT will rewrite them in BH and we will use same idea in new blocks but I think that as soon as we start using any i18n system it become a problem. so I just want to discuss it before we must support backward compatibility.
ouch!... yep, we need to think about it...-- Сергей Бережной
On Mon, May 5, 2014 at 9:34 PM, Vladimir Grinenko notifications@github.com wrote:
@veged the question is not about this particular block or i18n engine but about the way we write our templates. we test fields of bemjson to be
isSimple
to replace them with some block which content is source string in quite a few blocks already.if we consider such approach is fine @sipayRT will rewrite them in BH and we will use same idea in new blocks but I think that as soon as we start using any i18n system it become a problem. so I just want to discuss it before we must support backward compatibility.
Reply to this email directly or view it on GitHub: https://github.com/bem/bem-components/issues/448#issuecomment-42214273
@tadatuta could you plz provide more examples of such blocks which provide strings (as i-bem__i18n
do)?
@dfilatov @narqo
the best what we invent is do something like this:
this.isSimple(button) || button.block === 'i18n' && (button = {
block : 'button',
tag : 'span',
text : button
});
but since that issue doesn't hurt anyone much I suggest to wait for better approaches
irrelevant since there's no support for i18n in BEMJSON in bem-core
For example
In
attach.bemhtml
there iswhich won't work when
i18n
is used in bemjson: