generator-jhipster: Problem with i18n in JHipster webapp served on localhost:8080
Overview of the issue
After logging in to localhost:8080, menu items are missing labels, due to language file not being found
Motivation for or Use Case
I generated a new Cassandra project with latest JHipster application. I chose serbian language to be native and english to be the alternative language. When I try to login to the generated webapp on localhost:8080, the following error shows up in console:
GET http://localhost:8080/i18n/undefined.json?buildTimestamp=1524732583467 404 (Not Found)
Reproduce the error
Generate a new monolithic JHipster application with latest JHipster version, then choose two languages, setting one other than english as a native one. Run the backend and try to login to the generated webapp on localhost:8080. Check if menu items have labels and that console is free of 404 errors.
Hitting the browser refresh button, the language file gets served properly and the problem with the 404 console error disappears.
Related issues
none
Suggest a Fix
none
JHipster Version(s)
JHipster Generator v4.14.3
JHipster configuration
Monolithic application Cassandra database Hazelcast caching Serbian (native) & english languages
This is what my yo-rc.json contents look like:
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.package.cassandra",
"nativeLanguage": "sr"
},
"jhipsterVersion": "4.14.3",
"baseName": "cassandra",
"packageName": "com.package.cassandra",
"packageFolder": "com/package/cassandra",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "hazelcast",
"enableHibernateCache": false,
"websocket": false,
"databaseType": "cassandra",
"devDatabaseType": "cassandra",
"prodDatabaseType": "cassandra",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "maven",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "4fb3ae16e32811df145c24357ec1f250a1a90fd2",
"clientFramework": "angularX",
"useSass": true,
"clientPackageManager": "yarn",
"applicationType": "monolith",
"testFrameworks": [],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "sr",
"languages": [
"sr",
"en"
]
}
}
Entity configuration(s) entityName.json files generated in the .jhipster directory
Various entities
Browsers and Operating System
IOS HighSierra Google Chrome
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (11 by maintainers)
@micobarac WE ARE DOING THIS FOR FREE IN OUR FREE TIME. So its really no fun trying to reproduce issues you face without knowing what exact options you used as there are thousands of combinations possible, and even one choice could make a difference. We have an Issue template and process for a reason and we expect you to follow it if you need our help. And being supportive doesn’t mean we need to encourage users creating issues as they see fit. If you are using an OSS project you need to respect the rules and process of the project.
And its seems @pmverma couldn’t reproduce the issue, so we need more info on how to reproduce it.
Could you please tell us how you fixed the issue? Thanks.