question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jhiTranslate is present for Enum Type fields even when translation is disabled

See original GitHub issue
Overview of the issue

Even though translations was disabled when creating jhipster project, still we get related attributes for entity field of enum type.

This is how my entity-dialog html file looks like:

<select class="form-control" name="companyType" [(ngModel)]="company.companyType" id="field_companyType" required> <option value="ATYPE" jhiTranslate="eachfitApp.CompanyType.ATYPE">ATYPE</option> <option value="BTYPE" jhiTranslate="eachfitApp.CompanyType.BTYPE">BTYPE</option> </select>

I have to latter manually remove these jhiTranslate attribute from html code.

JHipster Version(s)

4.0.7

JHipster configuration

{ “generator-jhipster”: { “jhipsterVersion”: “4.0.7”, “baseName”: “eachfit”, “packageName”: “com.eachfit”, “packageFolder”: “com/eachfit”, “serverPort”: “8080”, “authenticationType”: “jwt”, “hibernateCache”: “ehcache”, “clusteredHttpSession”: false, “websocket”: false, “databaseType”: “sql”, “devDatabaseType”: “h2Disk”, “prodDatabaseType”: “mysql”, “searchEngine”: false, “messageBroker”: false, “serviceDiscoveryType”: false, “buildTool”: “maven”, “enableSocialSignIn”: true, “jwtSecretKey”: “”, “clientFramework”: “angular2”, “useSass”: false, “clientPackageManager”: “yarn”, “applicationType”: “monolith”, “testFrameworks”: [], “jhiPrefix”: “jhi”, “enableTranslation”: false } }

  • Checking this box is mandatory (this is just to show you read everything)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gmarzioucommented, Mar 5, 2017

Maybe it could be done globally by stripping them in copyTemplate

0reactions
rakeshkalra1983commented, Mar 8, 2017

Hi, I retried it today morning and this issue is not occurring. I am not sure how I got this issue earlier. Thanks guys for looking into this and replying.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to display default text when translation is missing using ...
In the end I found a workaround by using "[translateValues]". So the final result was something like <div jhiTranslate="example.1" [ ...
Read more >
Angular: Translate Enums (i18n) - Medium
One of the biggest flaw of built-in Angular translation engine is it only supports translations known during build time.
Read more >
Explore the JHipster code | Better Projects Faster
Let's get the tutorial project into Eclipse: Select the File — Import… menu. Then type “grad” until the Gradle — Existing Gradle Project...
Read more >
jhipster - Blogging googling
I used jhipster to generate an entity which have a property of type enum. jhipster entity tipoEstudio. What are the values of your...
Read more >
The JHipster Mini-Book
weightUnits ? What is the type of your field? Enumeration (Java enum type) ? What is the class name of your enumeration? Units....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found