diff --git a/Cargo.lock b/Cargo.lock index 1d57390..313db91 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2581,7 +2581,7 @@ dependencies = [ [[package]] name = "rustpad" -version = "0.2.85" +version = "0.2.86" dependencies = [ "argon2", "aws-config", diff --git a/Cargo.toml b/Cargo.toml index 7e2be48..05f5f46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustpad" -version = "0.2.85" +version = "0.2.86" edition = "2024" rust-version = "1.94" description = "Collaborative Markdown notepad built with Axum, WebSockets and SQLite, PostgreSQL and MySQL" diff --git a/lang/en.json b/lang/en.json index d71466f..f243532 100644 --- a/lang/en.json +++ b/lang/en.json @@ -434,8 +434,12 @@ "editor.historyLoadFailed": "Could not load version history", "editor.historyRestore": "Restore", "editor.historyRevisionCount.one": "{count} revision", + "editor.historyRevisionCount.few": "{count} revisions", + "editor.historyRevisionCount.many": "{count} revisions", "editor.historyRevisionCount.other": "{count} revisions", "editor.historySavedVersionCount.one": "{count} saved version", + "editor.historySavedVersionCount.few": "{count} saved versions", + "editor.historySavedVersionCount.many": "{count} saved versions", "editor.historySavedVersionCount.other": "{count} saved versions", "editor.historyTitle": "Change history", "editor.historyUnknownAuthor": "Unknown author", diff --git a/src/db/mod.rs b/src/db/mod.rs index 81e1f10..fc97b45 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -375,13 +375,13 @@ pub async fn list_archived_notes( .map(|row| { Ok(ArchivedNote { id: row.try_get("id")?, - slug: row.try_get("slug")?, - title: row.try_get("title")?, - created_at: row.try_get("created_at")?, - updated_at: row.try_get("updated_at")?, - deleted_at: row.try_get("deleted_at")?, + slug: crate::row_decode::text(&row, "slug")?, + title: crate::row_decode::text(&row, "title")?, + created_at: crate::row_decode::text(&row, "created_at")?, + updated_at: crate::row_decode::text(&row, "updated_at")?, + deleted_at: crate::row_decode::text(&row, "deleted_at")?, protected: row.try_get::("protected")? != 0, - created_by: row.try_get("created_by")?, + created_by: crate::row_decode::optional_text(&row, "created_by")?, }) }) .collect()