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

[Fixes 1120] Wrong text for the dashbaord's successfully synced popup #1126

Merged
merged 1 commit into from
Aug 1, 2022
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
6 changes: 3 additions & 3 deletions geonode_mapstore_client/client/js/epics/gnsync.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ const getSyncInfo = (appType, resourceData, successArr = []) => {
* @param {Number} successes length of success arra
* @returns {Object}
*/
const getNotificationInfo = (errors, successes) => {
const getNotificationInfo = (errors, successes, resourceType) => {
let verdict = 'Success';
if (errors > 0 && successes > 0) verdict = 'Warning';
else if (errors === 0 && successes > 0) verdict = 'Success';
else if (errors > 0 && successes === 0) verdict = 'Error';

return {level: verdict.toLowerCase(), title: `gnviewer.sync${verdict}Title`, message: `gnviewer.sync${verdict}Message`};
return {level: verdict.toLowerCase(), title: `gnviewer.sync${verdict}${verdict !== 'Warning' ? resourceType : ''}Title`, message: `gnviewer.sync${verdict}Message`};
};

/**
Expand Down Expand Up @@ -136,7 +136,7 @@ export const gnSyncComponentsWithResources = (action$, store) => action$.ofType(
const updateActions = getUpdateActions();

// notification action into
const {level, title, message} = getNotificationInfo(errorsResponses.length, successResponses.length);
const {level, title, message} = getNotificationInfo(errorsResponses.length, successResponses.length, resourceType);

return Observable.of(
...updateActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@
"deleteStyleMessage": "Möchten Sie diesen Stil wirklich löschen?",
"deleteStyleCancel": "Nein, nicht löschen",
"deleteStyleConfirm": "Ja, ich bin sicher",
"syncErrorTitle": "Die aktuelle GeoStory kann nicht synchronisiert werden",
"syncErrorgeostoryTitle": "Die aktuelle GeoStory kann nicht synchronisiert werden",
"syncErrordashboardTitle": "Kann das aktuelle Dashboard nicht synchronisieren",
"syncErrorDefault": "Netzwerkfehler",
"syncSuccessTitle": "GeoStory synchronisiert",
"syncSuccessgeostoryTitle": "GeoStory synchronisiert",
"syncSuccessdashboardTitle": "Dashboard synchronisiert",
"syncSuccessMessage": "Erfolgreich synchronisiert",
"syncWarningTitle": "Einige Ressourcen konnten nicht synchronisiert werden",
"syncErrorMessage": "Fehler beim Synchronisieren der Ressourcen",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@
"deleteStyleMessage": "Are you sure you want to delete this style?",
"deleteStyleCancel": "No, don't delete it",
"deleteStyleConfirm": "Yes, I'm sure",
"syncErrorTitle": "Cannot sync the current geostory",
"syncErrorgeostoryTitle": "Cannot sync the current geostory",
"syncErrordashboardTitle": "Cannot sync the current dashboard",
"syncErrorDefault": "Network error",
"syncSuccessTitle": "Geostory synced",
"syncSuccessgeostoryTitle": "Geostory synced",
"syncSuccessdashboardTitle": "Dashboard synced",
"syncSuccessMessage": "Synchronized successfully",
"syncWarningTitle": "Could not sync some resources",
"syncErrorMessage": "Failed to sync resources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@
"deleteStyleMessage": "¿Está seguro de que desea eliminar este estilo?",
"deleteStyleCancel": "No, no lo elimines",
"deleteStyleConfirm": "Sí, estoy seguro",
"syncErrorTitle": "No se puede sincronizar la geohistoria actual",
"syncErrorgeostoryTitle": "No se puede sincronizar la geohistoria actual",
"syncErrordashboardTitle": "No se puede sincronizar el tablero actual",
"syncErrorDefault": "Error de red",
"syncSuccessTitle": "Geohistoria sincronizada",
"syncSuccessgeostoryTitle": "Geohistoria sincronizada",
"syncSuccessdashboardTitle": "Panel sincronizado",
"syncSuccessMessage": "Sincronizado correctamente",
"syncWarningTitle": "No se pudieron sincronizar algunos recursos",
"syncErrorMessage": "Error al sincronizar recursos",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@
"deleteStyleMessage": "Voulez-vous vraiment supprimer ce style?",
"deleteStyleCancel": "Non, ne le supprime pas",
"deleteStyleConfirm": "Oui, je suis sûr",
"syncErrorTitle": "Impossible de synchroniser la géohistoire actuelle",
"syncErrorgeostoryTitle": "Impossible de synchroniser la géohistoire actuelle",
"syncErrordashboardTitle": "Impossible de synchroniser le tableau de bord actuel",
"syncErrorDefault": "Erreur réseau",
"syncSuccessTitle": "Géohistoire synchronisée",
"syncSuccessgeostoryTitle": "Géohistoire synchronisée",
"syncSuccessdashboardTitle": "Tableau de bord synchronisé",
"syncSuccessMessage": "Synchronisé avec succès",
"syncWarningTitle": "Impossible de synchroniser certaines ressources",
"syncErrorMessage": "Échec de la synchronisation des ressources",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,11 @@
"deleteStyleMessage": "Sei sicuro di voler eliminare questo stile?",
"deleteStyleCancel": "No, non cancellarlo",
"deleteStyleConfirm": "Si, cancella stile",
"syncErrorTitle": "Impossibile sincronizzare la geostoria attuale",
"syncErrorgeostoryTitle": "Impossibile sincronizzare la geostoria attuale",
"syncErrordashboardTitle": "Impossibile sincronizzare la dashboard corrente",
"syncErrorDefault": "Errore di rete",
"syncSuccessTitle": "Geostoria sincronizzata",
"syncSuccessgeostoryTitle": "Geostoria sincronizzata",
"syncSuccessdashboardTitle": "Dashboard sincronizzato",
"syncSuccessMessage": "Sincronizzato con successo",
"syncWarningTitle": "Impossibile sincronizzare alcune risorse",
"syncErrorMessage": "Impossibile sincronizzare le risorse",
Expand Down