Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation missing when generating entities with enableTranslation=false in version 8.0.0 #24204

Closed
1 task done
edilsonmendes opened this issue Nov 13, 2023 · 0 comments · Fixed by #24259
Closed
1 task done

Comments

@edilsonmendes
Copy link
Contributor

Overview of the issue

When generating entities of application using jhipster v8..0.0 without enable translation some entity files show follow error: "Translation missing for...".

For entity-component.html:
Translation missing for global.field.id
Translation missing for entity.action.view
Translation missing for entity.action.edit
Translation missing for entity.action.delete

For entity-detail.component.html:
Translation missing for global.field.id
Translation missing for entity.action.back
Translation missing for entity.action.edit

For entity-delete-dialog.component.html:
Translation missing for entity.delete.title
Translation missing for entity.action.cancel
Translation missing for entity.action.delete

For entity-update.component.html:
Translation missing for entity.validation.required
Translation missing for entity.action.cancel
Translation missing for entity.action.save

Motivation for or Use Case

Instead of show "Translation missing for " it should show the correct translation.

Reproduce the error

Generate a application without enable translation and then generate any entity.

Related issues
Suggest a Fix
JHipster Version(s)

8.0.0

JHipster configuration
    ██╗ ██╗   ██╗ ████████╗ ███████╗   ██████╗ ████████╗ ████████╗ ███████╗
    ██║ ██║   ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
    ██║ ████████║    ██║    ███████╔╝ ╚█████╗     ██║    ██████╗   ███████╔╝

██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
https://www.jhipster.tech
Welcome to JHipster v8.0.0

Welcome to the JHipster Information Sub-Generator

sample@0.0.1-SNAPSHOT /home/embj/git/tjpe/sample-gerador-v8
└── (empty)
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "oauth2",
    "baseName": "sample",
    "buildTool": "maven",
    "cacheProvider": "ehcache",
    "clientFramework": "angular",
    "clientTestFrameworks": [],
    "clientTheme": "none",
    "creationTimestamp": 1699883507239,
    "databaseType": "sql",
    "devDatabaseType": "postgresql",
    "devServerPort": 4200,
    "enableGradleEnterprise": null,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": false,
    "entities": [
      "SpaceEvent",
      "Mission"
    ],
    "gradleEnterpriseHost": null,
    "jhipsterVersion": "8.0.0",
    "lastLiquibaseTimestamp": 1699883627000,
    "messageBroker": false,
    "microfrontend": null,
    "microfrontends": [],
    "nativeLanguage": "en",
    "packageName": "com.mycompany.myapp",
    "prodDatabaseType": "postgresql",
    "reactive": false,
    "searchEngine": false,
    "serverPort": null,
    "serverSideOptions": [],
    "serviceDiscoveryType": false,
    "skipUserManagement": true,
    "testFrameworks": [],
    "websocket": false,
    "withAdminUi": false
  }
}
Environment and Tools

openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment Temurin-17.0.6+10 (build 17.0.6+10)
OpenJDK 64-Bit Server VM Temurin-17.0.6+10 (build 17.0.6+10, mixed mode, sharing)

git version 2.25.1

node: v20.9.0
npm: 10.1.0

Docker version 24.0.1, build 6802122

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
entity SpaceEvent {
  name String required
  date LocalDate required
  description TextBlob required
  photo ImageBlob required
  type SpaceEventType required
}
entity Mission {
  name String required
  description String
}
enum SpaceEventType {
  LAUNCH,
  LANDING
}

relationship OneToOne {
  SpaceEvent{mission(name)} to Mission
}

paginate SpaceEvent with infinite-scroll
paginate Mission with pagination
search SpaceEvent, Mission with no

Entity configuration(s) entityName.json files generated in the .jhipster directory

{
"applications": "*",
"changelogDate": "20231113135347",
"entityTableName": "mission",
"fields": [
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": ["required"]
},
{
"fieldName": "description",
"fieldType": "String"
}
],
"name": "Mission",
"pagination": "pagination",
"relationships": [],
"searchEngine": "no"
}

{
"applications": "*",
"changelogDate": "20231113135247",
"entityTableName": "space_event",
"fields": [
{
"fieldName": "name",
"fieldType": "String",
"fieldValidateRules": ["required"]
},
{
"fieldName": "date",
"fieldType": "LocalDate",
"fieldValidateRules": ["required"]
},
{
"fieldName": "description",
"fieldType": "byte[]",
"fieldTypeBlobContent": "text",
"fieldValidateRules": ["required"]
},
{
"fieldName": "photo",
"fieldType": "byte[]",
"fieldTypeBlobContent": "image",
"fieldValidateRules": ["required"]
},
{
"fieldName": "type",
"fieldType": "SpaceEventType",
"fieldValidateRules": ["required"],
"fieldValues": "LAUNCH,LANDING"
}
],
"name": "SpaceEvent",
"pagination": "infinite-scroll",
"relationships": [
{
"otherEntityField": "name",
"otherEntityName": "mission",
"relationshipName": "mission",
"relationshipSide": "left",
"relationshipType": "one-to-one"
}
],
"searchEngine": "no"
}

Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants