Skip to content

Commit

Permalink
chore(i18n): add translate attribute and run extract
Browse files Browse the repository at this point in the history
somehow mel.dataset.informations is not extracted and keys already translated in gn-ui are extracted
  • Loading branch information
tkohr committed Jan 31, 2024
1 parent 18f3101 commit e8e0727
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
<!-- TODO: create corresponding UI component -->
<div>
<div>mel.dataset.informations</div>
<div translate="">mel.dataset.informations</div>
<div>{{ (facade.metadata$ | async).recordUpdated }}</div>
<div>{{ (facade.metadata$ | async).keywords }}</div>
<div>{{ (facade.metadata$ | async).themes }}</div>
Expand Down Expand Up @@ -117,19 +117,17 @@
<div class="container-lg mx-auto h-[1096px] sm:h-96"></div>
</div>
</div>
} }
<div
class="mt-12 p-4 max-w-[600px] m-auto text-[13px]"
*ngIf="facade.error$ | async as error"
>
} } @else {
<div class="mt-12 p-4 max-w-[600px] m-auto text-[13px]">
@if((facade.error$ | async).notFound) {
<gn-ui-search-results-error
*ngIf="error.notFound"
[type]="errorTypes.RECORD_NOT_FOUND"
[recordId]="(facade.metadata$ | async).uniqueIdentifier"
></gn-ui-search-results-error>
} @else if((facade.error$ | async).otherError) {}
<gn-ui-search-results-error
*ngIf="error.otherError"
[type]="errorTypes.RECEIVED_ERROR"
[error]="error.otherError"
[error]="(facade.error$ | async).otherError"
></gn-ui-search-results-error>
</div>
}
5 changes: 4 additions & 1 deletion apps/datahub/src/assets/i18n/en_MEL.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"mel.common.header.title": "",
"mel.datahub.home.title": "",
"mel.datahub.search.title": ""
"mel.datahub.search.title": "",
"record.metadata.api": "",
"record.metadata.api.form.closeButton": "",
"record.metadata.api.form.title": ""
}
5 changes: 4 additions & 1 deletion apps/datahub/src/assets/i18n/fr_MEL.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"mel.common.header.title": "Data platform",
"mel.datahub.home.title": "Métropole Européenne Lille",
"mel.datahub.search.title": "Catalogue de jeux de données"
"mel.datahub.search.title": "Catalogue de jeux de données",
"record.metadata.api": "",
"record.metadata.api.form.closeButton": "",
"record.metadata.api.form.title": ""
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"e2e:all": "nx run-many --target=e2e",
"e2e:datahub": "nx e2e mel-datahub-e2e",
"e2e:datahub-dev": "nx e2e mel-datahub-e2e --watch",
"i18n:extract": "ngx-translate-extract -s --fi ' ' --input ./apps --output ./apps/datahub/src/assets/i18n/{en_MEL,fr_MEL}.json --clean --format json && npm run format:write"
"i18n:extract": "ngx-translate-extract -s --fi ' ' --input ./apps --output ./apps/datahub/src/assets/i18n/{en_MEL,fr_MEL}.json --clean --format json && npm run format"
},
"private": true,
"dependencies": {
Expand Down

0 comments on commit e8e0727

Please sign in to comment.