Add some feedback when performing some actions (#552)

* Add a way to display flash messages

* Make the flash messages look nice

* Add actual feedback messages

* cargo fmt

* Move flash messages to PlumeRocket

And add trait to convert PlumeRocket to BaseContext

* Remove useless lifetime
This commit is contained in:
Baptiste Gelez
2019-04-30 11:04:25 +01:00
committed by GitHub
parent 18ae6e26b3
commit 8f1ab3485e
40 changed files with 3255 additions and 445 deletions
+164 -52
View File
@@ -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 ""