Javascript 角度i18n定位不使用管道平移插值
我正在尝试翻译一个HTML元素Javascript 角度i18n定位不使用管道平移插值,javascript,angular,typescript,internationalization,Javascript,Angular,Typescript,Internationalization,我正在尝试翻译一个HTML元素 <button i18n="Bouton Fermer majuscule@@infos-dataset-4" mat-button class="mat-raised-button mat-primary button-bottom button-cancel" (click)="close()"> {{ 'Fermer' | uppercase }} </button&g
<button i18n="Bouton Fermer majuscule@@infos-dataset-4" mat-button
class="mat-raised-button mat-primary button-bottom button-cancel" (click)="close()">
{{ 'Fermer' | uppercase }}
</button>
{{'Fermer'|大写}}
我得到这个翻译输出
<trans-unit id="infos-dataset-4" datatype="html">
<source> <x id="INTERPOLATION" equiv-text=" {{ 'Fermer' | uppercas"/> </source> <context-group purpose="location">
<context context-type="sourcefile">src/app/business/history-modal/history-modal.component.html</context>
<context context-type="linenumber">81,83</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/business/import-details/infos-dataset/infos-dataset.component.html</context>
<context context-type="linenumber">88,90</context>
</context-group>
<note priority="1" from="description">Bouton Fermer majuscule</note>
</trans-unit>
src/app/business/history modal/history-modal.component.html
81,83
src/app/business/import-details/infos-dataset.component.html
88,90
布顿费尔默大酒店
然后我在我的.en文件中翻译它
<trans-unit id="infos-dataset-4" datatype="html">
<source> <x id="INTERPOLATION" equiv-text=" {{ 'Fermer' | uppercas"/> </source>
<target> <x id="INTERPOLATION" equiv-text=" {{ 'Close' | uppercas"/> </target>
<context-group purpose="location">
<context context-type="sourcefile">src/app/business/history-modal/history-modal.component.html</context>
<context context-type="linenumber">81,83</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/app/business/import-details/infos-dataset/infos-dataset.component.html</context>
<context context-type="linenumber">86,88</context>
</context-group>
<note priority="1" from="description">Bouton Fermer majuscule</note>
</trans-unit>
src/app/business/history modal/history-modal.component.html
81,83
src/app/business/import-details/infos-dataset.component.html
86,88
布顿费尔默大酒店
我没有在我的组件中应用翻译(配置设置为“en”的ng serve)
知道为什么吗?我觉得trans输出错误。你用的是什么版本的Angular?在这方面,我看到了一些错误: