Administration shell never reports missing translations: its language-coverage scan fetches gen/<app>/admin/js/config.js, which no generated application has

Open Beginner friendly
#8,238 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java

Research direction

Read resources-admin/admin/js/appShell.js and trace loadLanguageCoverage() from the perspective path to the generated config URL. Compare it with the application shell copy in resources-application/.../application/js/appShell.js and the generated paths described in the issue. Done when the scan reads each application's gen/<app>/js/config.js and reports apps missing platform languages such as bg.

Written by the indexing model from the issue text.

Description

Image: dirigiblelabs/dirigible:15.1.0-java (sha256:dac354be94f21f222e88b81fd7fc6e68d9616ee7b4e12bcb1e9eef0465bd213f)
Reference: dirigiblelabs/dirigible:15.1.0 (sha256:449b8c948738a2bd7a4294a7bec1000a08bc1da1cd20f312f0e54383a7af325d)
Basic auth admin:admin, default H2, DIRIGIBLE_APPLICATION_LANGUAGES=en,bg.

Same behaviour on both editions.

Steps

  1. Generate and publish an intent application whose intent declares only languages: [en] (or none), e.g. project customers.
  2. GET /services/platform/extensions/perspectives?extensionPoints=application-admin-perspectives -> its admin perspective, "path":"/services/web/customers/gen/customers/admin/index.html".
  3. Open the administration shell /services/web/admin/index.html, go to Settings > Region & Language.

Observed

The shell requests GET /services/web/customers/gen/customers/admin/js/config.js -> 404 (once per generated application; the console shows Failed to load resource: the server responded with a status of 404). The generated config lives one level up: GET /services/web/customers/gen/customers/js/config.js -> 200 with its languages: [...].

Every application is therefore treated as a platform surface and dropped from the scan. The shell state after load is appLanguages: [], languageWarnings(): [] with platform languages ["en","bg"] - so an application providing only en is never listed as missing bg. The administration shell's missing-translation warning can never appear.

Expected

loadLanguageCoverage() reads each generated application's gen/<app>/js/config.js and lists the applications whose declared languages do not cover the platform set, as the comment above it describes (the application shell's copy of the same function in resources-application/.../application/js/appShell.js does this, see #8137 for its wording).

Where

resources-admin admin/js/appShell.js, loadLanguageCoverage() (v15.1.0, ~line 189): the base is derived from the perspective path with ^/services/web/([^/]+)/([^#?]*/)?index\.html, and every admin perspective generated by template-application-ui-harmonia-java (ui/admin/admin-perspective.*) points at gen/<app>/admin/index.html, so the base ends in /admin/, where no js/config.js is generated (only ui/shell/js/config.js.template exists).

Dominant language
Java
Stars
278
Forks
97
Avg merge
15h 33m
Merged PRs (30d)
301

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-dirigible/dirigible

All issues in eclipse-dirigible/dirigible

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.