Skip to content

Conversation

@GeoffreyKarnbach
Copy link
Contributor

Description

Enable usage of translation files for the DMP components by disabling the custom TranslateModule config and using the parent provided one from the top level module.

closes GH-499

@GeoffreyKarnbach GeoffreyKarnbach requested a review from a team as a code owner December 15, 2025 14:17
@DanceaVlad
Copy link
Member

DanceaVlad commented Dec 18, 2025

The goal of the PR is met, however, I made a small test:

  • I included the following code into dmp.component.html:
<div style="border: 2px solid red; padding: 20px; margin: 20px; background: #fff3cd;">
  <h2>Translation Access Test - All Translation Files</h2>
  <p><strong>From layout (app):</strong> {{ 'title' | translate }}</p>
  <p><strong>From templates (libs):</strong> {{ 'dmp.steps.project.success' | translate }}</p>
  <p><strong>From http (libs):</strong> {{ 'http.error.standard' | translate }}</p>
  <p><strong>From plans (libs):</strong> {{ 'plans.mydmps' | translate }}</p>
  <p><strong>From info (libs):</strong> <span [innerHTML]="'info.dataset.none' | translate"></span></p>
  <p><strong>From help (libs):</strong> {{ 'help.legal.sensitiveDataSecurity' | translate }}</p>
  <p><strong>From gdpr (libs):</strong> {{ 'gdpr.title' | translate }}</p>
  <p><strong>From en.json base (libs):</strong> {{ 'yes' | translate }}</p>
  <p><strong>From access (libs):</strong> {{ 'access.button.plans' | translate }}</p>
  <p><strong>From landing-page (app):</strong> {{ 'landing-page.title' | translate }}</p>
  <p><strong>From consent (app):</strong> {{ 'heading' | translate }}</p>
  <p><strong>From admin (libs):</strong> {{ 'admin.title' | translate }}</p>
  <p><strong>From dashboard (libs):</strong> {{ 'dashboard.welcome.message' | translate }}</p>
</div>
  • and the result was this:
Translation Access Test - All Translation Files
From layout (app): DAMAP
From templates (libs): Updated project information!
From http (libs): Failed to load resource.
From plans (libs): MY DMPs
From info (libs):info.dataset.none
From help (libs): help.legal.sensitiveDataSecurity
From gdpr (libs): GDPR
From en.json base (libs): Yes
From access (libs): access.button.plans
From landing-page (app): DAMAP - a tool for machine actionable DMPs
From consent (app): Data Protection Declaration of Consent DAMAP
From admin (libs): Admin page
From dashboard (libs): Welcome to DAMAP, a service that helps you to create the Data Management Plan (DMP) for your project.
  • this means that the parent app is not loading these paths:
    libs/damap/src/assets/i18n/access
    libs/damap/src/assets/i18n/help
    libs/damap/src/assets/i18n/info
  • they need to be added into app.module.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make translations work for the whole application

3 participants