diff --git a/plume-models/src/posts.rs b/plume-models/src/posts.rs index e63d6420..dc54ada4 100644 --- a/plume-models/src/posts.rs +++ b/plume-models/src/posts.rs @@ -32,6 +32,7 @@ use safe_string::SafeString; use std::collections::HashSet; #[derive(Queryable, Identifiable, Serialize, Clone, AsChangeset)] +#[changeset_options(treat_none_as_null = "true")] pub struct Post { pub id: i32, pub blog_id: i32, diff --git a/po/en.po b/po/en.po index 53f1fea6..646e956b 100644 --- a/po/en.po +++ b/po/en.po @@ -614,3 +614,9 @@ msgstr "" msgid "There is currently no article with that tag" msgstr "" + +msgid "Illustration" +msgstr "" + +msgid "None" +msgstr "" diff --git a/po/fr.po b/po/fr.po index 5598b100..a11ea0cd 100644 --- a/po/fr.po +++ b/po/fr.po @@ -630,3 +630,10 @@ msgstr "Cet article n’est pas encore publié." msgid "There is currently no article with that tag" msgstr "Il n'y a pas encore d'article avec ce tag" + +#, fuzzy +msgid "Illustration" +msgstr "Administration" + +msgid "None" +msgstr "" diff --git a/po/gl.po b/po/gl.po index 6d3be754..7c3c0042 100644 --- a/po/gl.po +++ b/po/gl.po @@ -617,3 +617,10 @@ msgstr "Esto é un borrador, non publicar por agora." msgid "There is currently no article with that tag" msgstr "" + +#, fuzzy +msgid "Illustration" +msgstr "Administración" + +msgid "None" +msgstr "" diff --git a/po/it.po b/po/it.po index 65979b15..6f31e568 100644 --- a/po/it.po +++ b/po/it.po @@ -66,8 +66,10 @@ msgstr "Benvenuto su {{ instance_name | escape }}" msgid "Notifications" msgstr "Notifiche" -msgid "Written by {{ link_1 }}{{ url }}{{ link_2 }}{{ name | escape }}{{ link_3 }}" -msgstr "Scritto da {{ link_1 }}{{ url }}{{ link_2 }}{{ name | escape }}{{ link_3 }}" +msgid "" +"Written by {{ link_1 }}{{ url }}{{ link_2 }}{{ name | escape }}{{ link_3 }}" +msgstr "" +"Scritto da {{ link_1 }}{{ url }}{{ link_2 }}{{ name | escape }}{{ link_3 }}" msgid "This article is under the {{ license }} license." msgstr "Questo articolo è rilasciato con licenza {{ license }} ." @@ -131,7 +133,9 @@ msgid "Your Blogs" msgstr "I Tuoi Blogs" msgid "You don't have any blog yet. Create your own, or ask to join one." -msgstr "Non hai ancora nessun blog. Crea il tuo, oppure chiedi di unirti ad uno esistente." +msgstr "" +"Non hai ancora nessun blog. Crea il tuo, oppure chiedi di unirti ad uno " +"esistente." msgid "Start a new blog" msgstr "Inizia un nuovo blog" @@ -250,7 +254,8 @@ msgid "You need to be logged in order to edit your profile" msgstr "Devi effettuare l'accesso per modificare il tuo profilo" msgid "By {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name | escape }}{{ link_4 }}" -msgstr "Per {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name | escape }}{{ link_4 }}" +msgstr "" +"Per {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name | escape }}{{ link_4 }}" msgid "{{ data }} boosted your article" msgstr "{{ data }} ha boostato il tuo articolo" @@ -321,7 +326,9 @@ msgstr[0] "Un autore in questo blog: " msgstr[1] "{{ count }} autori in questo blog: " msgid "Login or use your Fediverse account to interact with this article" -msgstr "Accedi o utilizza un tuo account del Fediverso per interagire con questo articolo" +msgstr "" +"Accedi o utilizza un tuo account del Fediverso per interagire con questo " +"articolo" msgid "Optional" msgstr "Opzionale" @@ -397,8 +404,12 @@ msgstr "Plume è un motore di blog decentralizzato." msgid "Authors can manage various blogs from an unique website." msgstr "Gli autori possono gestire vari blog da un unico sito." -msgid "Articles are also visible on other Plume websites, and you can interact with them directly from other platforms like Mastodon." -msgstr "Gli articoli sono visibili anche da altri siti Plume, e puoi interagire con loro direttamente da altre piattaforme come Mastodon." +msgid "" +"Articles are also visible on other Plume websites, and you can interact with " +"them directly from other platforms like Mastodon." +msgstr "" +"Gli articoli sono visibili anche da altri siti Plume, e puoi interagire con " +"loro direttamente da altre piattaforme come Mastodon." msgid "Create your account" msgstr "Crea il tuo account" @@ -487,8 +498,11 @@ msgstr "File" msgid "Send" msgstr "Invia" -msgid "Sorry, but registrations are closed on this instance. Try to find another one" -msgstr "Scusa, ma le registrazioni sono chiuse su questa istanza. Prova a cercarne un'altra" +msgid "" +"Sorry, but registrations are closed on this instance. Try to find another one" +msgstr "" +"Scusa, ma le registrazioni sono chiuse su questa istanza. Prova a cercarne " +"un'altra" msgid "Subtitle" msgstr "Sottotitolo" @@ -541,8 +555,14 @@ msgstr "Non riusciamo a trovare questa pagina." msgid "Invalid CSRF token." msgstr "Token CSRF non valido." -msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it." -msgstr "Qualcosa è andato storto con il tuo token CSRF. Assicurati di aver abilitato i cookies nel tuo browser, e prova a ricaricare questa pagina. Se l'errore si dovesse ripresentare, per favore segnalacelo." +msgid "" +"Something is wrong with your CSRF token. Make sure cookies are enabled in " +"you browser, and try reloading this page. If you continue to see this error " +"message, please report it." +msgstr "" +"Qualcosa è andato storto con il tuo token CSRF. Assicurati di aver abilitato " +"i cookies nel tuo browser, e prova a ricaricare questa pagina. Se l'errore " +"si dovesse ripresentare, per favore segnalacelo." msgid "Administration of {{ instance.name }}" msgstr "Amministrazione di {{ instance.name }}" @@ -581,13 +601,15 @@ msgid "Danger zone" msgstr "Zona pericolosa" msgid "Be very careful, any action taken here can't be cancelled." -msgstr "Fai molta attenzione, qualsiasi azione fatta qui non può essere annullata." +msgstr "" +"Fai molta attenzione, qualsiasi azione fatta qui non può essere annullata." msgid "Delete your account" msgstr "Elimina il tuo account" msgid "Sorry, but as an admin, you can't leave your instance." -msgstr "Scusa, ma essendo tu un amministratore, non puoi abbandonare la tua istanza." +msgstr "" +"Scusa, ma essendo tu un amministratore, non puoi abbandonare la tua istanza." msgid "Users" msgstr "Utenti" @@ -597,3 +619,10 @@ msgstr "Questo post non è ancora stato pubblicato." msgid "There is currently no article with that tag" msgstr "Attualmente non è ancora presente nessun articolo con quell'etichetta" + +#, fuzzy +msgid "Illustration" +msgstr "Amministrazione" + +msgid "None" +msgstr "" diff --git a/po/nb.po b/po/nb.po index f8bdc537..921070a6 100644 --- a/po/nb.po +++ b/po/nb.po @@ -639,6 +639,13 @@ msgstr "" msgid "There is currently no article with that tag" msgstr "" +#, fuzzy +msgid "Illustration" +msgstr "Administrasjon" + +msgid "None" +msgstr "" + #~ msgid "One reshare" #~ msgid_plural "{{ count }} reshares" #~ msgstr[0] "Én deling" diff --git a/po/pl.po b/po/pl.po index 32277f09..0f3eeff2 100644 --- a/po/pl.po +++ b/po/pl.po @@ -629,6 +629,13 @@ msgstr "Ten wpis nie został jeszcze opublikowany." msgid "There is currently no article with that tag" msgstr "" +#, fuzzy +msgid "Illustration" +msgstr "Administracja" + +msgid "None" +msgstr "" + #~ msgid "One reshare" #~ msgid_plural "{{ count }} reshares" #~ msgstr[0] "Jedno udostępnienie" diff --git a/po/plume.pot b/po/plume.pot index c3ab6764..be7561b4 100644 --- a/po/plume.pot +++ b/po/plume.pot @@ -597,3 +597,9 @@ msgstr "" msgid "There is currently no article with that tag" msgstr "" + +msgid "Illustration" +msgstr "" + +msgid "None" +msgstr "" diff --git a/src/routes/posts.rs b/src/routes/posts.rs index 4b41a1b6..e4f18a61 100644 --- a/src/routes/posts.rs +++ b/src/routes/posts.rs @@ -16,6 +16,7 @@ use plume_models::{ db_conn::DbConn, comments::Comment, instance::Instance, + medias::Media, mentions::Mention, post_authors::*, posts::*, @@ -101,6 +102,7 @@ fn new(blog: String, user: User, conn: DbConn) -> Option