Ebsan / generator-jhipster-es-entity-reindexer

Generates code to reindex selected entities with Elasticsearch.
Apache License 2.0
3 stars 4 forks source link

Fix i18n support / remove unused import #4

Closed nitram84 closed 2 years ago

nitram84 commented 2 years ago

I would like to propose fixes for two issues:

If latest git version is used with i18n support enabled, you get this error:

Welcome to the JHipster es-entity-reindexer generator! v1.0.1

WARNING! src/main/webapp/app/admin/elasticsearch-reindex/_elasticsearch-reindex.component.ts.ejs
Unhandled promise rejection at:
ReferenceError: [...]\node_modules\generator-jhipster-es-entity-reindexer\generators\app\templates\src\main\webapp\app\admin\elasticsearch-reindex\_elasticsearch-reindex.component.ts.ejs:3
    1| import { Component } from '@angular/core';
    2| import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
 >> 3| <%_ if (enableTranslation && requiresSetLocation) { _%>
    4| import { JhiLanguageService } from 'ng-jhipster';
    5| <%_ } _%>
    6|

requiresSetLocation is not defined`

This seems to be a leftover of older JHipster versions. I tested with JHipster 7.9.3.

And in ElasticsearchIndexService.java an unused import can be removed.