私は、国際化に関連するすべてのファイルを変更した:JHipster 4.x.xで国際化を実装する方法は?
src/main/resources/i18n/messages_en.properties
src/main/webapp/i18n/en/produto.json
(私の新しいエンティティ)すでにのjhiTranslate
なしがありませんでしたspan
タグへ
translate
属性これらの変更により翻訳が適用されました。私はすでにアプリケーションを再実行し、8080ポートでプロセスを終了し、さらにコンピュータを再起動しました。produto.component.html
で :messages_en.properties
で
<th jhiSortBy="nome"><span jhiTranslate="myApp.produto.nome" translate="myApp.produto.nome">Nome</span> <span class="fa fa-sort"></span></th>
:のようなこれらのファイルで行った変更は、なかったかのようにtarget
フォルダ内に生成されたファイルはすべて、ネイティブ言語を使用している
### ENTITIES
## PRODUCT
myApp.produto.nome=Name
myApp.produto.descricao=Description
myApp.produto.preco=Price
myApp.produto.dataVencimento=Due Date
produto.json
:
{
"myApp": {
"produto" : {
"home": {
"title": "Products",
"createLabel": "Create a new Product",
"createOrEditLabel": "Create or edit a Product"
},
"created": "A new Product is created with identifier {{ param }}",
"updated": "A Product is updated with identifier {{ param }}",
"deleted": "A Product is deleted with identifier {{ param }}",
"delete": {
"question": "Are you sure you want to delete Product {{ id }}?"
},
"detail": {
"title": "Product"
},
"nome": "Name",
"descricao": "Description",
"preco": "Price",
"dataVencimento": "Due Date"
}
}
}
jHipsterによって生成されたデフォルトのテキストのみが翻訳されます。
解決方法はありますか?