mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-06-10 00:02:37 -06:00
Add deletion messages localization and usage
Introduce ErrorDeletingTitle and SuccessfulDeletionMessage localization entries across English, French, German, Spanish, and Ukrainian files and expose corresponding properties in LocalizationManager. Update DashboardViewModel to use these localized strings (SuccessfulDeletionMessage via string.Format and ErrorDeletingTitle) instead of hardcoded messages when notifying the user and showing error dialogs.
This commit is contained in:
parent
f990910865
commit
903bea8814
|
|
@ -152,5 +152,7 @@ public partial class LocalizationManager
|
|||
[nameof(ErrorPullingChannelsTitle)] = "Error pulling channels",
|
||||
[nameof(ErrorExportingTitle)] = "Error exporting channel(s)",
|
||||
[nameof(SuccessfulExportMessage)] = "Successfully exported {0} channel(s)",
|
||||
[nameof(ErrorDeletingTitle)] = "Error deleting messages",
|
||||
[nameof(SuccessfulDeletionMessage)] = "Deleted {0} message(s), {1} failed",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,5 +154,7 @@ public partial class LocalizationManager
|
|||
[nameof(ErrorPullingChannelsTitle)] = "Erreur lors du chargement des canaux",
|
||||
[nameof(ErrorExportingTitle)] = "Erreur lors de l'exportation des canaux",
|
||||
[nameof(SuccessfulExportMessage)] = "{0} canal(-aux) exporté(s) avec succès",
|
||||
[nameof(ErrorDeletingTitle)] = "Erreur lors de la suppression des messages",
|
||||
[nameof(SuccessfulDeletionMessage)] = "{0} message(s) supprimé(s), {1} échec(s)",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,5 +158,7 @@ public partial class LocalizationManager
|
|||
[nameof(ErrorPullingChannelsTitle)] = "Fehler beim Laden der Kanäle",
|
||||
[nameof(ErrorExportingTitle)] = "Fehler beim Exportieren der Kanäle",
|
||||
[nameof(SuccessfulExportMessage)] = "{0} Kanal/-äle erfolgreich exportiert",
|
||||
[nameof(ErrorDeletingTitle)] = "Fehler beim Löschen der Nachrichten",
|
||||
[nameof(SuccessfulDeletionMessage)] = "{0} Nachricht(en) gelöscht, {1} fehlgeschlagen",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,5 +152,7 @@ public partial class LocalizationManager
|
|||
[nameof(ErrorPullingChannelsTitle)] = "Error al cargar canales",
|
||||
[nameof(ErrorExportingTitle)] = "Error al exportar canal(es)",
|
||||
[nameof(SuccessfulExportMessage)] = "{0} canal(es) exportado(s) con éxito",
|
||||
[nameof(ErrorDeletingTitle)] = "Error al eliminar mensajes",
|
||||
[nameof(SuccessfulDeletionMessage)] = "{0} mensaje(s) eliminado(s), {1} fallido(s)",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -151,5 +151,7 @@ public partial class LocalizationManager
|
|||
[nameof(ErrorPullingChannelsTitle)] = "Помилка завантаження каналів",
|
||||
[nameof(ErrorExportingTitle)] = "Помилка експорту каналу(-ів)",
|
||||
[nameof(SuccessfulExportMessage)] = "Успішно експортовано {0} канал(-ів)",
|
||||
[nameof(ErrorDeletingTitle)] = "Помилка видалення повідомлень",
|
||||
[nameof(SuccessfulDeletionMessage)] = "Видалено {0} повідомлення(-ь), {1} не вдалося",
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -162,4 +162,6 @@ public partial class LocalizationManager
|
|||
public string ErrorPullingChannelsTitle => Get();
|
||||
public string ErrorExportingTitle => Get();
|
||||
public string SuccessfulExportMessage => Get();
|
||||
public string ErrorDeletingTitle => Get();
|
||||
public string SuccessfulDeletionMessage => Get();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -430,13 +430,17 @@ public partial class DashboardViewModel : ViewModelBase
|
|||
);
|
||||
|
||||
_snackbarManager.Notify(
|
||||
$"Deleted {totalDeletedCount} message(s), {totalFailedCount} failed"
|
||||
string.Format(
|
||||
LocalizationManager.SuccessfulDeletionMessage,
|
||||
totalDeletedCount,
|
||||
totalFailedCount
|
||||
)
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var dialog = _viewModelManager.GetMessageBoxViewModel(
|
||||
"Error deleting messages",
|
||||
LocalizationManager.ErrorDeletingTitle,
|
||||
ex.ToString()
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue