Edit blogs, and add blog icons and banners (#460)

Also adds a parameter to `md_to_html` to only render inline elements (so that we don't have titles or images in blog descriptions). And moves the delete button for the blog on the edition page.

I still have to update the SQLite migration once others PRs with migrations will be merged.

Also, there will be a problem when you edit a blog while not owning its banner or icon: when validating they will be reset to their default values… I don't see a good solution to this until we have a better way to handle uploads with Rocket (the same is probably happening for articles btw).

And the icon/banner are not federated yet, I don't know if I should add it to this PR or if it can come after?

![image](https://user-images.githubusercontent.com/16254623/53894510-7d853300-4030-11e9-8a2c-f5c0b0c7f512.png)
![image](https://user-images.githubusercontent.com/16254623/53894539-8b3ab880-4030-11e9-8113-685a27be8d7c.png)

Fixes #453
Fixes #454
This commit is contained in:
Baptiste Gelez
2019-03-22 19:51:36 +01:00
committed by GitHub
parent 6cd9c8a01a
commit bdfad844d7
41 changed files with 1391 additions and 456 deletions
+101 -70
View File
@@ -12,95 +12,107 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
# src/template_utils.rs:34
# src/template_utils.rs:68
msgid "{0} commented your article."
msgstr ""
# src/template_utils.rs:35
# src/template_utils.rs:69
msgid "{0} is subscribed to you."
msgstr ""
# src/template_utils.rs:36
# src/template_utils.rs:70
msgid "{0} liked your article."
msgstr ""
# src/template_utils.rs:37
# src/template_utils.rs:71
msgid "{0} mentioned you."
msgstr ""
# src/template_utils.rs:38
# src/template_utils.rs:72
msgid "{0} boosted your article."
msgstr ""
# src/template_utils.rs:68
# src/template_utils.rs:108
msgid "{0}'s avatar"
msgstr ""
# src/routes/blogs.rs:64
# src/routes/blogs.rs:70
msgid "You need to be logged in order to create a new blog"
msgstr ""
# src/routes/blogs.rs:134
# src/routes/blogs.rs:169
msgid "You are not allowed to delete this blog."
msgstr ""
# src/routes/likes.rs:41
# src/routes/blogs.rs:214
msgid "You are not allowed to edit this blog."
msgstr ""
# src/routes/blogs.rs:253
msgid "You can't use this media as blog icon."
msgstr ""
# src/routes/blogs.rs:271
msgid "You can't use this media as blog banner."
msgstr ""
# src/routes/likes.rs:47
msgid "You need to be logged in order to like a post"
msgstr ""
# src/routes/notifications.rs:23
# src/routes/notifications.rs:29
msgid "You need to be logged in order to see your notifications"
msgstr ""
# src/routes/posts.rs:81
# src/routes/posts.rs:92
msgid "This post isn't published yet."
msgstr ""
# src/routes/posts.rs:100
# src/routes/posts.rs:120
msgid "You need to be logged in order to write a new post"
msgstr ""
# src/routes/posts.rs:113
# src/routes/posts.rs:138
msgid "You are not author in this blog."
msgstr ""
# src/routes/posts.rs:119
# src/routes/posts.rs:145
msgid "New post"
msgstr ""
# src/routes/posts.rs:156
# src/routes/posts.rs:190
msgid "Edit {0}"
msgstr ""
# src/routes/reshares.rs:41
# src/routes/reshares.rs:47
msgid "You need to be logged in order to reshare a post"
msgstr ""
# src/routes/session.rs:161
# src/routes/session.rs:181
msgid "Password reset"
msgstr ""
# src/routes/session.rs:162
# src/routes/session.rs:182
msgid "Here is the link to reset your password: {0}"
msgstr ""
# src/routes/session.rs:222
# src/routes/session.rs:259
msgid "Your password was successfully reset."
msgstr ""
# src/routes/session.rs:224
# src/routes/session.rs:263
msgid "Sorry, but the link expired. Try again"
msgstr ""
# src/routes/user.rs:126
# src/routes/user.rs:148
msgid "You need to be logged in order to access your dashboard"
msgstr ""
# src/routes/user.rs:159
# src/routes/user.rs:187
msgid "You need to be logged in order to subscribe to someone"
msgstr ""
# src/routes/user.rs:240
# src/routes/user.rs:287
msgid "You need to be logged in order to edit your profile"
msgstr ""
@@ -188,11 +200,11 @@ msgstr ""
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Name"
msgstr ""
# src/template_utils.rs:146
# src/template_utils.rs:220
msgid "Optional"
msgstr ""
@@ -208,7 +220,7 @@ msgstr ""
msgid "Long description"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Default article license"
msgstr ""
@@ -245,15 +257,14 @@ msgstr ""
msgid "Upload an avatar"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Display name"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Email"
msgstr ""
# src/template_utils.rs:144
msgid "Summary"
msgstr ""
@@ -299,15 +310,15 @@ msgstr ""
msgid "Create an account"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Username"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Password"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Password confirmation"
msgstr ""
@@ -377,6 +388,12 @@ msgstr ""
msgid "Read the detailed rules"
msgstr ""
msgid "None"
msgstr ""
msgid "No description"
msgstr ""
msgid "View all"
msgstr ""
@@ -392,71 +409,71 @@ msgstr ""
msgid "Advanced search"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Article title matching these words"
msgstr ""
msgid "Title"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Subtitle matching these words"
msgstr ""
msgid "Subtitle - byline"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Content matching these words"
msgstr ""
msgid "Body content"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "From this date"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "To this date"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Containing these tags"
msgstr ""
msgid "Tags"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Posted on one of these instances"
msgstr ""
msgid "Instance domain"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Posted by one of these authors"
msgstr ""
msgid "Authors"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Posted on one of these blogs"
msgstr ""
msgid "Blog title"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Written in this language"
msgstr ""
msgid "Language"
msgstr ""
# src/template_utils.rs:185
# src/template_utils.rs:305
msgid "Published under this license"
msgstr ""
@@ -478,11 +495,11 @@ msgstr ""
msgid "Reset your password"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "New password"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Confirmation"
msgstr ""
@@ -495,7 +512,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:144
# src/template_utils.rs:217
msgid "E-mail"
msgstr ""
@@ -505,14 +522,14 @@ msgstr ""
msgid "Login"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Username or email"
msgstr ""
msgid "Publish"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Subtitle"
msgstr ""
@@ -525,24 +542,21 @@ msgstr ""
msgid "Upload media"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Tags, separated by commas"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "License"
msgstr ""
# src/template_utils.rs:148
# src/template_utils.rs:225
msgid "Leave it empty to reserve all rights"
msgstr ""
msgid "Illustration"
msgstr ""
msgid "None"
msgstr ""
msgid "This is a draft, don't publish it yet."
msgstr ""
@@ -596,7 +610,7 @@ msgstr ""
msgid "Comments"
msgstr ""
# src/template_utils.rs:144
# src/template_utils.rs:217
msgid "Content warning"
msgstr ""
@@ -642,6 +656,33 @@ msgstr ""
msgid "Sorry about that. If you think this is a bug, please report it."
msgstr ""
msgid "Edit \"{}\""
msgstr ""
msgid "Description"
msgstr ""
msgid "You can upload images to your gallery, to use them as blog icons or banners."
msgstr ""
msgid "Upload images"
msgstr ""
msgid "Blog icon"
msgstr ""
msgid "Blog banner"
msgstr ""
msgid "Update blog"
msgstr ""
msgid "Be very careful, any action taken here can't be reversed."
msgstr ""
msgid "Permanently delete this blog"
msgstr ""
msgid "New Blog"
msgstr ""
@@ -651,24 +692,17 @@ msgstr ""
msgid "Create blog"
msgstr ""
msgid "There's one author on this blog: "
msgid_plural "There are {0} authors on this blog: "
msgstr[0] ""
msgid "There's one article on this blog"
msgid_plural "There are {0} articles on this blog"
msgstr[0] ""
msgid "No posts to see here yet."
msgid "{}'s icon"
msgstr ""
msgid "New article"
msgstr ""
msgid "Be very careful, any action taken here can't be reversed."
msgstr ""
msgid "There's one author on this blog: "
msgid_plural "There are {0} authors on this blog: "
msgstr[0] ""
msgid "Permanently delete this blog"
msgid "No posts to see here yet."
msgstr ""
msgid "Articles tagged \"{0}\""
@@ -695,9 +729,6 @@ msgstr ""
msgid "Media upload"
msgstr ""
msgid "Description"
msgstr ""
msgid "Useful for visually impaired people, as well as licensing information"
msgstr ""