Skip to content

Commit

Permalink
fix: manage missing translation (#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryT-CG authored Jan 9, 2025
1 parent 5faf94c commit 374bf74
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 50 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"build": "ng build",
"check": "ng lint --cache=true && npx prettier -c --cache .",
"clean": "npm cache clean --force && ng cache clean && rm -f .eslintcache && rm -f ./node_modules/.cache/prettier/.prettier-cache",
"clean": "npm cache clean --force && ng cache clean && rm -rf dist reports .angular .eslintcache ./node_modules/.cache/prettier/.prettier-cache",
"lint": "ng lint --cache=true",
"format": "ng lint --fix",
"eslint": "eslint --quiet --ext .js,.ts src",
Expand Down Expand Up @@ -110,7 +110,7 @@
"ng-packagr": "18.2.1",
"ngx-build-plus": "^18.0.0",
"ngx-translate-testing": "^7.0.0",
"postcss": "8.4.47",
"postcss": "8.4.49",
"postcss-import": "~16.1.0",
"postcss-preset-env": "~10.0.8",
"postcss-url": "~10.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,37 +173,35 @@
{{ 'ENUMS.ANNOUNCEMENT_' + col.header + '.' + rowData[col.field] | translate }}
</ng-container>

<ng-container *ngIf="col.field === 'status'">
<span
class="pi"
[class.pi-circle-on]="rowData[col.field] === 'ACTIVE'"
[class.pi-circle-off]="rowData[col.field] === 'INACTIVE'"
[class.pi-circle-off]="rowData[col.field] === 'INACTIVE'"
[class.text-red-600]="rowData['priority'] === 'IMPORTANT'"
[class.text-yellow-600]="rowData['priority'] === 'NORMAL'"
[class.text-blue-600]="rowData['priority'] === 'LOW'"
[attr.aria-label]="'ENUMS.ANNOUNCEMENT_STATUS.' + rowData[col.field] | translate"
[pTooltip]="
('ENUMS.ANNOUNCEMENT_STATUS.' + rowData[col.field] | translate) +
' - ' +
('ENUMS.ANNOUNCEMENT_PRIORITY.' + rowData['priority'] | translate)
"
tooltipPosition="top"
tooltipEvent="hover"
></span>
</ng-container>
<ng-container *ngIf="col.field === 'type'">
<span
class="pi text-xl"
[class.pi-info-circle]="rowData[col.field] === 'INFO'"
[class.pi-calendar]="rowData[col.field] === 'EVENT'"
[class.pi-wrench]="rowData[col.field] === 'SYSTEM_MAINTENANCE'"
[attr.aria-label]="'ENUMS.ANNOUNCEMENT_TYPE.' + rowData[col.field] | translate"
[pTooltip]="'ENUMS.ANNOUNCEMENT_TYPE.' + rowData[col.field] | translate"
tooltipPosition="top"
tooltipEvent="hover"
></span>
</ng-container>
<span
*ngIf="col.field === 'status'"
class="pi"
[class.pi-circle-on]="rowData[col.field] === 'ACTIVE'"
[class.pi-circle-off]="rowData[col.field] === 'INACTIVE'"
[class.pi-circle-off]="rowData[col.field] === 'INACTIVE'"
[class.text-red-600]="rowData['priority'] === 'IMPORTANT'"
[class.text-yellow-600]="rowData['priority'] === 'NORMAL'"
[class.text-blue-600]="rowData['priority'] === 'LOW'"
[attr.aria-label]="'ENUMS.ANNOUNCEMENT_STATUS.' + rowData[col.field] | translate"
[pTooltip]="
('ENUMS.ANNOUNCEMENT_STATUS.' + rowData[col.field] | translate) +
' - ' +
('ENUMS.ANNOUNCEMENT_PRIORITY.' + rowData['priority'] | translate)
"
tooltipPosition="top"
tooltipEvent="hover"
></span>
<span
*ngIf="col.field === 'type'"
class="pi text-xl"
[class.pi-info-circle]="rowData[col.field] === 'INFO'"
[class.pi-calendar]="rowData[col.field] === 'EVENT'"
[class.pi-wrench]="rowData[col.field] === 'SYSTEM_MAINTENANCE'"
[attr.aria-label]="'ENUMS.ANNOUNCEMENT_TYPE.' + rowData[col.field] | translate"
[pTooltip]="'ENUMS.ANNOUNCEMENT_TYPE.' + rowData[col.field] | translate"
tooltipPosition="top"
tooltipEvent="hover"
></span>

<ng-container *ngIf="col.field === 'workspaceName'">
<ng-container *ngIf="!rowData.workspaceName"> {{ 'ANNOUNCEMENT.ALL' | translate }} </ng-container>
Expand Down Expand Up @@ -241,17 +239,17 @@
[resizable]="false"
[dismissableMask]="true"
>
<div class="flex column-gap-3 row-gap-1 justify-content-start align-items-center">
<div *ngIf="item4Delete" class="flex column-gap-3 row-gap-1 justify-content-start align-items-center">
<div class="pi pi-question-circle text-3xl danger-action-text"></div>
<div class="flex flex-column row-gap-2">
<div id="am_announcement_delete_message_text" class="font-bold">
{{ 'ACTIONS.DELETE.MESSAGE.TEXT' | translate }}
</div>
<div id="am_announcement_delete_announcement_title" class="px-5 text-center font-bold danger-action-text">
{{ limitText(item4Delete?.title, 50) }}
{{ limitText(item4Delete.title, 50) }}
</div>
<div class="px-2 flex flex-column row-gap-1">
<div *ngIf="item4Delete?.status === 'ACTIVE'" class="flex flex-row column-gap-2">
<div *ngIf="item4Delete.status === 'ACTIVE'" class="flex flex-row column-gap-2">
<div class="w-4 text-right font-bold">{{ 'ANNOUNCEMENT.STATUS' | translate }}:</div>
<div class="w-8 text-left font-bold danger-action-text" id="am_delete_active">
{{ 'ACTIONS.CONFIRMATION.YES' | translate }}
Expand All @@ -260,27 +258,25 @@
<div class="flex flex-row column-gap-2">
<div class="w-4 text-right font-bold">{{ 'ANNOUNCEMENT.TYPE' | translate }}:</div>
<div class="w-8 text-left" id="am_delete_type">
{{ 'ENUMS.ANNOUNCEMENT_TYPE.' + item4Delete?.type | translate }}
{{ 'ENUMS.ANNOUNCEMENT_TYPE.' + item4Delete.type | translate }}
</div>
</div>
<div class="flex flex-row column-gap-2">
<div class="w-4 text-right font-bold">{{ 'ANNOUNCEMENT.WORKSPACE' | translate }}:</div>
<div class="w-8 text-left white-space-nowrap" id="am_delete_workspace">
<ng-container *ngIf="item4Delete?.workspaceName">
{{ getDisplayName(item4Delete?.workspaceName, metaData.allWorkspaces) }}
</ng-container>
<ng-container *ngIf="!item4Delete?.workspaceName">
{{ 'ANNOUNCEMENT.ALL' | translate }}
<ng-container *ngIf="item4Delete.workspaceName">
{{ getDisplayName(item4Delete.workspaceName, metaData.allWorkspaces) }}
</ng-container>
<ng-container *ngIf="!item4Delete.workspaceName"> {{ 'ANNOUNCEMENT.ALL' | translate }} </ng-container>
</div>
</div>
<div class="flex flex-row column-gap-2">
<div class="w-4 text-right font-bold">{{ 'ANNOUNCEMENT.PRODUCT_NAME' | translate }}:</div>
<div class="w-8 text-left white-space-nowrap" id="am_delete_product_name">
<ng-container *ngIf="item4Delete?.productName">
{{ getDisplayName(item4Delete?.productName, metaData.allProducts) }}
<ng-container *ngIf="item4Delete.productName">
{{ getDisplayName(item4Delete.productName, metaData.allProducts) }}
</ng-container>
<ng-container *ngIf="!item4Delete?.productName"> {{ 'ANNOUNCEMENT.ALL' | translate }} </ng-container>
<ng-container *ngIf="!item4Delete.productName"> {{ 'ANNOUNCEMENT.ALL' | translate }} </ng-container>
</div>
</div>
</div>
Expand Down

0 comments on commit 374bf74

Please sign in to comment.