jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.5k stars 4.02k forks source link

Parsing error on french layout template #20411

Closed AlexGiroud closed 9 months ago

AlexGiroud commented 1 year ago
Overview of the issue

When creating an application with the generator and selecting Angular/AdminUI/No internationalization support/French a parsing error appears ;

Error parsing file src\main\webapp\app\layouts\error\error.route.ts: SyntaxError: ',' expected. (10:26)

Reproduce the error
Related issues
Suggest a Fix

Escape the ' line 10 of the angular file (webapp\app\layouts\error\error.route.ts) for the french version

I don't know if you need to escape it in the translation or in the function call, but the translation file seems to be there: generators/languages/templates/src/main/webapp/i18n/fr/error.json

JHipster Version(s)

v7.9.3

Browsers and Operating System

Tested on Windows 10 and fedora

dwarakaprasad commented 1 year ago

@AlexGiroud can you please run jhipster info and paste the output to the defect.

when do you get this error? code generation or application startup

AlexGiroud commented 1 year ago

I get this error on the first code generation.

Here is the output of jhipster info :

Welcome to JHipster v7.9.3

Welcome to the JHipster Information Sub-Generator

JHipster Version(s)
testjhipster@0.0.1-SNAPSHOT C:\Users\redacted\Documents\testjhipster
`-- (empty)
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "oauth2",
    "baseName": "testjhipster",
    "blueprints": [],
    "buildTool": "gradle",
    "cacheProvider": "ehcache",
    "clientFramework": "angularX",
    "clientPackageManager": "npm",
    "clientTheme": "none",
    "clientThemeVariant": "",
    "creationTimestamp": 1669082304299,
    "databaseType": "sql",
    "devDatabaseType": "h2Disk",
    "devServerPort": 4200,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": true,
    "enableSwaggerCodegen": false,
    "enableTranslation": false,
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.9.3",
    "languages": ["en", "fr"],
    "messageBroker": false,
    "microfrontend": false,
    "microfrontends": [],
    "nativeLanguage": "fr",
    "otherModules": [],
    "packageName": "com.mycompany.myapp",
    "pages": [],
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8080",
    "serverSideOptions": [],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipClient": false,
    "skipFakeData": false,
    "skipUserManagement": true,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": true
  }
}

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions

Environment and Tools

openjdk version "18.0.2.1" 2022-08-18 OpenJDK Runtime Environment (build 18.0.2.1+1-1) OpenJDK 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)

git version 2.24.0.windows.2

node: v18.12.1

npm: 8.19.2

jminkhar commented 1 year ago

Got the same error image

And when I tried with the development version of JHipster, I got something weird when I follow those steps :

In any case I got the step : Please choose additional languages to install

image

Is that normal ?

djibythiaw commented 1 year ago

Hello, I have the same error than @jminkhar with french language without the internationalization. Do you have a solution ?

AlexGiroud commented 1 year ago

Hello, I have the same error than @jminkhar with french language without the internationalization. Do you have a solution ?

A quick solution is to enable internationalization

qmonmert commented 9 months ago

@DanielFran fix by #23008 we can close it