Skip to content

Commit

Permalink
Development: Replace the old translation feature in the client with t…
Browse files Browse the repository at this point in the history
…he new desired approach (#8803)
  • Loading branch information
asliayk authored Aug 26, 2024
1 parent 8411fae commit 215b72f
Show file tree
Hide file tree
Showing 301 changed files with 2,269 additions and 2,614 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h4 class="modal-title" jhiTranslate="artemisApp.lti.version13Configuration"></h
<ng-template ngbNavContent>
<dt></dt>
<dt style="display: flex; align-items: center">
<h4 class="modal-title">{{ 'artemisApp.lti.dynamicRegistrationUrl' | artemisTranslate }}</h4>
<h4 class="modal-title" jhiTranslate="artemisApp.lti.dynamicRegistrationUrl"></h4>
<jhi-help-icon text="artemisApp.lti.dynamicRegistrationTooltip" />
</dt>
<dd>
Expand All @@ -17,7 +17,7 @@ <h4 class="modal-title">{{ 'artemisApp.lti.dynamicRegistrationUrl' | artemisTran
</dd>
<dt style="display: flex; align-items: center; justify-content: space-between; width: 100%">
<div class="modal-header" style="margin-bottom: 20px">
<h4 class="modal-title" style="margin-right: 2px">{{ 'artemisApp.lti.configuredPlatforms' | artemisTranslate }}</h4>
<h4 class="modal-title" style="margin-right: 2px" jhiTranslate="artemisApp.lti.configuredPlatforms"></h4>
<jhi-help-icon text="artemisApp.lti.configuredPlatformsTooltip" />
</div>
<div class="modal-header" style="margin-bottom: 20px">
Expand Down Expand Up @@ -130,35 +130,35 @@ <h4 class="modal-title" style="margin-right: 2px">{{ 'artemisApp.lti.configuredP
<a ngbNavLink jhiTranslate="artemisApp.lti.serviceUrls"></a>
<ng-template ngbNavContent>
<dt>
<span>{{ 'artemisApp.lti.deepLinkingUrl' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.lti.deepLinkingUrl"></span>
</dt>
<dd>
<span>{{ getDeepLinkingUrl() }}</span>
<jhi-copy-icon-button [copyText]="getDeepLinkingUrl()" />
</dd>
<dt>
<span>{{ 'artemisApp.lti.toolUrl' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.lti.toolUrl"></span>
</dt>
<dd>
<span>{{ getToolUrl() }}</span>
<jhi-copy-icon-button [copyText]="getToolUrl()" />
</dd>
<dt>
<span>{{ 'artemisApp.lti.keysetUrl' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.lti.keysetUrl"></span>
</dt>
<dd>
<span>{{ getKeysetUrl() }}</span>
<jhi-copy-icon-button [copyText]="getKeysetUrl()" />
</dd>
<dt>
<span>{{ 'artemisApp.lti.initiateLoginUrl' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.lti.initiateLoginUrl"></span>
</dt>
<dd>
<span>{{ getInitiateLoginUrl() }}</span>
<jhi-copy-icon-button [copyText]="getInitiateLoginUrl()" />
</dd>
<dt>
<span>{{ 'artemisApp.lti.redirectUri' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.lti.redirectUri"></span>
</dt>
<dd>
<span>{{ getRedirectUri() }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ <h2 id="myNotificationLabel" jhiTranslate="artemisApp.systemNotification.createO
name="expireDate"
/>
@if (expireDate?.errors?.expireMustBeAfterNotification) {
<span class="text-danger">{{ 'error.systemNotificationNeedsNotificationBeforeExpiration' | artemisTranslate }}</span>
<span class="text-danger" jhiTranslate="error.systemNotificationNeedsNotificationBeforeExpiration"></span>
}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,13 @@ <h2>
<td>
@switch (getNotificationState(notification)) {
@case (ACTIVE) {
<span class="badge bg-success">
{{ 'artemisApp.systemNotification.active' | artemisTranslate }}
</span>
<span class="badge bg-success" jhiTranslate="artemisApp.systemNotification.active"></span>
}
@case (EXPIRED) {
<span class="badge bg-danger">
{{ 'artemisApp.systemNotification.expired' | artemisTranslate }}
</span>
<span class="badge bg-danger" jhiTranslate="artemisApp.systemNotification.expired"></span>
}
@case (SCHEDULED) {
<span class="badge bg-info">
{{ 'artemisApp.systemNotification.scheduled' | artemisTranslate }}
</span>
<span class="badge bg-info" jhiTranslate="artemisApp.systemNotification.scheduled"></span>
}
}
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ <h4 jhiTranslate="artemisApp.upcomingExamsAndExercises.upcomingExercises"></h4>
<thead>
<tr>
<th class="d-md-table-cell" style="width: 300px">
<span>{{ 'artemisApp.upcomingExamsAndExercises.exercise' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.upcomingExamsAndExercises.exercise"></span>
</th>
<th class="d-md-table-cell" style="width: 300px">
<span>{{ 'artemisApp.upcomingExamsAndExercises.course' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.upcomingExamsAndExercises.course"></span>
</th>
<th class="d-md-table-cell" style="width: 180px">
<span>{{ 'artemisApp.upcomingExamsAndExercises.releaseDate' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.upcomingExamsAndExercises.releaseDate"></span>
</th>
<th class="d-md-table-cell" style="width: 180px">
<span>{{ 'artemisApp.upcomingExamsAndExercises.dueDate' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.upcomingExamsAndExercises.dueDate"></span>
</th>
</tr>
</thead>
Expand Down Expand Up @@ -61,19 +61,19 @@ <h4 jhiTranslate="artemisApp.upcomingExamsAndExercises.upcomingExams"></h4>
<thead>
<tr>
<th class="d-md-table-cell" style="width: 300px">
<span>{{ 'artemisApp.upcomingExamsAndExercises.exam' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.upcomingExamsAndExercises.exam"></span>
</th>
<th class="d-md-table-cell" style="width: 300px">
<span>{{ 'artemisApp.upcomingExamsAndExercises.course' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.upcomingExamsAndExercises.course"></span>
</th>
<th class="d-md-table-cell" style="width: 180px">
<span>{{ 'artemisApp.examManagement.visibleDate' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.examManagement.visibleDate"></span>
</th>
<th class="d-md-table-cell" style="width: 180px">
<span>{{ 'artemisApp.examManagement.startDate' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.examManagement.startDate"></span>
</th>
<th class="d-md-table-cell" style="width: 180px">
<span>{{ 'artemisApp.examManagement.endDate' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.examManagement.endDate"></span>
</th>
</tr>
</thead>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ <h2>
[ngClass]="{ 'btn-secondary': !filters.numberOfAppliedFilters, 'btn-success': !!filters.numberOfAppliedFilters }"
>
<fa-icon [icon]="faFilter" />
<span class="d-s-none d-md-inline">{{
'artemisApp.userManagement.filter.modal.open' | artemisTranslate: { num: filters.numberOfAppliedFilters }
}}</span>
<span
class="d-s-none d-md-inline"
jhiTranslate="artemisApp.userManagement.filter.modal.open"
[translateValues]="{ num: filters.numberOfAppliedFilters }"
></span>
</button>
</div>
</div>
Expand Down Expand Up @@ -227,14 +229,14 @@ <h2>
<!-- Modal -->
<ng-template #content let-modal>
<div class="modal-header">
<h5 class="modal-title">{{ 'artemisApp.userManagement.filter.modal.title' | artemisTranslate }}</h5>
<h5 class="modal-title" jhiTranslate="artemisApp.userManagement.filter.modal.title"></h5>
<button type="button" class="btn-close" aria-label="Close" (click)="modal.dismiss()"></button>
</div>
<div class="modal-body">
<div class="container-fluid">
<div class="row user-management-border-bottom">
<div class="col d-flex flex-row pb-1">
<h5 class="my-0">{{ 'artemisApp.userManagement.filter.authority.title' | artemisTranslate: { num: this.filters.authorityFilter.size } }}</h5>
<h5 class="my-0" jhiTranslate="artemisApp.userManagement.filter.authority.title" [translateValues]="{ num: this.filters.authorityFilter.size }"></h5>
<jhi-help-icon class="ps-1" text="artemisApp.userManagement.filter.authority.tooltip" />
</div>
</div>
Expand All @@ -250,9 +252,7 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.authority.title' | artemis
(click)="selectAllRoles()"
[checked]="this.filters.authorityFilter.size === this.authorityFilters.length && !this.filters.noAuthority"
/>
<label for="authorityFilter" class="form-check-label ps-1">
{{ 'artemisApp.userManagement.filter.all' | artemisTranslate }}
</label>
<label for="authorityFilter" class="form-check-label ps-1" jhiTranslate="artemisApp.userManagement.filter.all"></label>
</div>
<div class="form-check col-6 d-flex justify-content-center">
<input
Expand All @@ -262,9 +262,7 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.authority.title' | artemis
(click)="selectEmptyRoles()"
[checked]="this.filters.authorityFilter.size === 0 && this.filters.noAuthority"
/>
<label for="emptyRoles" class="form-check-label ps-1">
{{ 'artemisApp.userManagement.filter.authority.without' | artemisTranslate }}
</label>
<label for="emptyRoles" class="form-check-label ps-1" jhiTranslate="artemisApp.userManagement.filter.authority.without"></label>
<jhi-help-icon class="ps-1" text="artemisApp.userManagement.filter.authority.withoutTooltip" />
</div>
<div class="form-check col-3 d-flex justify-content-center">
Expand All @@ -275,9 +273,7 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.authority.title' | artemis
(click)="deselectAllRoles()"
[checked]="this.filters.authorityFilter.size === 0 && !this.filters.noAuthority"
/>
<label for="deselectAll" class="form-check-label ps-1">
{{ 'artemisApp.userManagement.filter.none' | artemisTranslate }}
</label>
<label for="deselectAll" class="form-check-label ps-1" jhiTranslate="artemisApp.userManagement.filter.none"></label>
</div>
</div>
</div>
Expand All @@ -304,7 +300,7 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.authority.title' | artemis
</div>
<div class="row row user-management-border-bottom">
<div class="col d-flex flex-row pt-3 pb-1">
<h5 class="my-0">{{ 'artemisApp.userManagement.filter.origin.title' | artemisTranslate: { num: this.filters.originFilter.size } }}</h5>
<h5 class="my-0" jhiTranslate="artemisApp.userManagement.filter.origin.title" [translateValues]="{ num: this.filters.originFilter.size }"></h5>
<jhi-help-icon class="ps-1" text="artemisApp.userManagement.filter.origin.tooltip" />
</div>
</div>
Expand All @@ -321,16 +317,18 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.origin.title' | artemisTra
}
<li class="col-3">
<input class="form-check-input" type="radio" (click)="this.toggleOriginFilter()" [checked]="this.filters.originFilter.size === 0" />
<label class="form-check-label ps-1">
{{ 'artemisApp.userManagement.filter.none' | artemisTranslate }}
</label>
<label class="form-check-label ps-1" jhiTranslate="artemisApp.userManagement.filter.none"></label>
</li>
</ul>
</div>
</div>
<div class="row row user-management-border-bottom">
<div class="col d-flex flex-row pt-3 pb-1">
<h5 class="my-0">{{ 'artemisApp.userManagement.filter.registrationNumber.title' | artemisTranslate: { num: this.filters.registrationNumberFilter.size } }}</h5>
<h5
class="my-0"
jhiTranslate="artemisApp.userManagement.filter.registrationNumber.title"
[translateValues]="{ num: this.filters.registrationNumberFilter.size }"
></h5>
<jhi-help-icon class="ps-1" text="artemisApp.userManagement.filter.registrationNumber.tooltip" />
</div>
</div>
Expand Down Expand Up @@ -360,16 +358,14 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.registrationNumber.title'
(click)="this.toggleRegistrationNumberFilter()"
[checked]="this.filters.registrationNumberFilter.size === 0"
/>
<label for="toggleRegistrationNumberFilter" class="form-check-label ps-1">
{{ 'artemisApp.userManagement.filter.none' | artemisTranslate }}
</label>
<label for="toggleRegistrationNumberFilter" class="form-check-label ps-1" jhiTranslate="artemisApp.userManagement.filter.none"></label>
</li>
</ul>
</div>
</div>
<div class="row user-management-border-bottom">
<div class="col d-flex flex-row pt-3 pb-1">
<h5 class="my-0">{{ 'artemisApp.userManagement.filter.status.title' | artemisTranslate: { num: this.filters.statusFilter.size } }}</h5>
<h5 class="my-0" jhiTranslate="artemisApp.userManagement.filter.status.title" [translateValues]="{ num: this.filters.statusFilter.size }"></h5>
<jhi-help-icon class="ps-1" text="artemisApp.userManagement.filter.status.tooltip" />
</div>
</div>
Expand All @@ -386,19 +382,15 @@ <h5 class="my-0">{{ 'artemisApp.userManagement.filter.status.title' | artemisTra
}
<li class="col-3">
<input class="form-check-input" type="radio" (click)="this.toggleStatusFilter()" [checked]="this.filters.statusFilter.size === 0" />
<label class="form-check-label ps-1">
{{ 'artemisApp.userManagement.filter.none' | artemisTranslate }}
</label>
<label class="form-check-label ps-1" jhiTranslate="artemisApp.userManagement.filter.none"></label>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" (click)="modal.close()">
{{ 'artemisApp.userManagement.filter.modal.close' | artemisTranslate }}
</button>
<button type="button" class="btn btn-secondary" (click)="modal.close()" jhiTranslate="artemisApp.userManagement.filter.modal.close"></button>
<button class="btn btn-primary" (click)="applyFilter()">
<span jhiTranslate="artemisApp.userManagement.filter.apply"></span>
</button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
@if (complaint) {
@if (complaint?.complaintType === ComplaintType.COMPLAINT) {
<div class="alert alert-info">{{ 'artemisApp.complaint.hint' | artemisTranslate }}</div>
<div class="alert alert-info" jhiTranslate="artemisApp.complaint.hint"></div>
}
@if (complaint?.complaintType === ComplaintType.MORE_FEEDBACK) {
<div class="alert alert-info">{{ 'artemisApp.moreFeedback.hint' | artemisTranslate }}</div>
<div class="alert alert-info" jhiTranslate="artemisApp.moreFeedback.hint"></div>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import { Submission } from 'app/entities/submission.model';
<div class="card-header">
<fa-icon [icon]="faExclamationTriangle" size="2x" class="text-warning" placement="bottom auto" />
@if (isBeforeExerciseDueDate) {
<span>{{ 'artemisApp.assessment.dashboard.warning' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.assessment.dashboard.warning"></span>
}
@if (!isBeforeExerciseDueDate) {
<span>{{ 'artemisApp.assessment.dashboard.warningIndividual' | artemisTranslate }}</span>
<span jhiTranslate="artemisApp.assessment.dashboard.warningIndividual"></span>
}
</div>
}
Expand Down
Loading

0 comments on commit 215b72f

Please sign in to comment.