Cannot read properties of undefined (reading 'replace') when generate application which native language is not english.
docker container run --rm -u 501:20 -it -v "$PWD":/home/jhipster/app jhipster/jhipster:v8.7.0 jhipster
? What is the base name of your application? Visualization
? Which type of application would you like to create? Monolithic application (recommended for simple projects)
? What is your default Java package name? com.nanoinfo.tipoca.visualization
? Would you like to use Maven or Gradle for building the backend? Gradle
? Do you want to make it reactive with Spring WebFlux? Yes
? Which type of authentication would you like to use? JWT authentication (stateless, with a token)
? Besides JUnit, which testing frameworks would you like to use? Gatling
? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which production database would you like to use? MySQL
? Which development database would you like to use? H2 with disk-based persistence
? Which cache do you want to use? (Spring cache abstraction) Hazelcast (distributed cache, for multiple nodes, supports rate-limiting for gateway applications)
? Do you want to use Hibernate 2nd level cache? No
? Which other technologies would you like to use? API first development using OpenAPI-generator
? Do you want to enable Gradle Enterprise integration? No
? Which framework would you like to use for the client? Angular
? Besides Jest/Vitest, which testing frameworks would you like to use? Cypress
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? United
? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Primary
? Would you like to enable internationalization support? No
? Please choose the native language of the application Japanese
? Please choose additional languages to install
? Would you like to generate code coverage for Cypress tests? [Experimental] Yes
? Would you like to audit Cypress tests? Yes
info Could not remove legacy file .huskyrc
info Could not remove legacy file .lintstagedrc.js
info Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days
info for: CN=Java Hipster, OU=Development, O=com.nanoinfo.tipoca.visualization, L=, ST=, C=
info KeyStore '/home/jhipster/app/src/main/resources/config/tls/keystore.p12' generated successfully.
info Could not remove legacy file gradle/swagger.gradle
info Could not remove legacy file .eslintrc.json
info Could not remove legacy file .eslintignore
info Could not remove legacy file src/test/javascript/cypress/.eslintrc.json
✔ applying multi-step templates
✔ Git repository initialized.
WARNING! liquibaseVersion is required by gradle-liquibase-plugin, make sure to add it to your dependencies
create .prettierrc
create .prettierignore
✔ prettier configuration files committed to disk
✔ loading translations
✔ updating package.json dependencies versions
✔ prettifying sonar-project.properties
✔ adding package-info.java files
✔ translating angular application
ERROR! An error occured while running jhipster:angular#transformStream
ERROR! ERROR! Cannot read properties of undefined (reading 'replace')
TypeError: Cannot read properties of undefined (reading 'replace')
at escapeHtmlTranslationValue (file:///home/jhipster/generator-jhipster/dist/generators/languages/support/translate.js:20:72)
at tagTranslation (file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:100:29)
at createJhiTranslateReplacer.prefixPattern (file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:228:20)
at replaceTranslateContents (file:///home/jhipster/generator-jhipster/dist/generators/languages/support/translate.js:99:48)
at file:///home/jhipster/generator-jhipster/dist/generators/languages/support/translate.js:103:127
at replaceAngularTranslations (file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:244:44)
at file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:262:37
at Transform. (file:///home/jhipster/generator-jhipster/node_modules/@yeoman/transform/dist/transform.js:40:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Transform.transform [as _transform] (file:///home/jhipster/generator-jhipster/node_modules/@yeoman/transform/dist/transform.js:14:37)
Motivation for or Use Case
cannot create application which native language is not english
Reproduce the error
docker container run --rm -u 501:20 -it -v "$PWD":/home/jhipster/app jhipster/jhipster:v8.7.0 jhipster
? What is the base name of your application? Visualization
? Which type of application would you like to create? Monolithic application (recommended for simple projects)
? What is your default Java package name? com.nanoinfo.tipoca.visualization
? Would you like to use Maven or Gradle for building the backend? Gradle
? Do you want to make it reactive with Spring WebFlux? Yes
? Which type of authentication would you like to use? JWT authentication (stateless, with a token)
? Besides JUnit, which testing frameworks would you like to use? Gatling
? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which production database would you like to use? MySQL
? Which development database would you like to use? H2 with disk-based persistence
? Which cache do you want to use? (Spring cache abstraction) Hazelcast (distributed cache, for multiple nodes, supports rate-limiting for gateway applications)
? Do you want to use Hibernate 2nd level cache? No
? Which other technologies would you like to use? API first development using OpenAPI-generator
? Do you want to enable Gradle Enterprise integration? No
? Which framework would you like to use for the client? Angular
? Besides Jest/Vitest, which testing frameworks would you like to use? Cypress
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? United
? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Primary
? Would you like to enable internationalization support? No
? Please choose the native language of the application Japanese
? Please choose additional languages to install
? Would you like to generate code coverage for Cypress tests? [Experimental] Yes
? Would you like to audit Cypress tests? Yes
Related issues
Suggest a Fix
JHipster Version(s)
v8.7.0, also tried v8.6.0
JHipster configuration
Welcome to JHipster v8.7.0
Welcome to the JHipster Information Sub-Generator
/home/jhipster/app
└── (empty)
JHipster configuration not found
Environment and Tools
openjdk version "17.0.12" 2024-07-16
OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7)
OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)
git version 2.25.1
node: v20.17.0
npm: 10.8.2
'docker' command could not be found
WARNING! Current location doesn't contain a valid JHipster application
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!
Browsers and Operating System
MacOS
[x] Checking this box is mandatory (this is just to show you read everything)
Overview of the issue
Cannot read properties of undefined (reading 'replace') when generate application which native language is not english.
docker container run --rm -u 501:20 -it -v "$PWD":/home/jhipster/app jhipster/jhipster:v8.7.0 jhipster ? What is the base name of your application? Visualization ? Which type of application would you like to create? Monolithic application (recommended for simple projects) ? What is your default Java package name? com.nanoinfo.tipoca.visualization ? Would you like to use Maven or Gradle for building the backend? Gradle ? Do you want to make it reactive with Spring WebFlux? Yes ? Which type of authentication would you like to use? JWT authentication (stateless, with a token) ? Besides JUnit, which testing frameworks would you like to use? Gatling ? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) ? Which production database would you like to use? MySQL ? Which development database would you like to use? H2 with disk-based persistence ? Which cache do you want to use? (Spring cache abstraction) Hazelcast (distributed cache, for multiple nodes, supports rate-limiting for gateway applications) ? Do you want to use Hibernate 2nd level cache? No ? Which other technologies would you like to use? API first development using OpenAPI-generator ? Do you want to enable Gradle Enterprise integration? No ? Which framework would you like to use for the client? Angular ? Besides Jest/Vitest, which testing frameworks would you like to use? Cypress ? Do you want to generate the admin UI? Yes ? Would you like to use a Bootswatch theme (https://bootswatch.com/)? United ? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Primary ? Would you like to enable internationalization support? No ? Please choose the native language of the application Japanese ? Please choose additional languages to install ? Would you like to generate code coverage for Cypress tests? [Experimental] Yes ? Would you like to audit Cypress tests? Yes info Could not remove legacy file .huskyrc info Could not remove legacy file .lintstagedrc.js info Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 99,999 days info for: CN=Java Hipster, OU=Development, O=com.nanoinfo.tipoca.visualization, L=, ST=, C= info KeyStore '/home/jhipster/app/src/main/resources/config/tls/keystore.p12' generated successfully. info Could not remove legacy file gradle/swagger.gradle info Could not remove legacy file .eslintrc.json info Could not remove legacy file .eslintignore info Could not remove legacy file src/test/javascript/cypress/.eslintrc.json ✔ applying multi-step templates ✔ Git repository initialized. WARNING! liquibaseVersion is required by gradle-liquibase-plugin, make sure to add it to your dependencies create .prettierrc create .prettierignore ✔ prettier configuration files committed to disk ✔ loading translations ✔ updating package.json dependencies versions ✔ prettifying sonar-project.properties ✔ adding package-info.java files ✔ translating angular application ERROR! An error occured while running jhipster:angular#transformStream ERROR! ERROR! Cannot read properties of undefined (reading 'replace') TypeError: Cannot read properties of undefined (reading 'replace') at escapeHtmlTranslationValue (file:///home/jhipster/generator-jhipster/dist/generators/languages/support/translate.js:20:72) at tagTranslation (file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:100:29) at createJhiTranslateReplacer.prefixPattern (file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:228:20) at replaceTranslateContents (file:///home/jhipster/generator-jhipster/dist/generators/languages/support/translate.js:99:48) at file:///home/jhipster/generator-jhipster/dist/generators/languages/support/translate.js:103:127 at replaceAngularTranslations (file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:244:44) at file:///home/jhipster/generator-jhipster/dist/generators/angular/support/translate-angular.js:262:37 at Transform. (file:///home/jhipster/generator-jhipster/node_modules/@yeoman/transform/dist/transform.js:40:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Transform.transform [as _transform] (file:///home/jhipster/generator-jhipster/node_modules/@yeoman/transform/dist/transform.js:14:37)
Motivation for or Use Case
cannot create application which native language is not english
Reproduce the error
docker container run --rm -u 501:20 -it -v "$PWD":/home/jhipster/app jhipster/jhipster:v8.7.0 jhipster ? What is the base name of your application? Visualization ? Which type of application would you like to create? Monolithic application (recommended for simple projects) ? What is your default Java package name? com.nanoinfo.tipoca.visualization ? Would you like to use Maven or Gradle for building the backend? Gradle ? Do you want to make it reactive with Spring WebFlux? Yes ? Which type of authentication would you like to use? JWT authentication (stateless, with a token) ? Besides JUnit, which testing frameworks would you like to use? Gatling ? Which type of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL) ? Which production database would you like to use? MySQL ? Which development database would you like to use? H2 with disk-based persistence ? Which cache do you want to use? (Spring cache abstraction) Hazelcast (distributed cache, for multiple nodes, supports rate-limiting for gateway applications) ? Do you want to use Hibernate 2nd level cache? No ? Which other technologies would you like to use? API first development using OpenAPI-generator ? Do you want to enable Gradle Enterprise integration? No ? Which framework would you like to use for the client? Angular ? Besides Jest/Vitest, which testing frameworks would you like to use? Cypress ? Do you want to generate the admin UI? Yes ? Would you like to use a Bootswatch theme (https://bootswatch.com/)? United ? Choose a Bootswatch variant navbar theme (https://bootswatch.com/)? Primary ? Would you like to enable internationalization support? No ? Please choose the native language of the application Japanese ? Please choose additional languages to install ? Would you like to generate code coverage for Cypress tests? [Experimental] Yes ? Would you like to audit Cypress tests? Yes
Related issues
Suggest a Fix
JHipster Version(s)
v8.7.0, also tried v8.6.0
JHipster configuration
Welcome to JHipster v8.7.0
Welcome to the JHipster Information Sub-Generator
JHipster configuration not found
Environment and Tools
openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7) OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode, sharing)
git version 2.25.1
node: v20.17.0 npm: 10.8.2
'docker' command could not be found WARNING! Current location doesn't contain a valid JHipster application
Congratulations, JHipster execution is complete! If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!
Browsers and Operating System
MacOS