Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #13237: Pastis typo, i18n & UI bugfixes #2202

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ export class MainComponent implements OnInit, OnDestroy {
} else {
// Otherwise we must have an user uploaded profile
this.uploadedProfileResponse.id = null;
this.uploadedProfileResponse.name = 'Nouveau Profil';

this.loaderService.start();
this.profileService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="pastis-edit-profile-header-name">
<div class="text large bold primary">
{{ this.profileService.profileName }}
{{ this.profileService.profileId ? this.profileService.profileName : ('PROFILE.EDIT_PROFILE.NEW_PROFILE' | translate) }}
</div>
<div>
<vitamui-chip [text]="sedaVersionLabel"></vitamui-chip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,15 @@ export class PastisPopupOptionComponent implements OnInit, OnDestroy {
const profileDescription = this.noticeService.puaNotice(retour, result.profileVersion);
this.profileService.createArchivalUnitProfile(profileDescription).subscribe(() => {
this.changeExpand();
this.notificationService.showSuccess('La création de notice a bien été effectué');
this.notificationService.showSuccess(this.translateService.instant('PASTIS_POPUP_OPTION.MODIFICATION_SUCCESS'));
this.profileService.refreshListProfiles();
});
} else if (result.profileType === ProfileType.PA) {
const profile: Profile = this.noticeService.paNotice(retour, result.profileVersion, true);
// STEP 1 : Create Notice
this.profileService.createProfilePa(profile).subscribe(() => {
this.changeExpand();
this.notificationService.showSuccess('La création de notice a bien été effectué');
this.notificationService.showSuccess(this.translateService.instant('PASTIS_POPUP_OPTION.MODIFICATION_SUCCESS'));
this.profileService.refreshListProfiles();
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy {
return action;
}),
tap({
next: () => this.success('La modification du profil a bien été effectué'),
next: () => this.success(this.translateService.instant('PROFILE.LIST_PROFILE.PROFILE_PREVIEW.MODIFICATION_SUCCESS')),
error: (error) => this.displaySnackBar(error),
}),
);
Expand Down Expand Up @@ -336,7 +336,7 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy {
if (this.editProfile) {
return this.archiveProfileSaverService.update(this.profile, this.profileDescription, this.data).pipe(
tap({
next: () => this.success('La modification du profil a bien été effectué'),
next: () => this.success(this.translateService.instant('PROFILE.LIST_PROFILE.PROFILE_PREVIEW.MODIFICATION_SUCCESS')),
error: (error) => {
const message = error?.error?.message || error?.message || 'raison inconnue';
this.notificationService.showError(`La modification du profil a échoué (${message})`);
Expand All @@ -347,7 +347,7 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy {

return this.archiveProfileSaverService.create(this.profile, this.profileDescription, this.data).pipe(
tap({
next: () => this.success('La création du profil a bien été effectué'),
next: () => this.success(this.translateService.instant('PROFILE.LIST_PROFILE.PROFILE_PREVIEW.CREATION_SUCCESS')),
error: (error) => {
const message = error?.error?.message || error?.message || 'raison inconnue';
this.notificationService.showError(`La création du profil a échoué (${message})`);
Expand All @@ -360,15 +360,15 @@ export class UserActionSaveProfileComponent implements OnInit, OnDestroy {
if (this.editProfile) {
return this.archiveUnitProfileSaverService.update(profileDescription, data).pipe(
tap({
next: () => this.success('La modification du profil a bien été effectué'),
next: () => this.success(this.translateService.instant('PROFILE.LIST_PROFILE.PROFILE_PREVIEW.MODIFICATION_SUCCESS')),
error: (error) => this.displaySnackBar(error),
}),
);
}

return this.archiveUnitProfileSaverService.create(profileDescription, data).pipe(
tap({
next: () => this.success('La création du profil a bien été effectué'),
next: () => this.success(this.translateService.instant('PROFILE.LIST_PROFILE.PROFILE_PREVIEW.CREATION_SUCCESS')),
error: (error) => this.displaySnackBar(error),
}),
);
Expand Down
7 changes: 1 addition & 6 deletions ui/ui-frontend/projects/pastis/src/assets/css/_toaster.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,14 @@ button.toast-close-button {
position: relative;
overflow: hidden;
//margin: 0 0 6px;
padding: 15px 15px 15px 50px;
padding: 20px 20px 20px 190px;
width: 300px;
//border-radius: 3px 3px 3px 3px;
background-position: 120px center;
background-repeat: no-repeat;
background-size: 24px;
box-shadow: 0 0 12px #999999;
color: #ffffff;

font-family: Roboto;
font-style: normal;
font-weight: normal;
padding-left: 190px;
}
.toast-container .ngx-toastr:hover {
box-shadow: 0 0 12px #000000;
Expand Down
9 changes: 6 additions & 3 deletions ui/ui-frontend/projects/pastis/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"PASTIS_POPUP_OPTION": {
"OPEN_PROFIL": "Open a profile from my workstation",
"CREATE_NOTICE": "Create a profile notice",
"SEDAVIEW": "View the structure of SEDA 2.1"
"SEDAVIEW": "View the structure of SEDA 2.1",
"CREATION_SUCCESS": "Notice creation successful"
},
"SHARED": {
"PASTIS_POP_UP_METADATA_LANGUAGE": {
Expand Down Expand Up @@ -133,6 +134,7 @@
"POPUP_UPLOAD_CANCEL_LABEL": "Cancel"
},
"EDIT_PROFILE": {
"NEW_PROFILE": "New profile",
"NOTICE_TAB": "Notice",
"ENTETE": "Header",
"REGLES": "Rules",
Expand Down Expand Up @@ -181,8 +183,8 @@
"POPUP_DUPLICATE_TITRE_TWO": "its content and configuration (cardinalities and comments)"
},
"FILE_TREE_METADATA": {
"PUA": "Archiving Unit Profile",
"PA": "Archiving Profile",
"PUA": "Archiving unit profile",
"PA": "Archiving profile",
"SEARCH_PLACEHOLDER": "Find metadata in the table",
"NOTIFICATION_AJOUT_METADONNEE": "ArchiveUnit metadata has been added",
"BOUTON_AJOUT_METADONNEE": "Add metadata",
Expand Down Expand Up @@ -242,6 +244,7 @@
"MODIFIER_PROFIL_TOOLTIP": "Modify the profile",
"LOAD_PROFILE": "Load a profile",
"PROFILE_PREVIEW": {
"CREATION_SUCCESS": "The creation of the profile has been carried out successfully",
"MODIFICATION_SUCCESS": "The modification of the profile has been carried out successfully ",
"MODIFICATION_ERROR": "Failed to edit profile",
"MODIFICATION_ERROR_SEDA_VERSION": "The SEDA version of the imported profile must be the same as the one defined for the notice"
Expand Down
11 changes: 7 additions & 4 deletions ui/ui-frontend/projects/pastis/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"PASTIS_POPUP_OPTION": {
"OPEN_PROFIL": "Ouvrir un profil depuis mon poste",
"CREATE_NOTICE": "Créer une notice de profil",
"SEDAVIEW": "Visualiser la structure du SEDA 2.1"
"SEDAVIEW": "Visualiser la structure du SEDA 2.1",
"CREATION_SUCCESS": "La création de notice a bien été effectuée"
},
"SHARED": {
"PASTIS_POP_UP_METADATA_LANGUAGE": {
Expand Down Expand Up @@ -134,6 +135,7 @@
"POPUP_UPLOAD_CANCEL_LABEL": "Annuler"
},
"EDIT_PROFILE": {
"NEW_PROFILE": "Nouveau profil",
"NOTICE_TAB": "Notice",
"ENTETE": "Entête",
"REGLES": "Règles",
Expand Down Expand Up @@ -182,8 +184,8 @@
"POPUP_DUPLICATE_TITRE_TWO": "son contenu et son paramétrage (cardinalités et commentaire)"
},
"FILE_TREE_METADATA": {
"PUA": "Profil d'Unité Archivistique",
"PA": "Profil d'Archivage",
"PUA": "Profil d'unité archivistique",
"PA": "Profil d'archivage",
"SEARCH_PLACEHOLDER": "Rechercher une métadonnée dans le tableau",
"NOTIFICATION_AJOUT_METADONNEE": "La métadonnée ArchiveUnit a été ajoutée",
"BOUTON_AJOUT_METADONNEE": "Ajouter une métadonnée",
Expand Down Expand Up @@ -243,7 +245,8 @@
"MODIFIER_PROFIL_TOOLTIP": "Modifier le profil",
"LOAD_PROFILE": "Charger un profil",
"PROFILE_PREVIEW": {
"MODIFICATION_SUCCESS": "La modification du profil a bien été effectué",
"CREATION_SUCCESS": "La création du profil a bien été effectuée",
"MODIFICATION_SUCCESS": "La modification du profil a bien été effectuée",
"MODIFICATION_ERROR": "Echec de la modification du profil",
"MODIFICATION_ERROR_SEDA_VERSION": "La version SEDA du profil importé doit être identique à celle de la notice"
}
Expand Down
7 changes: 1 addition & 6 deletions ui/ui-frontend/projects/pastis/src/sass/_toaster.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,14 @@ button.toast-close-button {
position: relative;
overflow: hidden;
//margin: 0 0 6px;
padding: 15px 15px 15px 50px;
padding: 20px 20px 20px 190px;
width: 300px;
//border-radius: 3px 3px 3px 3px;
background-position: 120px center;
background-repeat: no-repeat;
background-size: 24px;
box-shadow: 0 0 12px #999999;
color: #ffffff;

font-family: Roboto;
font-style: normal;
font-weight: normal;
padding-left: 190px;
}
.toast-container .ngx-toastr:hover {
box-shadow: 0 0 12px #000000;
Expand Down