diff --git a/plume-models/src/plume_rocket.rs b/plume-models/src/plume_rocket.rs index 64d563c..dbc10bc 100644 --- a/plume-models/src/plume_rocket.rs +++ b/plume-models/src/plume_rocket.rs @@ -6,7 +6,7 @@ mod module { use crate::search; use crate::users; use rocket::{ - request::{self, FromRequest, Request}, + request::{self, FlashMessage, FromRequest, Request}, Outcome, State, }; use scheduled_thread_pool::ScheduledThreadPool; @@ -19,6 +19,7 @@ mod module { pub user: Option, pub searcher: Arc, pub worker: Arc, + pub flash_msg: Option<(String, String)>, } impl<'a, 'r> FromRequest<'a, 'r> for PlumeRocket { @@ -30,10 +31,12 @@ mod module { let user = request.guard::().succeeded(); let worker = request.guard::>>()?; let searcher = request.guard::>>()?; + let flash_msg = request.guard::().succeeded(); Outcome::Success(PlumeRocket { conn, intl, user, + flash_msg: flash_msg.map(|f| (f.name().into(), f.msg().into())), worker: worker.clone(), searcher: searcher.clone(), }) diff --git a/po/plume/ar.po b/po/plume/ar.po index ccf949c..44c3966 100644 --- a/po/plume/ar.po +++ b/po/plume/ar.po @@ -49,6 +49,15 @@ msgstr "لإنشاء مدونة جديدة، تحتاج إلى تسجيل الد msgid "A blog with the same name already exists." msgstr "" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "تمت إعادة تعيين كلمتك السرية بنجاح." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "لا يسمح لك بحذف هذه المدونة." @@ -65,10 +74,56 @@ msgstr "لا يمكنك استخدام هذه الوسائط كأيقونة لل msgid "You can't use this media as a blog banner." msgstr "لا يمكنك استخدام هذه الوسائط كشعار للمدونة." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "ليس لديك أية وسائط بعد." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "ليس لديك أية وسائط بعد." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "يجب عليك تسجيل الدخول أولا للإعجاب بهذا المقال" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "لا يسمح لك بحذف هذه المدونة." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "لا يسمح لك بتعديل هذه المدونة." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "يجب عليك تسجيل الدخول أولا لعرض الإشعارات" @@ -93,6 +148,34 @@ msgstr "منشور جديد" msgid "Edit {0}" msgstr "تعديل {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "لا يسمح لك بتعديل هذه المدونة." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "ليس لديك أية وسائط بعد." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "لا يسمح لك بحذف هذه المدونة." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -103,6 +186,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +#, fuzzy +msgid "You are now connected." +msgstr "ليست لديك التصريحات اللازمة للقيام بذلك." + +#, fuzzy +msgid "You are now logged off." +msgstr "ليست لديك التصريحات اللازمة للقيام بذلك." + # src/routes/session.rs:181 msgid "Password reset" msgstr "إعادة تعيين كلمة المرور" @@ -123,6 +214,14 @@ msgstr "عذراً، ولكن انتهت مدة صلاحية الرابط. حا msgid "To access your dashboard, you need to be logged in" msgstr "يجب عليك تسجيل الدخول أولاللنفاذ إلى لوح المراقبة" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -131,6 +230,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "ليس لديك أية وسائط بعد." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/bg.po b/po/plume/bg.po index 494c7f8..71303c6 100644 --- a/po/plume/bg.po +++ b/po/plume/bg.po @@ -48,6 +48,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "Вече съществува блог със същото име." +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -64,10 +72,56 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Вие не сте автор на този блог." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Вие не сте автор на този блог." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -92,6 +146,34 @@ msgstr "Нова публикация" msgid "Edit {0}" msgstr "" +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Вие не сте автор на този блог." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Вие не сте автор на този блог." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +184,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +#, fuzzy +msgid "You are now connected." +msgstr "Не сте упълномощени." + +#, fuzzy +msgid "You are now logged off." +msgstr "Не сте упълномощени." + # src/routes/session.rs:181 msgid "Password reset" msgstr "" @@ -122,6 +212,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -130,6 +228,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Pluma" diff --git a/po/plume/ca.po b/po/plume/ca.po index 5fac995..45d248b 100644 --- a/po/plume/ca.po +++ b/po/plume/ca.po @@ -48,6 +48,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -64,10 +72,54 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/medias.rs:145 +msgid "You are not allowed to delete this media." +msgstr "" + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/medias.rs:156 +msgid "You are not allowed to use this media." +msgstr "" + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -92,6 +144,32 @@ msgstr "Apunt nou" msgid "Edit {0}" msgstr "" +# src/routes/posts.rs:264 +msgid "You are not allowed to publish on this blog." +msgstr "" + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:565 +msgid "You are not allowed to delete this article." +msgstr "" + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +180,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "Reinicialització de contrasenya" @@ -122,6 +208,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -130,6 +224,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" diff --git a/po/plume/cs.po b/po/plume/cs.po index 19bbcca..b37a8ac 100644 --- a/po/plume/cs.po +++ b/po/plume/cs.po @@ -48,6 +48,15 @@ msgstr "Pro vytvoření nového blogu musíte být přihlášeni" msgid "A blog with the same name already exists." msgstr "Blog s rovnakým názvem již existuje." +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Vaše heslo bylo úspěšně obnoveno." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Nemáte oprávnění zmazat tento blog." @@ -64,10 +73,56 @@ msgstr "Toto médium nelze použít jako ikonu blogu." msgid "You can't use this media as a blog banner." msgstr "Toto médium nelze použít jako banner blogu." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Zatím nemáte nahrané žádné média." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Zatím nemáte nahrané žádné média." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Pro oblíbení příspěvku musíte být přihlášen/a" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Nemáte oprávnění zmazat tento blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Nemáte oprávnění upravovat tento blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Pokud chcete vidět vaše notifikace, musíte být přihlášeni" @@ -92,6 +147,34 @@ msgstr "Nový příspěvek" msgid "Edit {0}" msgstr "Upravit {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Nemáte oprávnění upravovat tento blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Zatím nemáte nahrané žádné média." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Nemáte oprávnění zmazat tento blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -104,6 +187,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Pro sdílení příspěvku musíte být přihlášeni" +#, fuzzy +msgid "You are now connected." +msgstr "Nemáte oprávnění." + +#, fuzzy +msgid "You are now logged off." +msgstr "Nemáte oprávnění." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Obnovit heslo" @@ -124,6 +215,14 @@ msgstr "Omlouváme se, ale odkaz vypršel. Zkuste to znovu" msgid "To access your dashboard, you need to be logged in" msgstr "Pro přístup k vaší nástěnce musíte být přihlášen/a" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Chcete-li někoho odebírat, musíte být přihlášeni" @@ -132,6 +231,27 @@ msgstr "Chcete-li někoho odebírat, musíte být přihlášeni" msgid "To edit your profile, you need to be logged in" msgstr "Pro úpravu vášho profilu musíte být přihlášeni" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Zatím nemáte nahrané žádné média." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/de.po b/po/plume/de.po index a88425f..41c4368 100644 --- a/po/plume/de.po +++ b/po/plume/de.po @@ -48,6 +48,15 @@ msgstr "Um einen neuen Blog zu erstellen, müssen Sie angemeldet sein" msgid "A blog with the same name already exists." msgstr "" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Dein Passwort wurde erfolgreich zurückgesetzt." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Sie dürfen diesen Blog nicht löschen." @@ -64,10 +73,56 @@ msgstr "Sie können dieses Medium nicht als ein Blog-Icon verwenden." msgid "You can't use this media as a blog banner." msgstr "Sie können dieses Medium nicht als einen Blog-Banner verwenden." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Du hast noch keine Medien." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Du hast noch keine Medien." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Um einen Beitrag zu liken, musst du angemeldet sein" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Sie dürfen diesen Blog nicht löschen." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Ihnen fehlt die Berechtigung, um diesen Blog zu bearbeiten." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Um Ihre Benachrichtigungen zu sehen, müssen Sie angemeldet sein" @@ -92,6 +147,34 @@ msgstr "Neuer Beitrag" msgid "Edit {0}" msgstr "Bearbeite {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Ihnen fehlt die Berechtigung, um diesen Blog zu bearbeiten." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Du hast noch keine Medien." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Sie dürfen diesen Blog nicht löschen." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Um einen Beitrag zu wiederholen, musst du angemeldet sein" +#, fuzzy +msgid "You are now connected." +msgstr "Nicht berechtigt." + +#, fuzzy +msgid "You are now logged off." +msgstr "Nicht berechtigt." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Passwort zurücksetzen" @@ -122,6 +213,14 @@ msgstr "Entschuldigung, der Link ist abgelaufen. Versuche es erneut" msgid "To access your dashboard, you need to be logged in" msgstr "Um auf dein Dashboard zuzugreifen, musst du angemeldet sein" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Um jemanden zu abonnieren, musst du angemeldet sein" @@ -130,6 +229,27 @@ msgstr "Um jemanden zu abonnieren, musst du angemeldet sein" msgid "To edit your profile, you need to be logged in" msgstr "Um dein Profil zu bearbeiten, musst du angemeldet sein" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Du hast noch keine Medien." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/en.po b/po/plume/en.po index eb62313..fe891a7 100644 --- a/po/plume/en.po +++ b/po/plume/en.po @@ -48,6 +48,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -64,10 +72,54 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/medias.rs:145 +msgid "You are not allowed to delete this media." +msgstr "" + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/medias.rs:156 +msgid "You are not allowed to use this media." +msgstr "" + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -92,6 +144,32 @@ msgstr "" msgid "Edit {0}" msgstr "" +# src/routes/posts.rs:264 +msgid "You are not allowed to publish on this blog." +msgstr "" + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:565 +msgid "You are not allowed to delete this article." +msgstr "" + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +180,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "" @@ -122,6 +208,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -130,6 +224,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" diff --git a/po/plume/eo.po b/po/plume/eo.po index d444f47..e5075f0 100644 --- a/po/plume/eo.po +++ b/po/plume/eo.po @@ -48,6 +48,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -64,10 +72,56 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Vi ne estas permesita redakti ĉi tiun blogon." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Vi ne estas permesita redakti ĉi tiun blogon." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -92,6 +146,34 @@ msgstr "Nova skribaĵo" msgid "Edit {0}" msgstr "" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Vi ne estas permesita redakti ĉi tiun blogon." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Vi ne estas permesita redakti ĉi tiun blogon." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +184,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "" @@ -122,6 +212,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -130,6 +228,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" diff --git a/po/plume/es.po b/po/plume/es.po index 87beeb7..86ec256 100644 --- a/po/plume/es.po +++ b/po/plume/es.po @@ -48,6 +48,15 @@ msgstr "Para crear un nuevo blog, necesita estar logueado" msgid "A blog with the same name already exists." msgstr "" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Su contraseña se ha restablecido correctamente." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "No está autorizado a eliminar este registro." @@ -64,10 +73,56 @@ msgstr "No puede usar este medio como icono del blog." msgid "You can't use this media as a blog banner." msgstr "No puede usar este medio como bandera del blog." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Todavía no tiene ningún medio." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Todavía no tiene ningún medio." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Para darle un Me Gusta a un artículo, necesita estar conectado" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "No está autorizado a eliminar este registro." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "No tiene permiso para editar este blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Para ver tus notificaciones, necesitas estar conectado" @@ -92,6 +147,34 @@ msgstr "Nueva publicación" msgid "Edit {0}" msgstr "Editar {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "No tiene permiso para editar este blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Todavía no tiene ningún medio." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "No está autorizado a eliminar este registro." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Para compartir un artículo, necesita estar logueado" +#, fuzzy +msgid "You are now connected." +msgstr "No está autorizado." + +#, fuzzy +msgid "You are now logged off." +msgstr "No está autorizado." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Reiniciar contraseña" @@ -122,6 +213,14 @@ msgstr "Lo sentimos, pero el enlace expiró. Inténtalo de nuevo" msgid "To access your dashboard, you need to be logged in" msgstr "Para acceder a su panel de control, necesita estar conectado" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Para suscribirse a alguien, necesita estar conectado" @@ -130,6 +229,27 @@ msgstr "Para suscribirse a alguien, necesita estar conectado" msgid "To edit your profile, you need to be logged in" msgstr "Para editar su perfil, necesita estar conectado" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Todavía no tiene ningún medio." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/fr.po b/po/plume/fr.po index b0a8a0b..445ac60 100644 --- a/po/plume/fr.po +++ b/po/plume/fr.po @@ -48,6 +48,15 @@ msgstr "Vous devez vous connecter pour créer un nouveau blog" msgid "A blog with the same name already exists." msgstr "Un blog avec le même nom existe déjà." +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Votre mot de passe a été réinitialisé avec succès." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Vous n'êtes pas autorisé⋅e à supprimer ce blog." @@ -64,10 +73,56 @@ msgstr "Vous ne pouvez pas utiliser ce media comme icône de blog." msgid "You can't use this media as a blog banner." msgstr "Vous ne pouvez pas utiliser ce media comme illustration de blog." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Vous n'avez pas encore de média." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Vous n'avez pas encore de média." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Vous devez vous connecter pour aimer un article" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Vous n'êtes pas autorisé⋅e à supprimer ce blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Vous n'êtes pas autorisé à éditer ce blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Vous devez vous connecter pour voir vos notifications" @@ -92,6 +147,34 @@ msgstr "Nouvel article" msgid "Edit {0}" msgstr "Modifier {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Vous n'êtes pas autorisé à éditer ce blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Vous n'avez pas encore de média." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Vous n'êtes pas autorisé⋅e à supprimer ce blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Vous devez vous connecter pour partager un article" +#, fuzzy +msgid "You are now connected." +msgstr "Vous n’avez pas les droits." + +#, fuzzy +msgid "You are now logged off." +msgstr "Vous n’avez pas les droits." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Réinitialisation du mot de passe" @@ -122,6 +213,14 @@ msgstr "Désolé, mais le lien a expiré. Réessayez" msgid "To access your dashboard, you need to be logged in" msgstr "Vous devez vous connecter pour accéder à votre tableau de bord" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Vous devez vous connecter pour vous abonner à quelqu'un" @@ -130,6 +229,27 @@ msgstr "Vous devez vous connecter pour vous abonner à quelqu'un" msgid "To edit your profile, you need to be logged in" msgstr "Vous devez vous connecter pour pour modifier votre profil" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Vous n'avez pas encore de média." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/gl.po b/po/plume/gl.po index 68e0f42..717d5d9 100644 --- a/po/plume/gl.po +++ b/po/plume/gl.po @@ -48,6 +48,15 @@ msgstr "Para crear un novo blog debe estar conectada" msgid "A blog with the same name already exists." msgstr "" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "O contrasinal restableceuse correctamente." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Vostede non ten permiso para eliminar este blog." @@ -64,10 +73,56 @@ msgstr "Vostede non pode utilizar este medio como icona do blog." msgid "You can't use this media as a blog banner." msgstr "Vostede non pode utilizar este medio como banner do blog." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Aínda non subeu ficheiros de medios." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Aínda non subeu ficheiros de medios." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Para darlle a gústame, debe estar conectada" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Vostede non ten permiso para eliminar este blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Vostede non pode editar este blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Para ver as súas notificacións, debe estar conectada" @@ -92,6 +147,34 @@ msgstr "Nova entrada" msgid "Edit {0}" msgstr "Editar {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Vostede non pode editar este blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Aínda non subeu ficheiros de medios." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Vostede non ten permiso para eliminar este blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Para compartir un artigo, debe estar conectada" +#, fuzzy +msgid "You are now connected." +msgstr "Non ten permiso." + +#, fuzzy +msgid "You are now logged off." +msgstr "Non ten permiso." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Restablecer contrasinal" @@ -122,6 +213,14 @@ msgstr "Lamentámolo, a ligazón caducou. Inténteo de novo" msgid "To access your dashboard, you need to be logged in" msgstr "Para acceder ao taboleiro, debe estar conectada" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Para suscribirse a un blog, debe estar conectada" @@ -130,6 +229,27 @@ msgstr "Para suscribirse a un blog, debe estar conectada" msgid "To edit your profile, you need to be logged in" msgstr "Para editar o seu perfil, debe estar conectada" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Aínda non subeu ficheiros de medios." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/hi.po b/po/plume/hi.po index 3109b81..5181dfa 100644 --- a/po/plume/hi.po +++ b/po/plume/hi.po @@ -48,6 +48,15 @@ msgstr "नया ब्लॉग बनाने के लिए आपको msgid "A blog with the same name already exists." msgstr "ये नाम से पहले ही एक ब्लॉग है" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "आपका पासवर्ड रिसेट कर दिया गया है" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "आपको ये ब्लॉग डिलीट करने की अनुमति नहीं है" @@ -64,10 +73,56 @@ msgstr "इस फोटो को ब्लॉग आइकॉन के लि msgid "You can't use this media as a blog banner." msgstr "इस media को blog banner के लिए इस्तेमाल नहीं कर सकते" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Post को like करने के लिए आपको log in करना होगा" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "आपको ये ब्लॉग डिलीट करने की अनुमति नहीं है" + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "आपको ये ब्लॉग में बदलाव करने की अनुमति नहीं है" + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Notifications देखने के लिए आपको log in करना होगा" @@ -92,6 +147,34 @@ msgstr "नया post" msgid "Edit {0}" msgstr "Edit करें {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "आपको ये ब्लॉग में बदलाव करने की अनुमति नहीं है" + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "आपको ये ब्लॉग डिलीट करने की अनुमति नहीं है" + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -104,6 +187,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Post reshare करने के लिए आपको log in करना होगा" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "पासवर्ड रीसेट करें" @@ -124,6 +215,14 @@ msgstr "क्षमा करें, लेकिन लिंक इस्त msgid "To access your dashboard, you need to be logged in" msgstr "डैशबोर्ड पर जाने के लिए, लोग इन करें" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "सब्सक्राइब करने के लिए, लोग इन करें" @@ -132,6 +231,27 @@ msgstr "सब्सक्राइब करने के लिए, लोग msgid "To edit your profile, you need to be logged in" msgstr "प्रोफाइल में बदलाव करने के लिए, लोग इन करें" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "प्लूम" diff --git a/po/plume/hr.po b/po/plume/hr.po index fec23c5..c5110e3 100644 --- a/po/plume/hr.po +++ b/po/plume/hr.po @@ -49,6 +49,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -65,10 +73,56 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Ti ne autor ovog bloga." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Ti ne autor ovog bloga." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -93,6 +147,34 @@ msgstr "Novi članak" msgid "Edit {0}" msgstr "Uredi {0}" +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Ti ne autor ovog bloga." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:140 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Ti ne autor ovog bloga." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -103,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "Poništavanje zaporke" @@ -123,6 +213,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -131,6 +229,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/it.po b/po/plume/it.po index e51927c..a463eb3 100644 --- a/po/plume/it.po +++ b/po/plume/it.po @@ -48,6 +48,15 @@ msgstr "Per creare un nuovo blog, devi avere effettuato l'accesso" msgid "A blog with the same name already exists." msgstr "Un blog con lo stesso nome esiste già." +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "La tua password è stata reimpostata con successo." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Non ti è consentito di eliminare questo blog." @@ -64,10 +73,56 @@ msgstr "Non puoi utilizzare questo media come icona del blog." msgid "You can't use this media as a blog banner." msgstr "Non puoi utilizzare questo media come copertina del blog." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Non hai ancora nessun media." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Non hai ancora nessun media." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Per mettere mi piace ad un post, devi avere effettuato l'accesso" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Non ti è consentito di eliminare questo blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Non ti è consentito modificare questo blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Per vedere le tue notifiche, devi avere effettuato l'accesso" @@ -92,6 +147,34 @@ msgstr "Nuovo post" msgid "Edit {0}" msgstr "Modifica {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Non ti è consentito modificare questo blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Non hai ancora nessun media." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Non ti è consentito di eliminare questo blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Per ricondividere un post, devi avere effettuato l'accesso" +#, fuzzy +msgid "You are now connected." +msgstr "Non sei autorizzato." + +#, fuzzy +msgid "You are now logged off." +msgstr "Non sei autorizzato." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Reimposta password" @@ -122,6 +213,14 @@ msgstr "Spiacente, ma il collegamento è scaduto. Riprova" msgid "To access your dashboard, you need to be logged in" msgstr "Per accedere al tuo pannello, devi avere effettuato l'accesso" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Per iscriverti a qualcuno, devi avere effettuato l'accesso" @@ -130,6 +229,27 @@ msgstr "Per iscriverti a qualcuno, devi avere effettuato l'accesso" msgid "To edit your profile, you need to be logged in" msgstr "Per modificare il tuo profilo, devi avere effettuato l'accesso" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Non hai ancora nessun media." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/ja.po b/po/plume/ja.po index c312c72..6c8445e 100644 --- a/po/plume/ja.po +++ b/po/plume/ja.po @@ -48,6 +48,15 @@ msgstr "新しいブログを作成するにはログインが必要です" msgid "A blog with the same name already exists." msgstr "" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "パスワードが正常にリセットされました。" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "このブログを削除する権限がありません。" @@ -64,10 +73,56 @@ msgstr "このメディアはブログアイコンに使用できません。" msgid "You can't use this media as a blog banner." msgstr "このメディアはブログバナーに使用できません。" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "メディアがまだありません。" + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "メディアがまだありません。" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "投稿をいいねするにはログインが必要です" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "このブログを削除する権限がありません。" + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "このブログを編集する権限がありません。" + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "通知を表示するにはログインが必要です" @@ -92,6 +147,34 @@ msgstr "新しい投稿" msgid "Edit {0}" msgstr "{0} を編集" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "このブログを編集する権限がありません。" + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "メディアがまだありません。" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "このブログを削除する権限がありません。" + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +185,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "投稿を再共有するにはログインが必要です" +#, fuzzy +msgid "You are now connected." +msgstr "許可されていません。" + +#, fuzzy +msgid "You are now logged off." +msgstr "許可されていません。" + # src/routes/session.rs:181 msgid "Password reset" msgstr "パスワードのリセット" @@ -123,6 +214,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "ダッシュボードにアクセスするにはログインが必要です" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "誰かをフォローするにはログインが必要です" @@ -131,6 +230,27 @@ msgstr "誰かをフォローするにはログインが必要です" msgid "To edit your profile, you need to be logged in" msgstr "プロフィールを編集するにはログインが必要です" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "メディアがまだありません。" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/nb.po b/po/plume/nb.po index a0c428b..22ff4b3 100644 --- a/po/plume/nb.po +++ b/po/plume/nb.po @@ -46,6 +46,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "Et innlegg med samme navn finnes allerede." +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + #, fuzzy msgid "You are not allowed to delete this blog." msgstr "Du er ikke denne bloggens forfatter." @@ -62,10 +70,54 @@ msgstr "Du er ikke denne bloggens forfatter." msgid "You can't use this media as a blog banner." msgstr "Du er ikke denne bloggens forfatter." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:47 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Du er ikke denne bloggens forfatter." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Du er ikke denne bloggens forfatter." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -89,6 +141,32 @@ msgstr "Nytt innlegg" msgid "Edit {0}" msgstr "Kommentér \"{0}\"" +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Du er ikke denne bloggens forfatter." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Du er ikke denne bloggens forfatter." + +#, fuzzy +msgid "Your article have been deleted." +msgstr "Ingen innlegg å vise enda." + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/user.rs:222 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -99,6 +177,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +#, fuzzy +msgid "You are now connected." +msgstr "Det har du har ikke tilgang til." + +#, fuzzy +msgid "You are now logged off." +msgstr "Det har du har ikke tilgang til." + #, fuzzy msgid "Password reset" msgstr "Passord" @@ -119,6 +205,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +#, fuzzy +msgid "You are now following {}." +msgstr "{0} har begynt å følge deg" + # src/routes/user.rs:187 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -127,6 +221,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" @@ -948,10 +1063,6 @@ msgstr "" #~ msgid "{0}'s followers" #~ msgstr "Én følger" -#, fuzzy -#~ msgid "{0} is now following you." -#~ msgstr "{0} har begynt å følge deg" - #, fuzzy #~ msgid "People {0} follows" #~ msgstr "Én følger" @@ -966,10 +1077,6 @@ msgstr "" #~ msgid "Unfollow" #~ msgstr "Slutt å følge" -#, fuzzy -#~ msgid "No articles to see here yet." -#~ msgstr "Ingen innlegg å vise enda." - #~ msgid "New blog" #~ msgstr "Ny blogg" diff --git a/po/plume/pl.po b/po/plume/pl.po index 682ebc3..9e28f6f 100644 --- a/po/plume/pl.po +++ b/po/plume/pl.po @@ -50,6 +50,15 @@ msgstr "Aby utworzyć nowy blog, musisz być zalogowany" msgid "A blog with the same name already exists." msgstr "Blog o tej samej nazwie już istnieje." +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Twoje hasło zostało pomyślnie zresetowane." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Nie masz uprawnień do usunięcia tego bloga." @@ -66,10 +75,56 @@ msgstr "Nie możesz użyć tego nośnika jako ikony blogu." msgid "You can't use this media as a blog banner." msgstr "Nie możesz użyć tego nośnika jako banner na blogu." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Nie masz żadnej zawartości multimedialnej." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Nie masz żadnej zawartości multimedialnej." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Aby polubić post, musisz być zalogowany" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Nie masz uprawnień do usunięcia tego bloga." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Nie masz uprawnień edytować tego bloga." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Aby zobaczyć powiadomienia, musisz być zalogowany" @@ -94,6 +149,34 @@ msgstr "Nowy wpis" msgid "Edit {0}" msgstr "Edytuj {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Nie masz uprawnień edytować tego bloga." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Nie masz żadnej zawartości multimedialnej." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Nie masz uprawnień do usunięcia tego bloga." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -104,6 +187,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Aby udostępnić post, musisz być zalogowany" +#, fuzzy +msgid "You are now connected." +msgstr "Nie jesteś zalogowany." + +#, fuzzy +msgid "You are now logged off." +msgstr "Nie jesteś zalogowany." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Resetowanie hasła" @@ -124,6 +215,14 @@ msgstr "Przepraszam, ale link wygasł. Spróbuj ponownie" msgid "To access your dashboard, you need to be logged in" msgstr "Aby uzyskać dostęp do panelu, musisz być zalogowany" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Aby subskrybować do kogoś, musisz być zalogowany" @@ -132,6 +231,27 @@ msgstr "Aby subskrybować do kogoś, musisz być zalogowany" msgid "To edit your profile, you need to be logged in" msgstr "Aby edytować swój profil, musisz być zalogowany" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Nie masz żadnej zawartości multimedialnej." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/plume.pot b/po/plume/plume.pot index d9d10d7..f69c21a 100644 --- a/po/plume/plume.pot +++ b/po/plume/plume.pot @@ -12,59 +12,111 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -# src/template_utils.rs:68 +# src/template_utils.rs:102 msgid "{0} commented on your article." msgstr "" -# src/template_utils.rs:69 +# src/template_utils.rs:103 msgid "{0} is subscribed to you." msgstr "" -# src/template_utils.rs:70 +# src/template_utils.rs:104 msgid "{0} liked your article." msgstr "" -# src/template_utils.rs:71 +# src/template_utils.rs:105 msgid "{0} mentioned you." msgstr "" -# src/template_utils.rs:72 +# src/template_utils.rs:106 msgid "{0} boosted your article." msgstr "" -# src/template_utils.rs:108 +# src/template_utils.rs:142 msgid "{0}'s avatar" msgstr "" -# src/routes/blogs.rs:70 +# src/routes/blogs.rs:64 msgid "To create a new blog, you need to be logged in" msgstr "" -# src/routes/blogs.rs:109 +# src/routes/blogs.rs:106 msgid "A blog with the same name already exists." msgstr "" -# src/routes/blogs.rs:172 +# src/routes/blogs.rs:141 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:163 +msgid "Your blog was deleted." +msgstr "" + +# src/routes/blogs.rs:170 msgid "You are not allowed to delete this blog." msgstr "" -# src/routes/blogs.rs:217 +# src/routes/blogs.rs:218 msgid "You are not allowed to edit this blog." msgstr "" -# src/routes/blogs.rs:262 +# src/routes/blogs.rs:263 msgid "You can't use this media as a blog icon." msgstr "" -# src/routes/blogs.rs:280 +# src/routes/blogs.rs:281 msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:314 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:94 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:169 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:134 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:175 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:177 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:221 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" -# src/routes/notifications.rs:29 +# src/routes/medias.rs:141 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/medias.rs:146 +msgid "You are not allowed to delete this media." +msgstr "" + +# src/routes/medias.rs:163 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/medias.rs:168 +msgid "You are not allowed to use this media." +msgstr "" + +# src/routes/notifications.rs:28 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -76,19 +128,43 @@ msgstr "" msgid "To write a new post, you need to be logged in" msgstr "" -# src/routes/posts.rs:140 +# src/routes/posts.rs:139 msgid "You are not an author of this blog." msgstr "" -# src/routes/posts.rs:147 +# src/routes/posts.rs:146 msgid "New post" msgstr "" -# src/routes/posts.rs:192 +# src/routes/posts.rs:191 msgid "Edit {0}" msgstr "" -# src/routes/posts.rs:630 +# src/routes/posts.rs:260 +msgid "You are not allowed to publish on this blog." +msgstr "" + +# src/routes/posts.rs:348 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:528 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:568 +msgid "You are not allowed to delete this article." +msgstr "" + +# src/routes/posts.rs:593 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:598 +msgid "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?" +msgstr "" + +# src/routes/posts.rs:638 msgid "Couldn't obtain enough information about your account. Please make sure your username is correct." msgstr "" @@ -96,19 +172,27 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" -# src/routes/session.rs:181 +# src/routes/session.rs:112 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:131 +msgid "You are now logged off." +msgstr "" + +# src/routes/session.rs:188 msgid "Password reset" msgstr "" -# src/routes/session.rs:182 +# src/routes/session.rs:189 msgid "Here is the link to reset your password: {0}" msgstr "" -# src/routes/session.rs:259 +# src/routes/session.rs:264 msgid "Your password was successfully reset." msgstr "" -# src/routes/session.rs:263 +# src/routes/session.rs:274 msgid "Sorry, but the link expired. Try again" msgstr "" @@ -116,14 +200,42 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" -# src/routes/user.rs:244 +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:175 +msgid "You are now following {}." +msgstr "" + +# src/routes/user.rs:255 msgid "To subscribe to someone, you need to be logged in" msgstr "" -# src/routes/user.rs:344 +# src/routes/user.rs:357 msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:399 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:426 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:432 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:504 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:528 +msgid "Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" @@ -208,11 +320,11 @@ msgstr "" msgid "Nothing to see here yet. Try subscribing to more people." msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Name" msgstr "" -# src/template_utils.rs:220 +# src/template_utils.rs:254 msgid "Optional" msgstr "" @@ -228,7 +340,7 @@ msgstr "" msgid "Long description" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Default article license" msgstr "" @@ -274,11 +386,11 @@ msgstr "" msgid "Upload an avatar" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Display name" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Email" msgstr "" @@ -327,15 +439,15 @@ msgstr "" msgid "Create an account" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Username" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Password" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Password confirmation" msgstr "" @@ -426,71 +538,71 @@ msgstr "" msgid "Advanced search" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Article title matching these words" msgstr "" msgid "Title" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Subtitle matching these words" msgstr "" msgid "Subtitle - byline" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Content matching these words" msgstr "" msgid "Body content" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "From this date" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "To this date" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Containing these tags" msgstr "" msgid "Tags" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Posted on one of these instances" msgstr "" msgid "Instance domain" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Posted by one of these authors" msgstr "" msgid "Authors" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Posted on one of these blogs" msgstr "" msgid "Blog title" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Written in this language" msgstr "" msgid "Language" msgstr "" -# src/template_utils.rs:305 +# src/template_utils.rs:339 msgid "Published under this license" msgstr "" @@ -512,11 +624,11 @@ msgstr "" msgid "Reset your password" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "New password" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Confirmation" msgstr "" @@ -529,7 +641,7 @@ msgstr "" msgid "We sent a mail to the address you gave us, with a link to reset your password." msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "E-mail" msgstr "" @@ -539,7 +651,7 @@ msgstr "" msgid "Log in" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Username, or email" msgstr "" @@ -558,7 +670,7 @@ msgstr "" msgid "Classic editor (any changes will be lost)" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Subtitle" msgstr "" @@ -571,15 +683,15 @@ msgstr "" msgid "Upload media" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Tags, separated by commas" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "License" msgstr "" -# src/template_utils.rs:225 +# src/template_utils.rs:259 msgid "Leave it empty to reserve all rights" msgstr "" @@ -639,7 +751,7 @@ msgstr "" msgid "Comments" msgstr "" -# src/template_utils.rs:217 +# src/template_utils.rs:251 msgid "Content warning" msgstr "" @@ -746,7 +858,7 @@ msgstr "" msgid "I'm from another instance" msgstr "" -# src/template_utils.rs:225 +# src/template_utils.rs:259 msgid "Example: user@plu.me" msgstr "" diff --git a/po/plume/pt.po b/po/plume/pt.po index 97cfc0c..8e12742 100644 --- a/po/plume/pt.po +++ b/po/plume/pt.po @@ -48,6 +48,15 @@ msgstr "Para criar um novo blog, você precisa estar logado" msgid "A blog with the same name already exists." msgstr "Um blog com o mesmo nome já existe." +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "A sua palavra-passe foi redefinida com sucesso." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Não está autorizado a apagar este blog." @@ -64,10 +73,56 @@ msgstr "Você não pode usar esta mídia como um ícone do blog." msgid "You can't use this media as a blog banner." msgstr "Você não pode usar esta mídia como um banner do blog." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Você ainda não tem nenhuma mídia." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Você ainda não tem nenhuma mídia." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Para curtir uma postagem, você precisa estar logado" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Não está autorizado a apagar este blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Você não está autorizado a apagar este blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Para ver suas notificações, você precisa estar logado" @@ -92,6 +147,34 @@ msgstr "Novo artigo" msgid "Edit {0}" msgstr "Mudar {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Você não está autorizado a apagar este blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Você ainda não tem nenhuma mídia." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Não está autorizado a apagar este blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -104,6 +187,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Para recompartilhar uma postagem, você precisa estar logado" +#, fuzzy +msgid "You are now connected." +msgstr "Você não está autorizado." + +#, fuzzy +msgid "You are now logged off." +msgstr "Você não está autorizado." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Redefinir palavra-passe" @@ -124,6 +215,14 @@ msgstr "Desculpe, mas a ligação expirou. Tente novamente" msgid "To access your dashboard, you need to be logged in" msgstr "Para acessar seu painel, você precisa estar logado" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Para se inscrever em alguém, você precisa estar logado" @@ -132,6 +231,27 @@ msgstr "Para se inscrever em alguém, você precisa estar logado" msgid "To edit your profile, you need to be logged in" msgstr "Para editar seu perfil, você precisa estar logado" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Você ainda não tem nenhuma mídia." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/ro.po b/po/plume/ro.po index 6303b57..1967640 100644 --- a/po/plume/ro.po +++ b/po/plume/ro.po @@ -49,6 +49,15 @@ msgstr "Pentru a crea un nou blog, trebuie sa fii logat" msgid "A blog with the same name already exists." msgstr "" +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Parola dumneavoastră a fost resetată cu succes." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Nu aveți permisiunea de a șterge acest blog." @@ -65,10 +74,56 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Nu aveți permisiunea de a șterge acest blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Nu aveți permisiunea de a șterge acest blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -93,6 +148,34 @@ msgstr "Postare nouă" msgid "Edit {0}" msgstr "Editare {0}" +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Nu aveți permisiunea de a șterge acest blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Nu aveți permisiunea de a șterge acest blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -103,6 +186,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Pentru a redistribui un post, trebuie să fii logat" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "Resetare parolă" @@ -123,6 +214,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -131,6 +230,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/ru.po b/po/plume/ru.po index 59e9516..fcbd32d 100644 --- a/po/plume/ru.po +++ b/po/plume/ru.po @@ -50,6 +50,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -66,10 +74,54 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/medias.rs:145 +msgid "You are not allowed to delete this media." +msgstr "" + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Вы не авторизованы." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -94,6 +146,32 @@ msgstr "Новый пост" msgid "Edit {0}" msgstr "" +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Вы не авторизованы." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:565 +msgid "You are not allowed to delete this article." +msgstr "" + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -104,6 +182,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +#, fuzzy +msgid "You are now connected." +msgstr "Вы не авторизованы." + +#, fuzzy +msgid "You are now logged off." +msgstr "Вы не авторизованы." + # src/routes/session.rs:181 msgid "Password reset" msgstr "" @@ -124,6 +210,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -132,6 +226,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" diff --git a/po/plume/sk.po b/po/plume/sk.po index 3946487..a34992c 100644 --- a/po/plume/sk.po +++ b/po/plume/sk.po @@ -48,6 +48,15 @@ msgstr "Aby si vytvoril/a nový blog, musíš sa prihlásiť" msgid "A blog with the same name already exists." msgstr "Blog s rovnakým názvom už existuje." +# src/routes/session.rs:259 +#, fuzzy +msgid "Your blog was successfully created!" +msgstr "Tvoje heslo bolo úspešne zmenené." + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Nemáš povolenie vymazať tento blog." @@ -64,10 +73,56 @@ msgstr "Tento mediálny súbor nemožno použiť ako ikonku pre blog." msgid "You can't use this media as a blog banner." msgstr "Tento mediálny súbor nemožno použiť ako záhlavie pre blog." +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +#, fuzzy +msgid "Your comment have been posted." +msgstr "Ešte nemáš nahrané žiadne multimédiá." + +#, fuzzy +msgid "Your comment have been deleted." +msgstr "Ešte nemáš nahrané žiadne multimédiá." + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "Aby si si obľúbil/a príspevok, musíš sa prihlásiť" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Nemáš povolenie vymazať tento blog." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Nemáš dovolené upravovať tento blog." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "Aby si videl/a notifikácie, musíš sa prihlásiť" @@ -92,6 +147,34 @@ msgstr "Nový príspevok" msgid "Edit {0}" msgstr "Uprav {0}" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Nemáš dovolené upravovať tento blog." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +#, fuzzy +msgid "Your post have been saved." +msgstr "Ešte nemáš nahrané žiadne multimédiá." + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Nemáš povolenie vymazať tento blog." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -104,6 +187,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "Na zdieľanie príspevku sa musíš prihlásiť" +#, fuzzy +msgid "You are now connected." +msgstr "Nemáš oprávnenie." + +#, fuzzy +msgid "You are now logged off." +msgstr "Nemáš oprávnenie." + # src/routes/session.rs:181 msgid "Password reset" msgstr "Obnovenie hesla" @@ -124,6 +215,14 @@ msgstr "Prepáč, ale tento odkaz už vypŕšal. Skús to znova" msgid "To access your dashboard, you need to be logged in" msgstr "Pre prístup k prehľadovému panelu sa musíš prihlásiť" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "Ak chceš niekoho odoberať, musíš sa prihlásiť" @@ -132,6 +231,27 @@ msgstr "Ak chceš niekoho odoberať, musíš sa prihlásiť" msgid "To edit your profile, you need to be logged in" msgstr "Na upravenie tvojho profilu sa musíš prihlásiť" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +#, fuzzy +msgid "Your account have been deleted." +msgstr "Ešte nemáš nahrané žiadne multimédiá." + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "Plume" diff --git a/po/plume/sr.po b/po/plume/sr.po index a40889e..a719cf2 100644 --- a/po/plume/sr.po +++ b/po/plume/sr.po @@ -49,6 +49,14 @@ msgstr "" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "" @@ -65,10 +73,54 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/medias.rs:145 +msgid "You are not allowed to delete this media." +msgstr "" + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/medias.rs:156 +msgid "You are not allowed to use this media." +msgstr "" + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -93,6 +145,32 @@ msgstr "" msgid "Edit {0}" msgstr "Uredi {0}" +# src/routes/posts.rs:264 +msgid "You are not allowed to publish on this blog." +msgstr "" + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/posts.rs:565 +msgid "You are not allowed to delete this article." +msgstr "" + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -103,6 +181,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "Poništavanje lozinke" @@ -123,6 +209,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -131,6 +225,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" diff --git a/po/plume/sv.po b/po/plume/sv.po index 4a5c136..f7670e3 100644 --- a/po/plume/sv.po +++ b/po/plume/sv.po @@ -48,6 +48,14 @@ msgstr "För att skapa en ny blogg måste du vara inloggad" msgid "A blog with the same name already exists." msgstr "" +# src/routes/blogs.rs:142 +msgid "Your blog was successfully created!" +msgstr "" + +# src/routes/blogs.rs:167 +msgid "Your blog was deleted." +msgstr "" + # src/routes/blogs.rs:172 msgid "You are not allowed to delete this blog." msgstr "Du har inte tillstånd att ta bort den här bloggen." @@ -64,10 +72,56 @@ msgstr "" msgid "You can't use this media as a blog banner." msgstr "" +# src/routes/blogs.rs:312 +msgid "Your blog information have been updated." +msgstr "" + +# src/routes/comments.rs:89 +msgid "Your comment have been posted." +msgstr "" + +# src/routes/comments.rs:163 +msgid "Your comment have been deleted." +msgstr "" + +# src/routes/instance.rs:145 +msgid "Instance settings have been saved." +msgstr "" + +# src/routes/instance.rs:182 +msgid "{} have been unblocked." +msgstr "" + +# src/routes/instance.rs:184 +msgid "{} have been blocked." +msgstr "" + +# src/routes/instance.rs:218 +msgid "{} have been banned." +msgstr "" + # src/routes/likes.rs:51 msgid "To like a post, you need to be logged in" msgstr "" +# src/routes/medias.rs:143 +msgid "Your media have been deleted." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this media." +msgstr "Du har inte tillstånd att ta bort den här bloggen." + +# src/routes/medias.rs:154 +msgid "Your avatar have been updated." +msgstr "" + +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to use this media." +msgstr "Du har inte tillstånd att redigera den här bloggen." + # src/routes/notifications.rs:29 msgid "To see your notifications, you need to be logged in" msgstr "" @@ -92,6 +146,34 @@ msgstr "" msgid "Edit {0}" msgstr "" +# src/routes/blogs.rs:217 +#, fuzzy +msgid "You are not allowed to publish on this blog." +msgstr "Du har inte tillstånd att redigera den här bloggen." + +# src/routes/posts.rs:351 +msgid "Your article have been updated." +msgstr "" + +# src/routes/posts.rs:527 +msgid "Your post have been saved." +msgstr "" + +# src/routes/blogs.rs:172 +#, fuzzy +msgid "You are not allowed to delete this article." +msgstr "Du har inte tillstånd att ta bort den här bloggen." + +# src/routes/posts.rs:589 +msgid "Your article have been deleted." +msgstr "" + +# src/routes/posts.rs:593 +msgid "" +"It looks like the article you tried to delete doesn't exist. Maybe it is " +"already gone?" +msgstr "" + # src/routes/posts.rs:630 msgid "" "Couldn't obtain enough information about your account. Please make sure your " @@ -102,6 +184,14 @@ msgstr "" msgid "To reshare a post, you need to be logged in" msgstr "" +# src/routes/session.rs:108 +msgid "You are now connected." +msgstr "" + +# src/routes/session.rs:124 +msgid "You are now logged off." +msgstr "" + # src/routes/session.rs:181 msgid "Password reset" msgstr "" @@ -122,6 +212,14 @@ msgstr "" msgid "To access your dashboard, you need to be logged in" msgstr "" +# src/routes/user.rs:158 +msgid "You are no longer following {}." +msgstr "" + +# src/routes/user.rs:174 +msgid "You are now following {}." +msgstr "" + # src/routes/user.rs:244 msgid "To subscribe to someone, you need to be logged in" msgstr "" @@ -130,6 +228,27 @@ msgstr "" msgid "To edit your profile, you need to be logged in" msgstr "" +# src/routes/user.rs:390 +msgid "Your profile have been updated." +msgstr "" + +# src/routes/user.rs:409 +msgid "Your account have been deleted." +msgstr "" + +# src/routes/user.rs:411 +msgid "You can't delete someone else's account." +msgstr "" + +# src/routes/user.rs:473 +msgid "Registrations are closed on this instance." +msgstr "" + +# src/routes/user.rs:491 +msgid "" +"Your account have been created. You just need to login before you can use it." +msgstr "" + msgid "Plume" msgstr "" diff --git a/src/main.rs b/src/main.rs index 2711954..f3cd655 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,7 +45,6 @@ use plume_models::{ search::{Searcher as UnmanagedSearcher, SearcherError}, Connection, Error, CONFIG, }; -use rocket::State; use rocket_csrf::CsrfFairingBuilder; use scheduled_thread_pool::ScheduledThreadPool; use std::process::exit; @@ -69,8 +68,6 @@ include!(concat!(env!("OUT_DIR"), "/templates.rs")); compile_i18n!(); -type Searcher<'a> = State<'a, Arc>; - /// Initializes a database pool. fn init_pool() -> Option { dotenv::dotenv().ok(); diff --git a/src/routes/blogs.rs b/src/routes/blogs.rs index 8615b85..ae935dc 100644 --- a/src/routes/blogs.rs +++ b/src/routes/blogs.rs @@ -17,21 +17,19 @@ use plume_models::{ users::User, Connection, PlumeRocket, }; use routes::{errors::ErrorPage, Page}; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/~/?", rank = 2)] pub fn details(name: String, page: Option, rockets: PlumeRocket) -> Result { let page = page.unwrap_or_default(); let conn = &*rockets.conn; let blog = Blog::find_by_fqn(&rockets, &name)?; - let posts = Post::blog_page(&*conn, &blog, page.limits())?; - let articles_count = Post::count_for_blog(&*conn, &blog)?; - let authors = &blog.list_authors(&*conn)?; - let user = rockets.user; - let intl = rockets.intl; + let posts = Post::blog_page(conn, &blog, page.limits())?; + let articles_count = Post::count_for_blog(conn, &blog)?; + let authors = &blog.list_authors(conn)?; Ok(render!(blogs::details( - &(&*conn, &intl.catalog, user.clone()), + &rockets.to_context(), blog, authors, page.0, @@ -51,13 +49,9 @@ pub fn activity_details( } #[get("/blogs/new")] -pub fn new(rockets: PlumeRocket) -> Ructe { - let user = rockets.user.unwrap(); - let intl = rockets.intl; - let conn = &*rockets.conn; - +pub fn new(rockets: PlumeRocket, _user: User) -> Ructe { render!(blogs::new( - &(&*conn, &intl.catalog, Some(user)), + &rockets.to_context(), &NewBlogForm::default(), ValidationErrors::default() )) @@ -90,7 +84,10 @@ fn valid_slug(title: &str) -> Result<(), ValidationError> { } #[post("/blogs/new", data = "
")] -pub fn create(form: LenientForm, rockets: PlumeRocket) -> Result { +pub fn create( + form: LenientForm, + rockets: PlumeRocket, +) -> Result, Ructe> { let slug = utils::make_actor_id(&form.title); let conn = &*rockets.conn; let intl = &rockets.intl.catalog; @@ -139,37 +136,40 @@ pub fn create(form: LenientForm, rockets: PlumeRocket) -> Result/delete")] -pub fn delete(name: String, rockets: PlumeRocket) -> Result { +pub fn delete(name: String, rockets: PlumeRocket) -> Result, Ructe> { let conn = &*rockets.conn; let blog = Blog::find_by_fqn(&rockets, &name).expect("blog::delete: blog not found"); - let user = rockets.user; - let intl = rockets.intl; - let searcher = rockets.searcher; - if user + if rockets + .user .clone() .and_then(|u| u.is_author_in(&*conn, &blog).ok()) .unwrap_or(false) { - blog.delete(&conn, &searcher) + blog.delete(&conn, &rockets.searcher) .expect("blog::expect: deletion error"); - Ok(Redirect::to(uri!(super::instance::index))) + Ok(Flash::success( + Redirect::to(uri!(super::instance::index)), + i18n!(rockets.intl.catalog, "Your blog was deleted."), + )) } else { // TODO actually return 403 error code Err(render!(errors::not_authorized( - &(&*conn, &intl.catalog, user), - i18n!(intl.catalog, "You are not allowed to delete this blog.") + &rockets.to_context(), + i18n!( + rockets.intl.catalog, + "You are not allowed to delete this blog." + ) ))) } } @@ -190,15 +190,16 @@ pub fn edit(name: String, rockets: PlumeRocket) -> Result { if rockets .user .clone() - .and_then(|u| u.is_author_in(&*conn, &blog).ok()) + .and_then(|u| u.is_author_in(conn, &blog).ok()) .unwrap_or(false) { let user = rockets .user + .clone() .expect("blogs::edit: User was None while it shouldn't"); - let medias = Media::for_user(&*conn, user.id).expect("Couldn't list media"); + let medias = Media::for_user(conn, user.id).expect("Couldn't list media"); Ok(render!(blogs::edit( - &(&*conn, &rockets.intl.catalog, Some(user)), + &rockets.to_context(), &blog, medias, &EditForm { @@ -212,7 +213,7 @@ pub fn edit(name: String, rockets: PlumeRocket) -> Result { } else { // TODO actually return 403 error code Ok(render!(errors::not_authorized( - &(&*conn, &rockets.intl.catalog, rockets.user), + &rockets.to_context(), i18n!( rockets.intl.catalog, "You are not allowed to edit this blog." @@ -235,7 +236,7 @@ pub fn update( name: String, form: LenientForm, rockets: PlumeRocket, -) -> Result { +) -> Result, Ructe> { let conn = &*rockets.conn; let intl = &rockets.intl.catalog; let mut blog = Blog::find_by_fqn(&rockets, &name).expect("blog::update: blog not found"); @@ -308,12 +309,15 @@ pub fn update( blog.banner_id = form.banner; blog.save_changes::(&*conn) .expect("Couldn't save blog changes"); - Ok(Redirect::to(uri!(details: name = name, page = _))) + Ok(Flash::success( + Redirect::to(uri!(details: name = name, page = _)), + i18n!(intl, "Your blog information have been updated."), + )) }) .map_err(|err| { let medias = Media::for_user(&*conn, user.id).expect("Couldn't list media"); render!(blogs::edit( - &(&*conn, intl, Some(user)), + &rockets.to_context(), &blog, medias, &*form, @@ -323,7 +327,7 @@ pub fn update( } else { // TODO actually return 403 error code Err(render!(errors::not_authorized( - &(&*conn, &rockets.intl.catalog, rockets.user), + &rockets.to_context(), i18n!( rockets.intl.catalog, "You are not allowed to edit this blog." diff --git a/src/routes/comments.rs b/src/routes/comments.rs index 6fc1310..a99ac18 100644 --- a/src/routes/comments.rs +++ b/src/routes/comments.rs @@ -1,5 +1,8 @@ use activitypub::object::Note; -use rocket::{request::LenientForm, response::Redirect}; +use rocket::{ + request::LenientForm, + response::{Flash, Redirect}, +}; use template_utils::Ructe; use validator::Validate; @@ -14,6 +17,7 @@ use plume_models::{ posts::Post, safe_string::SafeString, tags::Tag, users::User, Error, PlumeRocket, }; use routes::errors::ErrorPage; +use template_utils::IntoContext; #[derive(Default, FromForm, Debug, Validate)] pub struct NewCommentForm { @@ -30,7 +34,7 @@ pub fn create( form: LenientForm, user: User, rockets: PlumeRocket, -) -> Result { +) -> Result, Ructe> { let conn = &*rockets.conn; let blog = Blog::find_by_fqn(&rockets, &blog_name).expect("comments::create: blog error"); let post = Post::find_by_slug(&*conn, &slug, blog.id).expect("comments::create: post error"); @@ -83,8 +87,11 @@ pub fn create( .worker .execute(move || broadcast(&user_clone, new_comment, dest)); - Redirect::to( - uri!(super::posts::details: blog = blog_name, slug = slug, responding_to = _), + Flash::success( + Redirect::to( + uri!(super::posts::details: blog = blog_name, slug = slug, responding_to = _), + ), + i18n!(&rockets.intl.catalog, "Your comment have been posted."), ) }) .map_err(|errors| { @@ -97,7 +104,7 @@ pub fn create( .and_then(|r| Comment::get(&*conn, r).ok()); render!(posts::details( - &(&*conn, &rockets.intl.catalog, Some(user.clone())), + &rockets.to_context(), post.clone(), blog, &*form, @@ -134,7 +141,7 @@ pub fn delete( id: i32, user: User, rockets: PlumeRocket, -) -> Result { +) -> Result, ErrorPage> { if let Ok(comment) = Comment::get(&*rockets.conn, id) { if comment.author_id == user.id { let dest = User::one_by_instance(&*rockets.conn)?; @@ -157,8 +164,9 @@ pub fn delete( }); } } - Ok(Redirect::to( - uri!(super::posts::details: blog = blog, slug = slug, responding_to = _), + Ok(Flash::success( + Redirect::to(uri!(super::posts::details: blog = blog, slug = slug, responding_to = _)), + i18n!(&rockets.intl.catalog, "Your comment have been deleted."), )) } diff --git a/src/routes/errors.rs b/src/routes/errors.rs index a088af9..1320a06 100644 --- a/src/routes/errors.rs +++ b/src/routes/errors.rs @@ -1,12 +1,9 @@ -use plume_models::users::User; -use plume_models::{db_conn::DbConn, Error}; +use plume_models::{Error, PlumeRocket}; use rocket::{ - request::FromRequest, response::{self, Responder}, Request, }; -use rocket_i18n::I18n; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[derive(Debug)] pub struct ErrorPage(Error); @@ -19,78 +16,40 @@ impl From for ErrorPage { impl<'r> Responder<'r> for ErrorPage { fn respond_to(self, req: &Request) -> response::Result<'r> { - let conn = req.guard::().succeeded(); - let intl = req.guard::().succeeded(); - let user = User::from_request(req).succeeded(); + let rockets = req.guard::().unwrap(); match self.0 { - Error::NotFound => render!(errors::not_found(&( - &*conn.unwrap(), - &intl.unwrap().catalog, - user - ))) - .respond_to(req), - Error::Unauthorized => render!(errors::not_found(&( - &*conn.unwrap(), - &intl.unwrap().catalog, - user - ))) - .respond_to(req), - _ => render!(errors::not_found(&( - &*conn.unwrap(), - &intl.unwrap().catalog, - user - ))) - .respond_to(req), + Error::NotFound => render!(errors::not_found(&rockets.to_context())).respond_to(req), + Error::Unauthorized => { + render!(errors::not_found(&rockets.to_context())).respond_to(req) + } + _ => render!(errors::not_found(&rockets.to_context())).respond_to(req), } } } #[catch(404)] pub fn not_found(req: &Request) -> Ructe { - let conn = req.guard::().succeeded(); - let intl = req.guard::().succeeded(); - let user = User::from_request(req).succeeded(); - render!(errors::not_found(&( - &*conn.unwrap(), - &intl.unwrap().catalog, - user - ))) + let rockets = req.guard::().unwrap(); + render!(errors::not_found(&rockets.to_context())) } #[catch(422)] pub fn unprocessable_entity(req: &Request) -> Ructe { - let conn = req.guard::().succeeded(); - let intl = req.guard::().succeeded(); - let user = User::from_request(req).succeeded(); - render!(errors::unprocessable_entity(&( - &*conn.unwrap(), - &intl.unwrap().catalog, - user - ))) + let rockets = req.guard::().unwrap(); + render!(errors::unprocessable_entity(&rockets.to_context())) } #[catch(500)] pub fn server_error(req: &Request) -> Ructe { - let conn = req.guard::().succeeded(); - let intl = req.guard::().succeeded(); - let user = User::from_request(req).succeeded(); - render!(errors::server_error(&( - &*conn.unwrap(), - &intl.unwrap().catalog, - user - ))) + let rockets = req.guard::().unwrap(); + render!(errors::server_error(&rockets.to_context())) } #[post("/csrf-violation?")] -pub fn csrf_violation( - target: Option, - conn: DbConn, - intl: I18n, - user: Option, -) -> Ructe { +pub fn csrf_violation(target: Option, rockets: PlumeRocket) -> Ructe { if let Some(uri) = target { eprintln!("Csrf violation while acceding \"{}\"", uri) } - render!(errors::csrf(&(&*conn, &intl.catalog, user))) + render!(errors::csrf(&rockets.to_context())) } diff --git a/src/routes/instance.rs b/src/routes/instance.rs index 240f092..26b057c 100644 --- a/src/routes/instance.rs +++ b/src/routes/instance.rs @@ -1,6 +1,6 @@ use rocket::{ request::LenientForm, - response::{status, Redirect}, + response::{status, Flash, Redirect}, }; use rocket_contrib::json::Json; use rocket_i18n::I18n; @@ -14,25 +14,26 @@ use plume_models::{ safe_string::SafeString, users::User, Error, PlumeRocket, CONFIG, }; use routes::{errors::ErrorPage, rocket_uri_macro_static_files, Page}; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/")] -pub fn index(conn: DbConn, user: Option, intl: I18n) -> Result { - let inst = Instance::get_local(&*conn)?; - let federated = Post::get_recents_page(&*conn, Page::default().limits())?; - let local = Post::get_instance_page(&*conn, inst.id, Page::default().limits())?; - let user_feed = user.clone().and_then(|user| { - let followed = user.get_followed(&*conn).ok()?; +pub fn index(rockets: PlumeRocket) -> Result { + let conn = &*rockets.conn; + let inst = Instance::get_local(conn)?; + let federated = Post::get_recents_page(conn, Page::default().limits())?; + let local = Post::get_instance_page(conn, inst.id, Page::default().limits())?; + let user_feed = rockets.user.clone().and_then(|user| { + let followed = user.get_followed(conn).ok()?; let mut in_feed = followed.into_iter().map(|u| u.id).collect::>(); in_feed.push(user.id); - Post::user_feed_page(&*conn, in_feed, Page::default().limits()).ok() + Post::user_feed_page(conn, in_feed, Page::default().limits()).ok() }); Ok(render!(instance::index( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), inst, - User::count_local(&*conn)?, - Post::count_local(&*conn)?, + User::count_local(conn)?, + Post::count_local(conn)?, local, federated, user_feed @@ -40,61 +41,51 @@ pub fn index(conn: DbConn, user: Option, intl: I18n) -> Result")] -pub fn local( - conn: DbConn, - user: Option, - page: Option, - intl: I18n, -) -> Result { +pub fn local(page: Option, rockets: PlumeRocket) -> Result { let page = page.unwrap_or_default(); - let instance = Instance::get_local(&*conn)?; - let articles = Post::get_instance_page(&*conn, instance.id, page.limits())?; + let instance = Instance::get_local(&*rockets.conn)?; + let articles = Post::get_instance_page(&*rockets.conn, instance.id, page.limits())?; Ok(render!(instance::local( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), instance, articles, page.0, - Page::total(Post::count_local(&*conn)? as i32) + Page::total(Post::count_local(&*rockets.conn)? as i32) ))) } #[get("/feed?")] -pub fn feed(conn: DbConn, user: User, page: Option, intl: I18n) -> Result { +pub fn feed(user: User, page: Option, rockets: PlumeRocket) -> Result { let page = page.unwrap_or_default(); - let followed = user.get_followed(&*conn)?; + let followed = user.get_followed(&*rockets.conn)?; let mut in_feed = followed.into_iter().map(|u| u.id).collect::>(); in_feed.push(user.id); - let articles = Post::user_feed_page(&*conn, in_feed, page.limits())?; + let articles = Post::user_feed_page(&*rockets.conn, in_feed, page.limits())?; Ok(render!(instance::feed( - &(&*conn, &intl.catalog, Some(user)), + &rockets.to_context(), articles, page.0, - Page::total(Post::count_local(&*conn)? as i32) + Page::total(Post::count_local(&*rockets.conn)? as i32) ))) } #[get("/federated?")] -pub fn federated( - conn: DbConn, - user: Option, - page: Option, - intl: I18n, -) -> Result { +pub fn federated(page: Option, rockets: PlumeRocket) -> Result { let page = page.unwrap_or_default(); - let articles = Post::get_recents_page(&*conn, page.limits())?; + let articles = Post::get_recents_page(&*rockets.conn, page.limits())?; Ok(render!(instance::federated( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), articles, page.0, - Page::total(Post::count_local(&*conn)? as i32) + Page::total(Post::count_local(&*rockets.conn)? as i32) ))) } #[get("/admin")] -pub fn admin(conn: DbConn, admin: Admin, intl: I18n) -> Result { - let local_inst = Instance::get_local(&*conn)?; +pub fn admin(_admin: Admin, rockets: PlumeRocket) -> Result { + let local_inst = Instance::get_local(&*rockets.conn)?; Ok(render!(instance::admin( - &(&*conn, &intl.catalog, Some(admin.0)), + &rockets.to_context(), local_inst.clone(), InstanceSettingsForm { name: local_inst.name.clone(), @@ -120,31 +111,34 @@ pub struct InstanceSettingsForm { #[post("/admin", data = "")] pub fn update_settings( - conn: DbConn, - admin: Admin, + _admin: Admin, form: LenientForm, - intl: I18n, -) -> Result { + rockets: PlumeRocket, +) -> Result, Ructe> { + let conn = &*rockets.conn; form.validate() .and_then(|_| { - let instance = Instance::get_local(&*conn) - .expect("instance::update_settings: local instance error"); + let instance = + Instance::get_local(conn).expect("instance::update_settings: local instance error"); instance .update( - &*conn, + conn, form.name.clone(), form.open_registrations, form.short_description.clone(), form.long_description.clone(), ) .expect("instance::update_settings: save error"); - Ok(Redirect::to(uri!(admin))) + Ok(Flash::success( + Redirect::to(uri!(admin)), + i18n!(rockets.intl.catalog, "Instance settings have been saved."), + )) }) .or_else(|e| { - let local_inst = Instance::get_local(&*conn) - .expect("instance::update_settings: local instance error"); + let local_inst = + Instance::get_local(conn).expect("instance::update_settings: local instance error"); Err(render!(instance::admin( - &(&*conn, &intl.catalog, Some(admin.0)), + &rockets.to_context(), local_inst, form.clone(), e @@ -154,64 +148,78 @@ pub fn update_settings( #[get("/admin/instances?")] pub fn admin_instances( - admin: Admin, - conn: DbConn, + _admin: Admin, page: Option, - intl: I18n, + rockets: PlumeRocket, ) -> Result { let page = page.unwrap_or_default(); - let instances = Instance::page(&*conn, page.limits())?; + let instances = Instance::page(&*rockets.conn, page.limits())?; Ok(render!(instance::list( - &(&*conn, &intl.catalog, Some(admin.0)), - Instance::get_local(&*conn)?, + &rockets.to_context(), + Instance::get_local(&*rockets.conn)?, instances, page.0, - Page::total(Instance::count(&*conn)? as i32) + Page::total(Instance::count(&*rockets.conn)? as i32) ))) } #[post("/admin/instances//block")] -pub fn toggle_block(_admin: Admin, conn: DbConn, id: i32) -> Result { - if let Ok(inst) = Instance::get(&*conn, id) { - inst.toggle_block(&*conn)?; - } +pub fn toggle_block( + _admin: Admin, + conn: DbConn, + id: i32, + intl: I18n, +) -> Result, ErrorPage> { + let inst = Instance::get(&*conn, id)?; + let message = if inst.blocked { + i18n!(intl.catalog, "{} have been unblocked."; &inst.name) + } else { + i18n!(intl.catalog, "{} have been blocked."; &inst.name) + }; - Ok(Redirect::to(uri!(admin_instances: page = _))) + inst.toggle_block(&*conn)?; + Ok(Flash::success( + Redirect::to(uri!(admin_instances: page = _)), + message, + )) } #[get("/admin/users?")] pub fn admin_users( - admin: Admin, - conn: DbConn, + _admin: Admin, page: Option, - intl: I18n, + rockets: PlumeRocket, ) -> Result { let page = page.unwrap_or_default(); Ok(render!(instance::users( - &(&*conn, &intl.catalog, Some(admin.0)), - User::get_local_page(&*conn, page.limits())?, + &rockets.to_context(), + User::get_local_page(&*rockets.conn, page.limits())?, page.0, - Page::total(User::count_local(&*conn)? as i32) + Page::total(User::count_local(&*rockets.conn)? as i32) ))) } #[post("/admin/users//ban")] -pub fn ban(_admin: Admin, id: i32, rockets: PlumeRocket) -> Result { - if let Ok(u) = User::get(&*rockets.conn, id) { - u.delete(&*rockets.conn, &rockets.searcher)?; +pub fn ban(_admin: Admin, id: i32, rockets: PlumeRocket) -> Result, ErrorPage> { + let u = User::get(&*rockets.conn, id)?; + u.delete(&*rockets.conn, &rockets.searcher)?; - if Instance::get_local(&*rockets.conn) - .map(|i| u.instance_id == i.id) - .unwrap_or(false) - { - let target = User::one_by_instance(&*rockets.conn)?; - let delete_act = u.delete_activity(&*rockets.conn)?; - rockets - .worker - .execute(move || broadcast(&u, delete_act, target)); - } + if Instance::get_local(&*rockets.conn) + .map(|i| u.instance_id == i.id) + .unwrap_or(false) + { + let target = User::one_by_instance(&*rockets.conn)?; + let delete_act = u.delete_activity(&*rockets.conn)?; + let u_clone = u.clone(); + rockets + .worker + .execute(move || broadcast(&u_clone, delete_act, target)); } - Ok(Redirect::to(uri!(admin_users: page = _))) + + Ok(Flash::success( + Redirect::to(uri!(admin_users: page = _)), + i18n!(rockets.intl.catalog, "{} have been banned."; u.name()), + )) } #[post("/inbox", data = "")] @@ -293,14 +301,15 @@ pub fn nodeinfo(conn: DbConn, version: String) -> Result } #[get("/about")] -pub fn about(user: Option, conn: DbConn, intl: I18n) -> Result { +pub fn about(rockets: PlumeRocket) -> Result { + let conn = &*rockets.conn; Ok(render!(instance::about( - &(&*conn, &intl.catalog, user), - Instance::get_local(&*conn)?, - Instance::get_local(&*conn)?.main_admin(&*conn)?, - User::count_local(&*conn)?, - Post::count_local(&*conn)?, - Instance::count(&*conn)? - 1 + &rockets.to_context(), + Instance::get_local(conn)?, + Instance::get_local(conn)?.main_admin(conn)?, + User::count_local(conn)?, + Post::count_local(conn)?, + Instance::count(conn)? - 1 ))) } diff --git a/src/routes/medias.rs b/src/routes/medias.rs index 8918c29..e93ffc0 100644 --- a/src/routes/medias.rs +++ b/src/routes/medias.rs @@ -3,32 +3,32 @@ use multipart::server::{ save::{SaveResult, SavedData}, Multipart, }; -use plume_models::{db_conn::DbConn, medias::*, users::User, Error}; +use plume_models::{db_conn::DbConn, medias::*, users::User, Error, PlumeRocket}; use rocket::{ http::ContentType, - response::{status, Redirect}, + response::{status, Flash, Redirect}, Data, }; use rocket_i18n::I18n; use routes::{errors::ErrorPage, Page}; use std::fs; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/medias?")] -pub fn list(user: User, conn: DbConn, intl: I18n, page: Option) -> Result { +pub fn list(user: User, page: Option, rockets: PlumeRocket) -> Result { let page = page.unwrap_or_default(); - let medias = Media::page_for_user(&*conn, &user, page.limits())?; + let medias = Media::page_for_user(&*rockets.conn, &user, page.limits())?; Ok(render!(medias::index( - &(&*conn, &intl.catalog, Some(user.clone())), + &rockets.to_context(), medias, page.0, - Page::total(Media::count_for_user(&*conn, &user)? as i32) + Page::total(Media::count_for_user(&*rockets.conn, &user)? as i32) ))) } #[get("/medias/new")] -pub fn new(user: User, conn: DbConn, intl: I18n) -> Ructe { - render!(medias::new(&(&*conn, &intl.catalog, Some(user)))) +pub fn new(_user: User, rockets: PlumeRocket) -> Ructe { + render!(medias::new(&rockets.to_context())) } #[post("/medias/new", data = "")] @@ -122,32 +122,50 @@ fn read(data: &SavedData) -> Result> { } #[get("/medias/")] -pub fn details(id: i32, user: User, conn: DbConn, intl: I18n) -> Result { - let media = Media::get(&*conn, id)?; +pub fn details(id: i32, user: User, rockets: PlumeRocket) -> Result { + let media = Media::get(&*rockets.conn, id)?; if media.owner_id == user.id { - Ok(render!(medias::details( - &(&*conn, &intl.catalog, Some(user)), - media - ))) + Ok(render!(medias::details(&rockets.to_context(), media))) } else { Err(Error::Unauthorized.into()) } } #[post("/medias//delete")] -pub fn delete(id: i32, user: User, conn: DbConn) -> Result { +pub fn delete(id: i32, user: User, conn: DbConn, intl: I18n) -> Result, ErrorPage> { let media = Media::get(&*conn, id)?; if media.owner_id == user.id { media.delete(&*conn)?; + Ok(Flash::success( + Redirect::to(uri!(list: page = _)), + i18n!(intl.catalog, "Your media have been deleted."), + )) + } else { + Ok(Flash::error( + Redirect::to(uri!(list: page = _)), + i18n!(intl.catalog, "You are not allowed to delete this media."), + )) } - Ok(Redirect::to(uri!(list: page = _))) } #[post("/medias//avatar")] -pub fn set_avatar(id: i32, user: User, conn: DbConn) -> Result { +pub fn set_avatar( + id: i32, + user: User, + conn: DbConn, + intl: I18n, +) -> Result, ErrorPage> { let media = Media::get(&*conn, id)?; if media.owner_id == user.id { user.set_avatar(&*conn, media.id)?; + Ok(Flash::success( + Redirect::to(uri!(details: id = id)), + i18n!(intl.catalog, "Your avatar have been updated."), + )) + } else { + Ok(Flash::error( + Redirect::to(uri!(details: id = id)), + i18n!(intl.catalog, "You are not allowed to use this media."), + )) } - Ok(Redirect::to(uri!(details: id = id))) } diff --git a/src/routes/notifications.rs b/src/routes/notifications.rs index c12e94c..41ba591 100644 --- a/src/routes/notifications.rs +++ b/src/routes/notifications.rs @@ -2,23 +2,22 @@ use rocket::response::{Flash, Redirect}; use rocket_i18n::I18n; use plume_common::utils; -use plume_models::{db_conn::DbConn, notifications::Notification, users::User}; +use plume_models::{notifications::Notification, users::User, PlumeRocket}; use routes::{errors::ErrorPage, Page}; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/notifications?")] pub fn notifications( - conn: DbConn, user: User, page: Option, - intl: I18n, + rockets: PlumeRocket, ) -> Result { let page = page.unwrap_or_default(); Ok(render!(notifications::index( - &(&*conn, &intl.catalog, Some(user.clone())), - Notification::page_for_user(&*conn, &user, page.limits())?, + &rockets.to_context(), + Notification::page_for_user(&*rockets.conn, &user, page.limits())?, page.0, - Page::total(Notification::count_for_user(&*conn, &user)? as i32) + Page::total(Notification::count_for_user(&*rockets.conn, &user)? as i32) ))) } diff --git a/src/routes/posts.rs b/src/routes/posts.rs index 14ba694..47f5555 100644 --- a/src/routes/posts.rs +++ b/src/routes/posts.rs @@ -27,7 +27,7 @@ use plume_models::{ Error, PlumeRocket, }; use routes::{comments::NewCommentForm, errors::ErrorPage, ContentLen, RemoteForm}; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/~//?", rank = 4)] pub fn details( @@ -51,7 +51,7 @@ pub fn details( let previous = responding_to.and_then(|r| Comment::get(&*conn, r).ok()); Ok(render!(posts::details( - &(&*conn, &rockets.intl.catalog, user.clone()), + &rockets.to_context(), post.clone(), blog, &NewCommentForm { @@ -89,7 +89,7 @@ pub fn details( ))) } else { Ok(render!(errors::not_authorized( - &(&*conn, &rockets.intl.catalog, user.clone()), + &rockets.to_context(), i18n!(rockets.intl.catalog, "This post isn't published yet.") ))) } @@ -130,21 +130,20 @@ pub fn new_auth(blog: String, i18n: I18n) -> Flash { pub fn new(blog: String, cl: ContentLen, rockets: PlumeRocket) -> Result { let conn = &*rockets.conn; let b = Blog::find_by_fqn(&rockets, &blog)?; - let user = rockets.user.unwrap(); - let intl = rockets.intl; + let user = rockets.user.clone().unwrap(); if !user.is_author_in(&*conn, &b)? { // TODO actually return 403 error code return Ok(render!(errors::not_authorized( - &(&*conn, &intl.catalog, Some(user)), - i18n!(intl.catalog, "You are not an author of this blog.") + &rockets.to_context(), + i18n!(rockets.intl.catalog, "You are not an author of this blog.") ))); } let medias = Media::for_user(&*conn, user.id)?; Ok(render!(posts::new( - &(&*conn, &intl.catalog, Some(user)), - i18n!(intl.catalog, "New post"), + &rockets.to_context(), + i18n!(rockets.intl.catalog, "New post"), b, false, &NewPostForm { @@ -170,11 +169,11 @@ pub fn edit( let intl = &rockets.intl.catalog; let b = Blog::find_by_fqn(&rockets, &blog)?; let post = Post::find_by_slug(&*conn, &slug, b.id)?; - let user = rockets.user.unwrap(); + let user = rockets.user.clone().unwrap(); if !user.is_author_in(&*conn, &b)? { return Ok(render!(errors::not_authorized( - &(&*conn, intl, Some(user)), + &rockets.to_context(), i18n!(intl, "You are not an author of this blog.") ))); } @@ -188,7 +187,7 @@ pub fn edit( let medias = Media::for_user(&*conn, user.id)?; let title = post.title.clone(); Ok(render!(posts::new( - &(&*conn, intl, Some(user)), + &rockets.to_context(), i18n!(intl, "Edit {0}"; &title), b, true, @@ -220,7 +219,7 @@ pub fn update( cl: ContentLen, form: LenientForm, rockets: PlumeRocket, -) -> Result { +) -> Result, Ructe> { let conn = &*rockets.conn; let b = Blog::find_by_fqn(&rockets, &blog).expect("post::update: blog error"); let mut post = @@ -256,8 +255,9 @@ pub fn update( .expect("posts::update: is author in error") { // actually it's not "Ok"… - Ok(Redirect::to( - uri!(super::blogs::details: name = blog, page = _), + Ok(Flash::error( + Redirect::to(uri!(super::blogs::details: name = blog, page = _)), + i18n!(&intl, "You are not allowed to publish on this blog."), )) } else { let (content, mentions, hashtags) = utils::md_to_html( @@ -343,14 +343,15 @@ pub fn update( } } - Ok(Redirect::to( - uri!(details: blog = blog, slug = new_slug, responding_to = _), + Ok(Flash::success( + Redirect::to(uri!(details: blog = blog, slug = new_slug, responding_to = _)), + i18n!(intl, "Your article have been updated."), )) } } else { let medias = Media::for_user(&*conn, user.id).expect("posts:update: medias error"); Err(render!(posts::new( - &(&*conn, intl, Some(user)), + &rockets.to_context(), i18n!(intl, "Edit {0}"; &form.title), b, true, @@ -393,7 +394,7 @@ pub fn create( form: LenientForm, cl: ContentLen, rockets: PlumeRocket, -) -> Result> { +) -> Result, Result> { let conn = &*rockets.conn; let blog = Blog::find_by_fqn(&rockets, &blog_name).expect("post::create: blog error");; let slug = form.title.to_string().to_kebab_case(); @@ -420,8 +421,12 @@ pub fn create( .expect("post::create: is author in error") { // actually it's not "Ok"… - return Ok(Redirect::to( - uri!(super::blogs::details: name = blog_name, page = _), + return Ok(Flash::error( + Redirect::to(uri!(super::blogs::details: name = blog_name, page = _)), + i18n!( + &rockets.intl.catalog, + "You are not allowed to publish on this blog." + ), )); } @@ -518,15 +523,15 @@ pub fn create( worker.execute(move || broadcast(&user, act, dest)); } - Ok(Redirect::to( - uri!(details: blog = blog_name, slug = slug, responding_to = _), + Ok(Flash::success( + Redirect::to(uri!(details: blog = blog_name, slug = slug, responding_to = _)), + i18n!(&rockets.intl.catalog, "Your post have been saved."), )) } else { let medias = Media::for_user(&*conn, user.id).expect("posts::create: medias error"); - let intl = rockets.intl; Err(Ok(render!(posts::new( - &(&*conn, &intl.catalog, Some(user)), - i18n!(intl.catalog, "New post"), + &rockets.to_context(), + i18n!(rockets.intl.catalog, "New post"), blog, false, &*form, @@ -544,7 +549,8 @@ pub fn delete( blog_name: String, slug: String, rockets: PlumeRocket, -) -> Result { + intl: I18n, +) -> Result, ErrorPage> { let user = rockets.user.clone().unwrap(); let post = Blog::find_by_fqn(&rockets, &blog_name) .and_then(|blog| Post::find_by_slug(&*rockets.conn, &slug, blog.id)); @@ -555,8 +561,11 @@ pub fn delete( .into_iter() .any(|a| a.id == user.id) { - return Ok(Redirect::to( - uri!(details: blog = blog_name.clone(), slug = slug.clone(), responding_to = _), + return Ok(Flash::error( + Redirect::to( + uri!(details: blog = blog_name.clone(), slug = slug.clone(), responding_to = _), + ), + i18n!(intl.catalog, "You are not allowed to delete this article."), )); } @@ -579,13 +588,14 @@ pub fn delete( .expect("Failed to rotate keypair"); }); - Ok(Redirect::to( - uri!(super::blogs::details: name = blog_name, page = _), + Ok(Flash::success( + Redirect::to(uri!(super::blogs::details: name = blog_name, page = _)), + i18n!(intl.catalog, "Your article have been deleted."), )) } else { - Ok(Redirect::to( + Ok(Flash::error(Redirect::to( uri!(super::blogs::details: name = blog_name, page = _), - )) + ), i18n!(intl.catalog, "It looks like the article you tried to delete doesn't exist. Maybe it is already gone?"))) } } @@ -594,12 +604,11 @@ pub fn remote_interact( rockets: PlumeRocket, blog_name: String, slug: String, - i18n: I18n, ) -> Result { let target = Blog::find_by_fqn(&rockets, &blog_name) .and_then(|blog| Post::find_by_slug(&rockets.conn, &slug, blog.id))?; Ok(render!(posts::remote_interact( - &(&rockets.conn, &i18n.catalog, None), + &rockets.to_context(), target, super::session::LoginForm::default(), ValidationErrors::default(), @@ -614,7 +623,6 @@ pub fn remote_interact_post( blog_name: String, slug: String, remote: LenientForm, - i18n: I18n, ) -> Result, ErrorPage> { let target = Blog::find_by_fqn(&rockets, &blog_name) .and_then(|blog| Post::find_by_slug(&rockets.conn, &slug, blog.id))?; @@ -627,12 +635,12 @@ pub fn remote_interact_post( let mut errs = ValidationErrors::new(); errs.add("remote", ValidationError { code: Cow::from("invalid_remote"), - message: Some(Cow::from(i18n!(&i18n.catalog, "Couldn't obtain enough information about your account. Please make sure your username is correct."))), + message: Some(Cow::from(i18n!(rockets.intl.catalog, "Couldn't obtain enough information about your account. Please make sure your username is correct."))), params: HashMap::new(), }); //could not get your remote url? Ok(Ok(render!(posts::remote_interact( - &(&rockets.conn, &i18n.catalog, None), + &rockets.to_context(), target, super::session::LoginForm::default(), ValidationErrors::default(), diff --git a/src/routes/search.rs b/src/routes/search.rs index 7337929..b605d10 100644 --- a/src/routes/search.rs +++ b/src/routes/search.rs @@ -1,12 +1,10 @@ use chrono::offset::Utc; use rocket::request::Form; -use rocket_i18n::I18n; -use plume_models::{db_conn::DbConn, search::Query, users::User}; +use plume_models::{search::Query, PlumeRocket}; use routes::Page; use std::str::FromStr; -use template_utils::Ructe; -use Searcher; +use template_utils::{IntoContext, Ructe}; #[derive(Default, FromForm)] pub struct SearchQuery { @@ -52,13 +50,8 @@ macro_rules! param_to_query { } #[get("/search?")] -pub fn search( - query: Option>, - conn: DbConn, - searcher: Searcher, - user: Option, - intl: I18n, -) -> Ructe { +pub fn search(query: Option>, rockets: PlumeRocket) -> Ructe { + let conn = &*rockets.conn; let query = query.map(Form::into_inner).unwrap_or_default(); let page = query.page.unwrap_or_default(); let mut parsed_query = @@ -73,14 +66,16 @@ pub fn search( if str_query.is_empty() { render!(search::index( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), &format!("{}", Utc::today().format("%Y-%m-d")) )) } else { - let res = searcher.search_document(&conn, parsed_query, page.limits()); + let res = rockets + .searcher + .search_document(&conn, parsed_query, page.limits()); let next_page = if res.is_empty() { 0 } else { page.0 + 1 }; render!(search::result( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), &str_query, res, page.0, diff --git a/src/routes/session.rs b/src/routes/session.rs index 086aec1..5a299f3 100644 --- a/src/routes/session.rs +++ b/src/routes/session.rs @@ -2,8 +2,8 @@ use lettre::Transport; use rocket::http::ext::IntoOwned; use rocket::{ http::{uri::Uri, Cookie, Cookies, SameSite}, - request::{FlashMessage, Form, LenientForm}, - response::Redirect, + request::{Form, LenientForm}, + response::{Flash, Redirect}, State, }; use rocket_i18n::I18n; @@ -12,21 +12,20 @@ use std::{ sync::{Arc, Mutex}, time::Instant, }; -use template_utils::Ructe; use validator::{Validate, ValidationError, ValidationErrors}; use mail::{build_mail, Mailer}; use plume_models::{ - db_conn::DbConn, users::{User, AUTH_COOKIE}, Error, PlumeRocket, CONFIG, }; use routes::errors::ErrorPage; +use template_utils::{IntoContext, Ructe}; #[get("/login?")] -pub fn new(user: Option, conn: DbConn, m: Option, intl: I18n) -> Ructe { +pub fn new(m: Option, rockets: PlumeRocket) -> Ructe { render!(session::login( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), m, &LoginForm::default(), ValidationErrors::default() @@ -44,10 +43,9 @@ pub struct LoginForm { #[post("/login", data = "")] pub fn create( form: LenientForm, - flash: Option, mut cookies: Cookies, rockets: PlumeRocket, -) -> Result { +) -> Result, Ructe> { let conn = &*rockets.conn; let user = User::find_by_email(&*conn, &form.email_or_name) .or_else(|_| User::find_by_fqn(&rockets, &form.email_or_name)); @@ -84,31 +82,38 @@ pub fn create( .same_site(SameSite::Lax) .finish(), ); - let destination = flash - .and_then(|f| { - if f.name() == "callback" { - Some(f.msg().to_owned()) - } else { - None - } - }) + let destination = rockets + .flash_msg + .clone() + .and_then( + |(name, msg)| { + if name == "callback" { + Some(msg) + } else { + None + } + }, + ) .unwrap_or_else(|| "/".to_owned()); let uri = Uri::parse(&destination) .map(IntoOwned::into_owned) .map_err(|_| { render!(session::login( - &(&*conn, &rockets.intl.catalog, None), + &(conn, &rockets.intl.catalog, None, None), None, &*form, errors )) })?; - Ok(Redirect::to(uri)) + Ok(Flash::success( + Redirect::to(uri), + i18n!(&rockets.intl.catalog, "You are now connected."), + )) } else { Err(render!(session::login( - &(&*conn, &rockets.intl.catalog, None), + &rockets.to_context(), None, &*form, errors @@ -117,11 +122,14 @@ pub fn create( } #[get("/logout")] -pub fn delete(mut cookies: Cookies) -> Redirect { +pub fn delete(mut cookies: Cookies, intl: I18n) -> Flash { if let Some(cookie) = cookies.get_private(AUTH_COOKIE) { cookies.remove_private(cookie); } - Redirect::to("/") + Flash::success( + Redirect::to("/"), + i18n!(intl.catalog, "You are now logged off."), + ) } #[derive(Clone)] @@ -138,9 +146,9 @@ impl PartialEq for ResetRequest { } #[get("/password-reset")] -pub fn password_reset_request_form(conn: DbConn, intl: I18n) -> Ructe { +pub fn password_reset_request_form(rockets: PlumeRocket) -> Ructe { render!(session::password_reset_request( - &(&*conn, &intl.catalog, None), + &rockets.to_context(), &ResetForm::default(), ValidationErrors::default() )) @@ -154,17 +162,16 @@ pub struct ResetForm { #[post("/password-reset", data = "")] pub fn password_reset_request( - conn: DbConn, - intl: I18n, mail: State>>, form: Form, requests: State>>>, + rockets: PlumeRocket, ) -> Ructe { let mut requests = requests.lock().unwrap(); // Remove outdated requests (more than 1 day old) to avoid the list to grow too much requests.retain(|r| r.creation_date.elapsed().as_secs() < 24 * 60 * 60); - if User::find_by_email(&*conn, &form.email).is_ok() + if User::find_by_email(&*rockets.conn, &form.email).is_ok() && !requests.iter().any(|x| x.mail == form.email.clone()) { let id = plume_common::utils::random_hex(); @@ -178,8 +185,8 @@ pub fn password_reset_request( let link = format!("https://{}/password-reset/{}", CONFIG.base_url, id); if let Some(message) = build_mail( form.email.clone(), - i18n!(intl.catalog, "Password reset"), - i18n!(intl.catalog, "Here is the link to reset your password: {0}"; link), + i18n!(rockets.intl.catalog, "Password reset"), + i18n!(rockets.intl.catalog, "Here is the link to reset your password: {0}"; link), ) { if let Some(ref mut mail) = *mail.lock().unwrap() { mail.send(message.into()) @@ -188,19 +195,14 @@ pub fn password_reset_request( } } } - render!(session::password_reset_request_ok(&( - &*conn, - &intl.catalog, - None - ))) + render!(session::password_reset_request_ok(&rockets.to_context())) } #[get("/password-reset/")] pub fn password_reset_form( - conn: DbConn, - intl: I18n, token: String, requests: State>>>, + rockets: PlumeRocket, ) -> Result { requests .lock() @@ -209,7 +211,7 @@ pub fn password_reset_form( .find(|x| x.id == token.clone()) .ok_or(Error::NotFound)?; Ok(render!(session::password_reset( - &(&*conn, &intl.catalog, None), + &rockets.to_context(), &NewPasswordForm::default(), ValidationErrors::default() ))) @@ -236,12 +238,11 @@ fn passwords_match(form: &NewPasswordForm) -> Result<(), ValidationError> { #[post("/password-reset/", data = "")] pub fn password_reset( - conn: DbConn, - intl: I18n, token: String, requests: State>>>, form: Form, -) -> Result { + rockets: PlumeRocket, +) -> Result, Ructe> { form.validate() .and_then(|_| { let mut requests = requests.lock().unwrap(); @@ -253,24 +254,30 @@ pub fn password_reset( if req.creation_date.elapsed().as_secs() < 60 * 60 * 2 { // Reset link is only valid for 2 hours requests.retain(|r| *r != req); - let user = User::find_by_email(&*conn, &req.mail).map_err(to_validation)?; - user.reset_password(&*conn, &form.password).ok(); - Ok(Redirect::to(uri!( - new: m = i18n!(intl.catalog, "Your password was successfully reset.") - ))) + let user = User::find_by_email(&*rockets.conn, &req.mail).map_err(to_validation)?; + user.reset_password(&*rockets.conn, &form.password).ok(); + Ok(Flash::success( + Redirect::to(uri!( + new: m = _ + )), + i18n!( + rockets.intl.catalog, + "Your password was successfully reset." + ), + )) } else { - Ok(Redirect::to(uri!( - new: m = i18n!(intl.catalog, "Sorry, but the link expired. Try again") - ))) + Ok(Flash::error( + Redirect::to(uri!( + new: m = _ + )), + i18n!( + rockets.intl.catalog, + "Sorry, but the link expired. Try again" + ), + )) } }) - .map_err(|err| { - render!(session::password_reset( - &(&*conn, &intl.catalog, None), - &form, - err - )) - }) + .map_err(|err| render!(session::password_reset(&rockets.to_context(), &form, err))) } fn to_validation(_: T) -> ValidationErrors { diff --git a/src/routes/tags.rs b/src/routes/tags.rs index d406a41..95d637a 100644 --- a/src/routes/tags.rs +++ b/src/routes/tags.rs @@ -1,24 +1,16 @@ -use rocket_i18n::I18n; - -use plume_models::{db_conn::DbConn, posts::Post, users::User}; +use plume_models::{posts::Post, PlumeRocket}; use routes::{errors::ErrorPage, Page}; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/tag/?")] -pub fn tag( - user: Option, - conn: DbConn, - name: String, - page: Option, - intl: I18n, -) -> Result { +pub fn tag(name: String, page: Option, rockets: PlumeRocket) -> Result { let page = page.unwrap_or_default(); - let posts = Post::list_by_tag(&*conn, name.clone(), page.limits())?; + let posts = Post::list_by_tag(&*rockets.conn, name.clone(), page.limits())?; Ok(render!(tags::index( - &(&*conn, &intl.catalog, user), + &rockets.to_context(), name.clone(), posts, page.0, - Page::total(Post::count_for_tag(&*conn, name)? as i32) + Page::total(Post::count_for_tag(&*rockets.conn, name)? as i32) ))) } diff --git a/src/routes/user.rs b/src/routes/user.rs index ae2aaa4..c45f2c3 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -26,7 +26,7 @@ use plume_models::{ Error, PlumeRocket, }; use routes::{errors::ErrorPage, Page, RemoteForm}; -use template_utils::Ructe; +use template_utils::{IntoContext, Ructe}; #[get("/me")] pub fn me(user: Option) -> Result> { @@ -48,7 +48,7 @@ pub fn details( let user = User::find_by_fqn(&rockets, &name)?; let recents = Post::get_recents_for_author(&*conn, &user, 6)?; let reshares = Reshare::get_recents_for_author(&*conn, &user, 6)?; - let worker = rockets.worker; + let worker = &rockets.worker; if !user.get_instance(&*conn)?.local { // Fetch new articles @@ -101,12 +101,12 @@ pub fn details( } } - let account = rockets.user; - let intl = rockets.intl; Ok(render!(users::details( - &(&*conn, &intl.catalog, account.clone()), + &rockets.to_context(), user.clone(), - account + rockets + .user + .clone() .and_then(|x| x.is_following(&*conn, user.id).ok()) .unwrap_or(false), user.instance_id != Instance::get_local(&*conn)?.id, @@ -120,12 +120,12 @@ pub fn details( } #[get("/dashboard")] -pub fn dashboard(user: User, conn: DbConn, intl: I18n) -> Result { - let blogs = Blog::find_for_author(&*conn, &user)?; +pub fn dashboard(user: User, rockets: PlumeRocket) -> Result { + let blogs = Blog::find_for_author(&*rockets.conn, &user)?; Ok(render!(users::dashboard( - &(&*conn, &intl.catalog, Some(user.clone())), + &rockets.to_context(), blogs, - Post::drafts_by_author(&*conn, &user)? + Post::drafts_by_author(&*rockets.conn, &user)? ))) } @@ -141,19 +141,25 @@ pub fn dashboard_auth(i18n: I18n) -> Flash { } #[post("/@//follow")] -pub fn follow(name: String, user: User, rockets: PlumeRocket) -> Result { +pub fn follow( + name: String, + user: User, + rockets: PlumeRocket, +) -> Result, ErrorPage> { let conn = &*rockets.conn; let target = User::find_by_fqn(&rockets, &name)?; - if let Ok(follow) = follows::Follow::find(&*conn, user.id, target.id) { + let message = if let Ok(follow) = follows::Follow::find(&*conn, user.id, target.id) { let delete_act = follow.build_undo(&*conn)?; local_inbox( &rockets, serde_json::to_value(&delete_act).map_err(Error::from)?, )?; + let msg = i18n!(rockets.intl.catalog, "You are no longer following {}."; target.name()); rockets .worker .execute(move || broadcast(&user, delete_act, vec![target])); + msg } else { let f = follows::Follow::insert( &*conn, @@ -166,11 +172,16 @@ pub fn follow(name: String, user: User, rockets: PlumeRocket) -> Result/follow", data = "", rank = 2)] @@ -209,7 +220,7 @@ pub fn follow_not_connected( ); Ok(Ok(Flash::new( render!(users::follow_remote( - &(&rockets.conn, &i18n.catalog, None), + &rockets.to_context(), target, super::session::LoginForm::default(), ValidationErrors::default(), @@ -223,7 +234,7 @@ pub fn follow_not_connected( } else { Ok(Ok(Flash::new( render!(users::follow_remote( - &(&rockets.conn, &i18n.catalog, None), + &rockets.to_context(), target, super::session::LoginForm::default(), ValidationErrors::default(), @@ -260,10 +271,11 @@ pub fn followers( let followers_count = user.count_followers(&*conn)?; Ok(render!(users::followers( - &(&*conn, &rockets.intl.catalog, rockets.user.clone()), + &rockets.to_context(), user.clone(), rockets .user + .clone() .and_then(|x| x.is_following(&*conn, user.id).ok()) .unwrap_or(false), user.instance_id != Instance::get_local(&*conn)?.id, @@ -283,18 +295,19 @@ pub fn followed( let conn = &*rockets.conn; let page = page.unwrap_or_default(); let user = User::find_by_fqn(&rockets, &name)?; - let followed_count = user.count_followed(&*conn)?; + let followed_count = user.count_followed(conn)?; Ok(render!(users::followed( - &(&*conn, &rockets.intl.catalog, rockets.user.clone()), + &rockets.to_context(), user.clone(), rockets .user - .and_then(|x| x.is_following(&*conn, user.id).ok()) + .clone() + .and_then(|x| x.is_following(conn, user.id).ok()) .unwrap_or(false), - user.instance_id != Instance::get_local(&*conn)?.id, - user.get_instance(&*conn)?.public_domain, - user.get_followed_page(&*conn, page.limits())?, + user.instance_id != Instance::get_local(conn)?.id, + user.get_instance(conn)?.public_domain, + user.get_followed_page(conn, page.limits())?, page.0, Page::total(followed_count as i32) ))) @@ -311,20 +324,20 @@ pub fn activity_details( } #[get("/users/new")] -pub fn new(user: Option, conn: DbConn, intl: I18n) -> Result { +pub fn new(rockets: PlumeRocket) -> Result { Ok(render!(users::new( - &(&*conn, &intl.catalog, user), - Instance::get_local(&*conn)?.open_registrations, + &rockets.to_context(), + Instance::get_local(&*rockets.conn)?.open_registrations, &NewUserForm::default(), ValidationErrors::default() ))) } #[get("/@//edit")] -pub fn edit(name: String, user: User, conn: DbConn, intl: I18n) -> Result { +pub fn edit(name: String, user: User, rockets: PlumeRocket) -> Result { if user.username == name && !name.contains('@') { Ok(render!(users::edit( - &(&*conn, &intl.catalog, Some(user.clone())), + &rockets.to_context(), UpdateUserForm { display_name: user.display_name.clone(), email: user.email.clone().unwrap_or_default(), @@ -361,7 +374,8 @@ pub fn update( conn: DbConn, user: User, form: LenientForm, -) -> Result { + intl: I18n, +) -> Result, ErrorPage> { user.update( &*conn, if !form.display_name.is_empty() { @@ -380,7 +394,10 @@ pub fn update( user.summary.to_string() }, )?; - Ok(Redirect::to(uri!(me))) + Ok(Flash::success( + Redirect::to(uri!(me)), + i18n!(intl.catalog, "Your profile have been updated."), + )) } #[post("/@//delete")] @@ -389,7 +406,7 @@ pub fn delete( user: User, mut cookies: Cookies, rockets: PlumeRocket, -) -> Result { +) -> Result, ErrorPage> { let account = User::find_by_fqn(&rockets, &name)?; if user.id == account.id { account.delete(&*rockets.conn, &rockets.searcher)?; @@ -404,9 +421,18 @@ pub fn delete( cookies.remove_private(cookie); } - Ok(Redirect::to(uri!(super::instance::index))) + Ok(Flash::success( + Redirect::to(uri!(super::instance::index)), + i18n!(rockets.intl.catalog, "Your account have been deleted."), + )) } else { - Ok(Redirect::to(uri!(edit: name = name))) + Ok(Flash::error( + Redirect::to(uri!(edit: name = name)), + i18n!( + rockets.intl.catalog, + "You can't delete someone else's account." + ), + )) } } @@ -463,12 +489,22 @@ fn to_validation(_: Error) -> ValidationErrors { } #[post("/users/new", data = "")] -pub fn create(conn: DbConn, form: LenientForm, intl: I18n) -> Result { - if !Instance::get_local(&*conn) +pub fn create( + form: LenientForm, + rockets: PlumeRocket, +) -> Result, Ructe> { + let conn = &*rockets.conn; + if !Instance::get_local(conn) .map(|i| i.open_registrations) .unwrap_or(true) { - return Ok(Redirect::to(uri!(new))); // Actually, it is an error + return Ok(Flash::error( + Redirect::to(uri!(new)), + i18n!( + rockets.intl.catalog, + "Registrations are closed on this instance." + ), + )); // Actually, it is an error } let mut form = form.into_inner(); @@ -477,7 +513,7 @@ pub fn create(conn: DbConn, form: LenientForm, intl: I18n) -> Resul form.validate() .and_then(|_| { NewUser::new_local( - &*conn, + conn, form.username.to_string(), form.username.to_string(), false, @@ -486,12 +522,18 @@ pub fn create(conn: DbConn, form: LenientForm, intl: I18n) -> Resul User::hash_pass(&form.password).map_err(to_validation)?, ) .map_err(to_validation)?; - Ok(Redirect::to(uri!(super::session::new: m = _))) + Ok(Flash::success( + Redirect::to(uri!(super::session::new: m = _)), + i18n!( + rockets.intl.catalog, + "Your account have been created. You just need to login before you can use it." + ), + )) }) .map_err(|err| { render!(users::new( - &(&*conn, &intl.catalog, None), - Instance::get_local(&*conn) + &rockets.to_context(), + Instance::get_local(conn) .map(|i| i.open_registrations) .unwrap_or(true), &form, diff --git a/src/template_utils.rs b/src/template_utils.rs index 3ff99fd..c3b214e 100644 --- a/src/template_utils.rs +++ b/src/template_utils.rs @@ -1,4 +1,4 @@ -use plume_models::{notifications::*, users::User, Connection}; +use plume_models::{notifications::*, users::User, Connection, PlumeRocket}; use rocket::http::hyper::header::{ETag, EntityTag}; use rocket::http::{Method, Status}; @@ -13,7 +13,41 @@ pub use askama_escape::escape; pub static CACHE_NAME: &str = env!("CACHE_ID"); -pub type BaseContext<'a> = &'a (&'a Connection, &'a Catalog, Option); +pub type BaseContext<'a> = &'a ( + &'a Connection, + &'a Catalog, + Option, + Option<(String, String)>, +); + +pub trait IntoContext { + fn to_context( + &self, + ) -> ( + &Connection, + &Catalog, + Option, + Option<(String, String)>, + ); +} + +impl IntoContext for PlumeRocket { + fn to_context( + &self, + ) -> ( + &Connection, + &Catalog, + Option, + Option<(String, String)>, + ) { + ( + &*self.conn, + &self.intl.catalog, + self.user.clone(), + self.flash_msg.clone(), + ) + } +} #[derive(Debug)] pub struct Ructe(pub Vec); diff --git a/static/css/_header.scss b/static/css/_header.scss index 60c760c..5a5335d 100644 --- a/static/css/_header.scss +++ b/static/css/_header.scss @@ -76,15 +76,28 @@ header { .messages { & > * { - padding: 1em 20%; + padding: 1em 20%; + margin: 0; + max-width: initial; + font-weight: bold; } p.error { - color: $red; + color: darken($red, 20%); background: lighten($red, 40%); margin: 0; max-width: initial; } + + p.warning { + color: darken($yellow, 20%); + background: lighten($yellow, 40%); + } + + p.success { + color: darken($green, 20%); + background: lighten($green, 40%); + } } // Only enable label animations on normal screens diff --git a/static/css/_variables.scss b/static/css/_variables.scss index 58cfd35..a76e0e3 100644 --- a/static/css/_variables.scss +++ b/static/css/_variables.scss @@ -8,6 +8,8 @@ $white: #F4F4F4; $purple: #7765E3; $lightpurple: #c2bbee; $red: #E92F2F; +$yellow: #ffe347; +$green: #23f0c7; // Fonts diff --git a/templates/base.rs.html b/templates/base.rs.html index a42ff03..9fe9488 100644 --- a/templates/base.rs.html +++ b/templates/base.rs.html @@ -69,6 +69,11 @@ +
+ @if let Some(ref message) = ctx.3 { +

@message.1

+ } +
@:content()