feat(ivy): add AttributeMarker.I18n
for i18n attributes (#30402)
`i18nAttributes` instructions always occur after the element instruction. This means that we need to treat `i18n-` attributes differently. By defining a specific `AttributeMarker` we can ensure that we won't trigger directive inputs with untranslated attribute values. FW-1332 #resolve PR Close #30402
This commit is contained in:

committed by
Matias Niemelä

parent
91699259b2
commit
53c6b78c51
@ -491,5 +491,21 @@ export const enum AttributeMarker {
|
||||
* ['attr', 'value', AttributeMarker.ProjectAs, ['', 'title', '']]
|
||||
* ```
|
||||
*/
|
||||
ProjectAs = 5
|
||||
ProjectAs = 5,
|
||||
|
||||
/**
|
||||
* Signals that the following attribute will be translated by runtime i18n
|
||||
*
|
||||
* For example, given the following HTML:
|
||||
*
|
||||
* ```
|
||||
* <div moo="car" foo="value" i18n-foo [bar]="binding" i18n-bar>
|
||||
* ```
|
||||
*
|
||||
* the generated code is:
|
||||
*
|
||||
* ```
|
||||
* var _c1 = ['moo', 'car', AttributeMarker.I18n, 'foo', 'bar'];
|
||||
*/
|
||||
I18n = 6,
|
||||
}
|
||||
|
Reference in New Issue
Block a user