From 33d088924440de897535227942fab73f1da224bd Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Fri, 29 Mar 2024 10:25:25 -0300 Subject: [PATCH] convert entities to new translate api --- .../angular/support/translate-angular.ts | 2 +- ...tityFile_-delete-dialog.component.html.ejs | 6 +-- .../_entityFile_-detail.component.html.ejs | 14 +++---- .../list/_entityFile_.component.html.ejs | 28 ++++++------- .../_entityFile_-update.component.html.ejs | 41 ++++++++----------- generators/languages/entity-files.js | 5 ++- 6 files changed, 45 insertions(+), 51 deletions(-) diff --git a/generators/angular/support/translate-angular.ts b/generators/angular/support/translate-angular.ts index 60cfffd0a9b0..6ab51b6792fc 100644 --- a/generators/angular/support/translate-angular.ts +++ b/generators/angular/support/translate-angular.ts @@ -249,7 +249,7 @@ const pipeEnumTranslation = ( } const { value, fallback } = parsedInterpolate; if (enableTranslation) { - return `${prefix}{{ \`${key}.\${value}\` | translate }}${suffix}`; + return `${prefix}{{ '${key}.' + ${value} | translate }}${suffix}`; } const translatedValue = `{{ ${JSON.stringify(getTranslationValue(getWebappTranslation, key))}[${value}]${fallback ? ` ?? ${fallback}` : ''} }}`; diff --git a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/delete/_entityFile_-delete-dialog.component.html.ejs b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/delete/_entityFile_-delete-dialog.component.html.ejs index 449deea10583..4f547b4d9cad 100644 --- a/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/delete/_entityFile_-delete-dialog.component.html.ejs +++ b/generators/angular/templates/src/main/webapp/app/entities/_entityFolder_/delete/_entityFile_-delete-dialog.component.html.ejs @@ -19,7 +19,7 @@ @if (<%= entityInstance %>) {