OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Localize exclusion info modal title and content
Christophe Bliarda611a7b77b46
diff --git a/config/locales/js-en.yml b/config/locales/js-en.ymlindex c21e4e8a6e1..ac33937f178 100644--- a/config/locales/js-en.yml+++ b/config/locales/js-en.yml@@ -1370,6 +1370,14 @@ en:group: "The group is now a part of %{project}. Meanwhile you can already plan with that group and assign work packages for instance."next_button: "Continue"+ exclusion_info:+ modal:+ title: "Status excluded from hierarchy totals"+ content: >-+ The status '%{status_name}' has been configured to be excluded from hierarchy+ totals of Work, Remaining work, and % Complete. The totals do not take+ this value into account.+favorite_projects:no_results: "You have no favorite projects"no_results_subtext: "Add one or multiple projects as favorite through their overview or in a project list."diff --git a/frontend/src/app/shared/components/fields/display/field-types/excluded-icon-helper.service.ts b/frontend/src/app/shared/components/fields/display/field-types/excluded-icon-helper.service.tsindex 84c818c3577..3863215923a 100644--- a/frontend/src/app/shared/components/fields/display/field-types/excluded-icon-helper.service.ts+++ b/frontend/src/app/shared/components/fields/display/field-types/excluded-icon-helper.service.ts@@ -43,15 +43,16 @@ export class ExcludedIconHelperService {this.apiV3Service.statuses.id(resource.status as StatusResource).get().subscribe((status:StatusResource) => {if (status.excludedFromTotals) {- this.addExcludedInfoIcon(element);+ this.addExcludedInfoIcon(element, status.name);}},);}}- public addExcludedInfoIcon(element:HTMLElement):void {+ public addExcludedInfoIcon(element:HTMLElement, name:string):void {const infoIcon = document.createElement('opce-exclusion-info');+ infoIcon.setAttribute('status-name', name);element.appendChild(infoIcon);}}diff --git a/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.html b/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.htmlindex 8944b6e6a59..5c55fa59999 100644--- a/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.html+++ b/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.html@@ -14,20 +14,19 @@<ng-container slot="body" class="op-exclusion-info--modal"><div class="op-exclusion-info--modal"><div class="spot-drop-modal--header">- <div class="spot-drop-modal--header-title"> Status excluded from hierarchy totals</div>-+ <div class="spot-drop-modal--header-title">+ {{text.modalTitle}}+ </div></div><div class="spot-drop-modal--content">- The status 'Rejected (TODO: replace me)' has been configured to be excluded from hierarchy- totals of Work, Remaining work, and % Complete. The totals do not take- this value into account.+ {{text.modalContent}}</div><div class="spot-action-bar"><div class="spot-action-bar--left"><button(click)="toggleOpen($event)"class="button">- Close+ {{text.buttonClose}}</button></div></div>diff --git a/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.ts b/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.tsindex e126e548ef4..becf0144ccf 100644--- a/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.ts+++ b/frontend/src/app/shared/components/fields/display/info/op-exclusion-info.component.ts@@ -32,6 +32,8 @@ import {ChangeDetectionStrategy,ChangeDetectorRef,Component,+ Input,+ OnInit,} from '@angular/core';import { I18nService } from 'core-app/core/i18n/i18n.service';@@ -41,14 +43,26 @@ import { I18nService } from 'core-app/core/i18n/i18n.service';styleUrls: ['./op-exclusion-info.component.sass'],changeDetection: ChangeDetectionStrategy.OnPush,})-export class OpExclusionInfoComponent {+export class OpExclusionInfoComponent implements OnInit {public opened = false;+ @Input() public statusName:string;++ public text = {+ modalTitle: this.I18n.t('js.exclusion_info.modal.title'),+ modalContent: '',+ buttonClose: this.I18n.t('js.button_close'),+ };+constructor(readonly I18n:I18nService,readonly cdRef:ChangeDetectorRef,) {}+ ngOnInit() {+ this.text.modalContent = this.I18n.t('js.exclusion_info.modal.content', { status_name: this.statusName || '' });+ }+public toggleOpen(event:Event):void {event.stopPropagation();this.opened = !this.opened;