rollup-plugin-po2json - some gt() calls are not properly parsed inside Vue <template> when using text interpolation
When calling gt()
inside <template>
, specifically when using text interpolation {{ ... }}
or attribute bindings some gt()
calls are not properly parsed and collected.
For text interpolation, the moment the for="..."
attribute is used, the first gt()
call inside that HTML element is not considered. All calls after that are properly collected.
For more specific examples please refer to the code snippet below. all gt('I am collected!')
should be properly collected, all gt('I am not collected')
are not.
<template>
<div for="bar">
{{ gt('I am not collected') }}
{{ gt('I am collected') }}
</div>
<label for="foo">
{{ gt('I am not collected') }}
{{ gt('I am collected') }}
</label>
<div>
{{ gt('I am collected') }}
</div>
<label>
{{ gt('I am collected') }}
</label>
<TestComponent :text="gt('I am not collected')"><TestComponent>
</template>
To revert
After this has been fixed, please revert following commits in Web Apps UI repo
3868872710d81fde90b248757e6cab2de1452724
Edited by tran-dong.tran