postit: harmonize main status messages in french

This commit is contained in:
Paul Schneider 2026-09-06 15:47:01 +01:00
commit 5d94270fd8

View file

@ -87,7 +87,7 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
Posts.Add(post); Posts.Add(post);
} }
ApplyFilter(); ApplyFilter();
this.SetInfoStatus($"Loaded {Posts.Count} posts."); this.SetInfoStatus($"{Posts.Count} billet(s) chargé(s).");
}); });
} }
@ -107,7 +107,7 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
// than to send a request the server will reject. // than to send a request the server will reject.
if (string.IsNullOrWhiteSpace(DraftTitle)) if (string.IsNullOrWhiteSpace(DraftTitle))
{ {
this.SetWarningStatus("Title is required."); this.SetWarningStatus("Le titre est obligatoire.");
return; return;
} }
@ -137,7 +137,7 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
if (created is not null) if (created is not null)
{ {
SelectedPost = created; SelectedPost = created;
this.SetInfoStatus($"Created post {created.Id}."); this.SetInfoStatus($"Billet {created.Id} créé.");
} }
} }
else else
@ -153,7 +153,7 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
DateModified = DateTime.UtcNow, DateModified = DateTime.UtcNow,
}; };
await BlogClient!.UpdatePostAsync(SelectedPost.Id, update); await BlogClient!.UpdatePostAsync(SelectedPost.Id, update);
this.SetInfoStatus($"Saved post {SelectedPost.Id}."); this.SetInfoStatus($"Billet {SelectedPost.Id} enregistré.");
} }
await RefreshPostsAsync(); await RefreshPostsAsync();
@ -165,14 +165,14 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
{ {
if (SelectedPost is null || SelectedPost.Id == 0) if (SelectedPost is null || SelectedPost.Id == 0)
{ {
this.SetWarningStatus("Select an existing post before deleting."); this.SetWarningStatus("Sélectionnez un billet existant avant suppression.");
return; return;
} }
await ExecuteAsync(async () => await ExecuteAsync(async () =>
{ {
await BlogClient!.DeletePostAsync(SelectedPost.Id); await BlogClient!.DeletePostAsync(SelectedPost.Id);
this.SetInfoStatus($"Deleted post {SelectedPost.Id}."); this.SetInfoStatus($"Billet {SelectedPost.Id} supprimé.");
SelectedPost = null; SelectedPost = null;
await RefreshPostsAsync(); await RefreshPostsAsync();
}); });
@ -250,7 +250,7 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
{ {
if (SelectedPost is null) if (SelectedPost is null)
{ {
this.SetWarningStatus("Select an existing post before managing ACL."); this.SetWarningStatus("Sélectionnez un billet existant avant de gérer l'ACL.");
return; return;
} }
@ -349,7 +349,7 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
FilteredPosts = new ObservableCollection<BlogPostDto>(); FilteredPosts = new ObservableCollection<BlogPostDto>();
SelectedPost = null; SelectedPost = null;
IsBusy = false; IsBusy = false;
this.SetInfoStatus("Ready"); this.SetInfoStatus("Prêt.");
Settings = settings ?? new Settings(); Settings = settings ?? new Settings();
SearchText = Settings.SearchText; SearchText = Settings.SearchText;
WindowTitle = "PostIt"; WindowTitle = "PostIt";
@ -479,12 +479,12 @@ public partial class MainViewModel : ViewModelBase, IActionStatusViewModel
try try
{ {
IsBusy = true; IsBusy = true;
this.SetInfoStatus("Working..."); this.SetInfoStatus("Traitement en cours...");
await action(); await action();
} }
catch (Exception ex) catch (Exception ex)
{ {
this.SetErrorStatus($"Error: {ex.Message}"); this.SetErrorStatus($"Erreur: {ex.Message}");
} }
finally finally
{ {