Update rocket_i18n and add gettext_macros (#431)

Internationalization now uses proc-macros that generate the .pot file
automatically.
fix-mobile-margin
Baptiste Gelez 5 years ago committed by GitHub
parent 8696185d1e
commit 7eef4643c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,10 +0,0 @@
[default]
name=Default
runtime=host
config-opts=
run-opts=
prefix=/home/elza/.cache/gnome-builder/install/plume/host
app-id=
postbuild=
prebuild=
default=true

2
.gitignore vendored

@ -4,6 +4,7 @@ rls
rls
translations
po/*.po~
po/plume/*.po~
.env
Rocket.toml
!.gitkeep
@ -19,3 +20,4 @@ search_index
main.css
*.wasm
*.js
.buildconfig

31
Cargo.lock generated

@ -965,6 +965,20 @@ dependencies = [
"encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gettext-macros"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gettext 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gettext-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "gettext-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "glob"
version = "0.2.11"
@ -1816,6 +1830,9 @@ dependencies = [
"diesel 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"dotenv 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"gettext 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gettext-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"gettext-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"guid-create 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"multipart 0.15.4 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1826,7 +1843,7 @@ dependencies = [
"rocket 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rocket_csrf 0.1.0 (git+https://github.com/fdb-hiroshima/rocket_csrf?rev=4a72ea2ec716cb0b26188fb00bccf2ef7d1e031c)",
"rocket_i18n 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rocket_i18n 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rpassword 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rsass 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ructe 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1916,7 +1933,7 @@ dependencies = [
"serde 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.84 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"tantivy 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tantivy 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"webfinger 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"whatlang 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2320,7 +2337,7 @@ dependencies = [
[[package]]
name = "rocket_i18n"
version = "0.3.1"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gettext 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2754,7 +2771,7 @@ dependencies = [
[[package]]
name = "tantivy"
version = "0.8.0"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"atomicwrites 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
@ -3437,6 +3454,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
"checksum generic-array 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ef25c5683767570c2bbd7deba372926a55eaae9982d7726ee2a1050239d45b9d"
"checksum gettext 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4378b8e09fd51cfdb0d48f40929a5c358efeeb62feb458c7d6eab979fae231f4"
"checksum gettext-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e977a8090ecd681d1c54f49ced1fa7cea8edca94e16e597642845c66e4b48aa8"
"checksum gettext-utils 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "46dd079379f756f6a1ae74b051813e242893f84fbf6ac898bce827fc77958d70"
"checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
"checksum guid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e691c64d9b226c7597e29aeb46be753beb8c9eeef96d8c78dfd4d306338a38da"
"checksum guid-create 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fcea207bf7a6092166ab590f98fe5dde5a7deed1f1920d98dcac31f80814c40d"
@ -3569,7 +3588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum rocket_contrib 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f73e161dad5730435f51c815a5c6831d2e57b6b4299b1bf609d31b09aa9a2fa7"
"checksum rocket_csrf 0.1.0 (git+https://github.com/fdb-hiroshima/rocket_csrf?rev=4a72ea2ec716cb0b26188fb00bccf2ef7d1e031c)" = "<none>"
"checksum rocket_http 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba9d4f2ce5bba6e1b6d3100493bbad63879e99bbf6b4365d61e6f781daab324d"
"checksum rocket_i18n 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f10dc7394c8c400d20a86d25b8d6f6f8066cadd5e849ceed611bc6c28e1aaac5"
"checksum rocket_i18n 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc76ce146d0650cd38ee343202c95c8a891311f1ddad54feb9ecf8709cc2c86b"
"checksum rpassword 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d37473170aedbe66ffa3ad3726939ba677d83c646ad4fd99e5b4bc38712f45ec"
"checksum rsass 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7a5dde55023a6c19470f7aeb59f75f897d8b80cbe00d61dfcaf7bbbe3de4c0a6"
"checksum ructe 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f3f9eb3b594c23d84efd966b7ce800d11eabc2d672f2d555b1e3acde43120ec6"
@ -3619,7 +3638,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum syn 0.15.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9545a6a093a3f0bd59adb472700acc08cad3776f860f16a897dfce8c88721cbc"
"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6"
"checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
"checksum tantivy 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8c326ada20e6ca90d39c3d10a51a740e4069d530b6d393b3af62d7f5f685ee11"
"checksum tantivy 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "252c9134bcd3a045c770ecc3a896a73e98fd8ed124b4380b837451f17b04d96b"
"checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
"checksum tempfile 3.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "7e91405c14320e5c79b3d148e1c86f40749a36e490642202a31689cb1a3452b2"
"checksum tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b"

@ -11,12 +11,15 @@ canapi = "0.2"
colored = "1.7"
dotenv = "0.13"
failure = "0.1"
gettext = "0.3"
gettext-macros = "0.3"
gettext-utils = "0.1"
guid-create = "0.1"
heck = "0.3.0"
num_cpus = "1.0"
rocket = "0.4.0"
rocket_contrib = { version = "0.4.0", features = ["json"] }
rocket_i18n = "0.3.1"
rocket_i18n = "0.4.0"
rpassword = "2.0"
scheduled-thread-pool = "0.2.0"
serde = "1.0"
@ -63,7 +66,6 @@ rev = "4a72ea2ec716cb0b26188fb00bccf2ef7d1e031c"
[build-dependencies]
ructe = "0.5.6"
rocket_i18n = { version = "0.3.1", features = ["build"] }
rsass = "0.9"
[features]

@ -1,5 +1,4 @@
extern crate ructe;
extern crate rocket_i18n;
extern crate rsass;
use ructe::*;
use std::{env, fs::*, io::Write, path::PathBuf};
@ -10,10 +9,6 @@ fn main() {
.join("templates");
compile_templates(&in_dir, &out_dir).expect("compile templates");
println!("cargo:rerun-if-changed=po");
rocket_i18n::update_po("plume", &["de", "en", "fr", "gl", "it", "ja", "nb", "pl", "ru"]);
rocket_i18n::compile_po("plume", &["de", "en", "fr", "gl", "it", "ja", "nb", "pl", "ru"]);
println!("cargo:rerun-if-changed=static/css");
let mut out = File::create("static/css/main.css").expect("Couldn't create main.css");
out.write_all(

@ -78,17 +78,6 @@ impl Notification {
.map_err(Error::from)
}
pub fn get_message(&self) -> &'static str {
match self.kind.as_ref() {
notification_kind::COMMENT => "{0} commented your article.",
notification_kind::FOLLOW => "{0} is now following you.",
notification_kind::LIKE => "{0} liked your article.",
notification_kind::MENTION => "{0} mentioned you.",
notification_kind::RESHARE => "{0} boosted your article.",
_ => unreachable!("Notification::get_message: Unknow type"),
}
}
pub fn get_url(&self, conn: &Connection) -> Option<String> {
match self.kind.as_ref() {
notification_kind::COMMENT => self.get_post(conn).and_then(|p| Some(format!("{}#comment-{}", p.url(conn).ok()?, self.object_id))),

File diff suppressed because it is too large Load Diff

@ -1,680 +1,653 @@
msgid ""
msgstr ""
"Project-Id-Version: plume\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-06-15 16:33-0700\n"
"PO-Revision-Date: 2018-06-15 16:33-0700\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Latest articles"
msgstr ""
msgid "No articles to see here yet."
msgstr ""
msgid "New article"
msgstr ""
msgid "New blog"
msgstr ""
msgid "Create a blog"
msgstr ""
msgid "Title"
# src/template_utils.rs:34
msgid "{0} commented your article."
msgstr ""
msgid "Create the blog"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgstr ""
msgid "Comment \"{0}\""
# src/template_utils.rs:36
msgid "{0} liked your article."
msgstr ""
msgid "Content"
# src/template_utils.rs:37
msgid "{0} mentioned you."
msgstr ""
msgid "Submit your comment"
# src/template_utils.rs:38
msgid "{0} boosted your article."
msgstr ""
msgid "Something broke on our side."
# src/template_utils.rs:68
msgid "{0}'s avatar"
msgstr ""
msgid "Sorry about that. If you think this is a bug, please report it."
# src/routes/blogs.rs:65
msgid "You need to be logged in order to create a new blog"
msgstr ""
msgid "Configuration"
# src/routes/blogs.rs:136
msgid "You are not allowed to delete this blog."
msgstr ""
msgid "Configure your instance"
# src/routes/likes.rs:41
msgid "You need to be logged in order to like a post"
msgstr ""
msgid "Name"
# src/routes/notifications.rs:23
msgid "You need to be logged in order to see your notifications"
msgstr ""
msgid "Let&#x27;s go!"
# src/routes/posts.rs:81
msgid "This post isn't published yet."
msgstr ""
msgid "Welcome to {0}"
# src/routes/posts.rs:100
msgid "You need to be logged in order to write a new post"
msgstr ""
msgid "Notifications"
# src/routes/posts.rs:113
msgid "You are not author in this blog."
msgstr ""
msgid "Written by {0}"
# src/routes/posts.rs:119
msgid "New post"
msgstr ""
msgid "This article is published under the {0} license."
# src/routes/posts.rs:156
msgid "Edit {0}"
msgstr ""
#, fuzzy
msgid "One like"
msgid_plural "{0} likes"
msgstr[0] "One follower"
msgstr[1] "{{ count }} followers"
msgid "I don&#x27;t like this anymore"
# src/routes/reshares.rs:41
msgid "You need to be logged in order to reshare a post"
msgstr ""
msgid "Add yours"
# src/routes/user.rs:131
msgid "You need to be logged in order to access your dashboard"
msgstr ""
msgid "One boost"
msgid_plural "{0} Boosts"
msgstr[0] ""
msgstr[1] ""
msgid "I don&#x27;t want this boosted anymore"
# src/routes/user.rs:164
msgid "You need to be logged in order to follow someone"
msgstr ""
msgid "Boost"
# src/routes/user.rs:227
msgid "You need to be logged in order to edit your profile"
msgstr ""
msgid "Comments"
msgstr ""
msgid "Plume"
msgstr "Plume"
msgid "Respond"
msgid "Menu"
msgstr ""
msgid "Comment"
msgid "Search"
msgstr ""
msgid "Create an article"
msgid "Dashboard"
msgstr ""
msgid "Publish"
msgid "Notifications"
msgstr ""
msgid "Login"
msgid "Log Out"
msgstr ""
msgid "Username, or email"
msgid "My account"
msgstr ""
msgid "Password"
msgid "Log In"
msgstr ""
msgid "Dashboard"
msgid "Register"
msgstr ""
msgid "Your Dashboard"
msgid "About this instance"
msgstr ""
msgid "Your blogs"
msgid "Source code"
msgstr ""
msgid "You don&#x27;t have any blog yet. Create your own, or ask to join one."
msgid "Matrix room"
msgstr ""
msgid "Start a new blog"
msgid "Administration"
msgstr ""
msgid "Admin"
msgid "Welcome on {}"
msgstr ""
msgid "That's you"
msgid "Latest articles"
msgstr ""
msgid "Edit your profile"
msgid "Your feed"
msgstr ""
msgid "Open on {0}"
msgid "Federated feed"
msgstr ""
msgid "Follow"
msgid "Local feed"
msgstr ""
#, fuzzy
msgid "Unfollow"
msgstr "One follower"
msgid "Recently boosted"
msgid "Administration of {0}"
msgstr ""
#, fuzzy
msgid "One follower"
msgid_plural "{0} followers"
msgstr[0] "One follower"
msgstr[1] "{{ count }} followers"
msgid "Edit your account"
msgid "Instances"
msgstr ""
msgid "Your profile"
msgid "Configuration"
msgstr ""
msgid "Display Name"
msgid "Users"
msgstr ""
msgid "Email"
msgid "Unblock"
msgstr ""
msgid "Summary"
msgid "Block"
msgstr ""
msgid "Update your account"
msgid "Ban"
msgstr ""
#, fuzzy
msgid "{0}'s followers"
msgstr "One follower"
#, fuzzy
msgid "Followers"
msgstr "One follower"
msgid "New Account"
msgid "All the articles of the Fediverse"
msgstr ""
msgid "Create an account"
msgid "Articles from {}"
msgstr ""
msgid "Username"
msgid "Nothing to see here yet. Try to follow more people."
msgstr ""
msgid "Password confirmation"
# src/template_utils.rs:144
msgid "Name"
msgstr ""
msgid "Create account"
# src/template_utils.rs:146
msgid "Optional"
msgstr ""
msgid "Plume"
msgid "Allow anyone to register here"
msgstr ""
msgid "Menu"
msgid "Short description - byline"
msgstr ""
msgid "My account"
msgid "Markdown syntax is supported"
msgstr ""
msgid "Log Out"
msgid "Long description"
msgstr ""
msgid "Log In"
# src/template_utils.rs:144
msgid "Default article license"
msgstr ""
msgid "Register"
msgid "Save these settings"
msgstr ""
msgid "You need to be signed in, for you to create a new blog"
msgid "About {0}"
msgstr ""
msgid "You need to be signed in, so that you can post a comment"
msgid "Home to <em>{0}</em> users"
msgstr ""
msgid "You need to be signed in, to be able to like a post"
msgid "Who wrote <em>{0}</em> articles"
msgstr ""
msgid "You need to be logged in, so that you can see your notifications"
msgid "And connected to <em>{0}</em> other instances"
msgstr ""
msgid "You need to be logged in, to be able to write a new post"
msgid "Administred by"
msgstr ""
msgid "You need to be logged in, for you to be able to boost a post"
msgid "Runs Plume {0}"
msgstr ""
msgid "Invalid username, or password"
msgid "Edit your account"
msgstr ""
msgid "You need to be logged in, to be able to access your dashboard"
msgid "Your Profile"
msgstr ""
msgid "You need to be logged in, to be able to follow someone"
# src/template_utils.rs:144
msgid "Display name"
msgstr ""
msgid "You need to be logged in, to be able to edit your profile"
# src/template_utils.rs:144
msgid "Email"
msgstr ""
msgid "By {0}"
# src/template_utils.rs:144
msgid "Summary"
msgstr ""
msgid "{0} gave a boost to your article"
msgid "Update account"
msgstr ""
msgid "{0} started following you"
msgid "Danger zone"
msgstr ""
msgid "{0} liked your post"
msgid "Be very careful, any action taken here can't be cancelled."
msgstr ""
msgid "{0} commented on your post"
msgid "Delete your account"
msgstr ""
msgid "We couldn&#x27;t find this page."
msgid "Sorry, but as an admin, you can't leave your own instance."
msgstr ""
msgid "The link that led you here may be broken."
msgid "Your Dashboard"
msgstr ""
msgid "You are not authorized to access this page."
msgid "Your Blogs"
msgstr ""
msgid "You are not an author on this blog."
msgid "You don't have any blog yet. Create your own, or ask to join one."
msgstr ""
msgid "{0} mentioned you."
msgid "Start a new blog"
msgstr ""
msgid "Your comment"
msgid "Your Drafts"
msgstr ""
msgid "Unknown error"
msgid "Your media"
msgstr ""
msgid "Invalid name"
msgid "Go to your gallery"
msgstr ""
msgid "A blog with the same name already exists."
msgid "Create your account"
msgstr ""
msgid "The comment field can't be left empty"
msgid "Create an account"
msgstr ""
msgid "An article with the same title already exists."
# src/template_utils.rs:144
msgid "Username"
msgstr ""
msgid "We need an email, or a username to identify you"
# src/template_utils.rs:144
msgid "Password"
msgstr ""
msgid "Your password field can't be left empty"
# src/template_utils.rs:144
msgid "Password confirmation"
msgstr ""
msgid "The two passwords must be a match!"
msgid ""
"Apologies, but registrations are closed on this particular instance. You "
"can, however, find a different one."
msgstr ""
msgid "The 'username' field can't be left empty"
msgid "Articles"
msgstr ""
msgid "Invalid email"
msgid "Followers"
msgstr ""
msgid "The password should be at least 8 characters long"
msgid "Atom feed"
msgstr ""
msgid "This blog has one author: "
msgid_plural "This blog has {0} authors: "
msgstr[0] ""
msgstr[1] ""
msgid ""
"Log in, or use your other account within the Fediverse, to interact with "
"this article"
msgid "Recently boosted"
msgstr ""
msgid "Optional"
msgid "Admin"
msgstr ""
msgid "This blog has one article"
msgid_plural "This blog has {0} articles"
msgstr[0] ""
msgstr[1] ""
msgid "Previous page"
msgid "It is you"
msgstr ""
msgid "Next page"
msgid "Edit your profile"
msgstr ""
msgid "Source code"
msgid "Open on {0}"
msgstr ""
msgid "Matrix room"
msgid "Unfollow"
msgstr ""
msgid "Administration"
msgid "Follow"
msgstr ""
msgid "Instance settings"
msgid "{0}'s followers"
msgstr ""
msgid "Allow anyone to register here"
msgid "Respond"
msgstr ""
msgid "Short description - byline"
msgid "Delete this comment"
msgstr ""
msgid "Markdown syntax is supported"
msgid "What is Plume?"
msgstr ""
msgid "Long description"
msgid "Plume is a decentralized blogging engine."
msgstr ""
msgid "Default article license"
msgid "Authors can manage various blogs from an unique website."
msgstr ""
msgid "Save these settings"
msgid ""
"Articles are also visible on other Plume websites, and you can interact with "
"them directly from other platforms like Mastodon."
msgstr ""
msgid "There are no comments here yet. Be the first to react!"
msgid "Home to <em>{0}</em> people"
msgstr ""
msgid "About this instance"
msgid "Read the detailed rules"
msgstr ""
msgid "What is Plume?"
msgid "View all"
msgstr ""
msgid "Plume is a decentralized blogging engine and a member of the Fediverse."
msgid "By {0}"
msgstr ""
msgid "Authors can manage various blogs, each from a separate, unique website."
msgid "Draft"
msgstr ""
msgid ""
"Articles are also visible on other Plume websites, called instances, and you "
"can interact with them directly from other platforms like Mastodon, or "
"WriteFreely."
msgid "Your query"
msgstr ""
msgid "Create your account"
msgid "Advanced search"
msgstr ""
msgid "About {0}"
# src/template_utils.rs:185
msgid "Article title matching these words"
msgstr ""
msgid "Home to <em>{0}</em> users"
msgid "Title"
msgstr ""
msgid "Who wrote <em>{0}</em> articles"
# src/template_utils.rs:185
msgid "Subtitle matching these words"
msgstr ""
msgid "And are connected to <em>{0}</em> other instances"
msgid "Subtitle - byline"
msgstr ""
msgid "Read the detailed rules"
# src/template_utils.rs:185
msgid "Content matching these words"
msgstr ""
msgid "Delete this article"
msgid "Body content"
msgstr ""
msgid "Delete this blog"
# src/template_utils.rs:185
msgid "From this date"
msgstr ""
msgid "Administred by"
# src/template_utils.rs:185
msgid "To this date"
msgstr ""
msgid "Runs Plume {0}"
# src/template_utils.rs:185
msgid "Containing these tags"
msgstr ""
msgid "Your media"
msgid "Tags"
msgstr ""
msgid "Go to your gallery"
# src/template_utils.rs:185
msgid "Posted on one of these instances"
msgstr ""
msgid "{0}'s avatar'"
msgid "Instance domain"
msgstr ""
msgid "Media details"
# src/template_utils.rs:185
msgid "Posted by one of these authors"
msgstr ""
msgid "Go back to the gallery"
msgid "Authors"
msgstr ""
msgid "Markdown syntax"
# src/template_utils.rs:185
msgid "Posted on one of these blogs"
msgstr ""
msgid "Copy it into your articles, to insert this media."
msgid "Blog title"
msgstr ""
msgid "Use as an avatar"
# src/template_utils.rs:185
msgid "Written in this language"
msgstr ""
msgid "Delete"
msgid "Language"
msgstr ""
msgid "Upload"
# src/template_utils.rs:185
msgid "Published under this license"
msgstr ""
msgid "You don't have any media uploaded yet."
msgid "Article license"
msgstr ""
msgid "Media upload"
msgid "Search result for \"{0}\""
msgstr ""
msgid "Description"
msgid "Search result"
msgstr ""
msgid "Content warning"
msgid "No result for your query"
msgstr ""
msgid "File"
msgid "No more result for your query"
msgstr ""
msgid "Send"
msgid "Login"
msgstr ""
msgid ""
"Apologies, but registrations are closed on this particular instance. You "
"can, however, find a different one."
# src/template_utils.rs:144
msgid "Username or email"
msgstr ""
# src/template_utils.rs:144
msgid "Subtitle"
msgstr ""
msgid "Log In to like"
msgid "Content"
msgstr ""
msgid "Log In to boost"
# src/template_utils.rs:144
msgid "Tags, separated by commas"
msgstr ""
msgid "Personal feed"
# src/template_utils.rs:144
msgid "License"
msgstr ""
msgid "Federated feed"
# src/template_utils.rs:148
msgid "Leave it empty to reserve all rights"
msgstr ""
msgid "Local feed"
msgid "Illustration"
msgstr ""
msgid "Nothing to see here yet. Try to follow some people."
msgid "None"
msgstr ""
msgid "Articles"
msgid "This is a draft, don't publish it yet."
msgstr ""
msgid "All of the articles within the Fediverse"
msgid "Update"
msgstr ""
#, fuzzy
msgid "Articles from {0}"
msgstr "Welcome to {{ instance_name }}"
msgid "View all"
msgid "Update, or publish"
msgstr ""
#, fuzzy
msgid "Articles tagged under \"{0}\""
msgstr "Welcome to {{ instance_name }}"
msgid "Edit"
msgid "Publish your post"
msgstr ""
msgid "Edit {0}"
msgid "Written by {0}"
msgstr ""
msgid "Update"
msgid "Edit"
msgstr ""
msgid "We couldn't find this page."
msgid "Delete this article"
msgstr ""
msgid "Invalid CSRF token."
msgid "All rights reserved."
msgstr ""
msgid ""
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
"you browser, and try reloading this page. If you continue to see this error "
"message, please report it."
msgid "This article is under the {0} license."
msgstr ""
#, fuzzy
msgid "Administration of {0}"
msgstr "Welcome to {{ instance_name }}"
msgid "One like"
msgid_plural "{0} likes"
msgstr[0] ""
msgstr[1] ""
msgid "Instances"
msgid "I don't like this anymore"
msgstr ""
msgid "Unblock"
msgid "Add yours"
msgstr ""
msgid "Block"
msgstr ""
msgid "One boost"
msgid_plural "{0} boost"
msgstr[0] ""
msgstr[1] ""
msgid "Ban"
msgid "I don't want to boost this anymore"
msgstr ""
msgid "Useful for visually impaired people and information about licenses"
msgid "Boost"
msgstr ""
msgid "Leave it empty, if none is meeded"
msgid "Login or use your Fediverse account to interact with this article"
msgstr ""
msgid "Draft"
msgid "Comments"
msgstr ""
msgid "This is a draft, don't publish it yet."
# src/template_utils.rs:144
msgid "Content warning"
msgstr ""
msgid "Update, or publish"
msgid "Your comment"
msgstr ""
msgid "Your drafts"
msgid "Submit comment"
msgstr ""
msgid "Danger zone"
msgid "No comments yet. Be the first to react!"
msgstr ""
msgid "Be very careful, any action taken here cannot be reversed."
msgid "Invalid CSRF token"
msgstr ""
msgid "Delete your account"
msgid ""
"Something is wrong with your CSRF token. Make sure cookies are enabled in "
"you browser, and try reloading this page. If you continue to see this error "
"message, please report it."
msgstr ""
msgid "Sorry, but as an admin, you can't leave your own instance."
msgid "Page not found"
msgstr ""
msgid "Users"
msgid "We couldn't find this page."
msgstr ""
msgid "This post isn't published yet."
msgid "The link that led you here may be broken."
msgstr ""
msgid "There are currently no articles with such a tag"
msgid "The content you sent can't be processed."
msgstr ""
msgid "Illustration"
msgid "Maybe it was too long."
msgstr ""
msgid "None"
msgid "You are not authorized."
msgstr ""
msgid "Leave empty to reserve all rights"
msgid "Internal server error"
msgstr ""
msgid "All rights reserved."
msgid "Something broke on our side."
msgstr ""
msgid "Search"
msgid "Sorry about that. If you think this is a bug, please report it."
msgstr ""
msgid "Your query"
msgid "New Blog"
msgstr ""
msgid "Advanced search"
msgid "Create a blog"
msgstr ""
msgid "Article title matching these words"
msgid "Create blog"
msgstr ""
msgid "Subtitle matching these words"
msgstr ""
msgid "There's one author on this blog: "
msgid_plural "There are {0} authors on this blog: "
msgstr[0] ""
msgstr[1] ""
msgid "Content matching these words"
msgstr ""
msgid "There's one article on this blog"
msgid_plural "There are {0} articles on this blog"
msgstr[0] ""
msgstr[1] ""
msgid "From this date"
msgid "No posts to see here yet."
msgstr ""
msgid "To this date"
msgid "New article"
msgstr ""
msgid "Containing these tags"
msgid "Be very careful, any action taken here can't be reversed."
msgstr ""
msgid "Posted on one of these instances"
msgid "Permanently delete this blog"
msgstr ""
msgid "Posted by one of these authors"
msgid "Articles tagged \"{0}\""
msgstr ""
msgid "Posted on one of these blogs"
msgid "There are currently no articles with such a tag"
msgstr ""
msgid "Written in this language"
msgid "Upload"
msgstr ""
msgid "Published under this license"
msgid "You don't have any media yet."
msgstr ""
msgid "Search result for \"{0}\""
msgid "Delete"
msgstr ""
msgid "Search result"
msgid "Media upload"
msgstr ""
msgid "No result for your query"
msgid "Description"
msgstr ""
msgid "No more result for your query"
msgid "Useful for visually impaired people, as well as licensing information"
msgstr ""
msgid "Subtitle — byline"
msgid "Leave it empty, if none is needed"
msgstr ""
msgid "Body content"
msgid "File"
msgstr ""
msgid "Tags"
msgid "Send"
msgstr ""
msgid "Instance domain"
msgid "Media details"
msgstr ""
msgid "Authors"
msgid "Go back to the gallery"
msgstr ""
msgid "Blog title"
msgid "Markdown syntax"
msgstr ""
msgid "Language"
msgid "Copy it into your articles, to insert this media:"
msgstr ""
msgid "Article license"
msgid "Use as avatar"
msgstr ""

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -12,652 +12,651 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
msgid "Latest articles"
msgstr ""
msgid "No articles to see here yet."
msgstr ""
msgid "New article"
msgstr ""
msgid "New blog"
# src/template_utils.rs:34
msgid "{0} commented your article."
msgstr ""
msgid "Create a blog"
msgstr ""
msgid "Title"
msgstr ""
msgid "Create the blog"
msgstr ""
msgid "Comment \"{0}\""
msgstr ""
msgid "Content"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgstr ""
msgid "Submit your comment"
# src/template_utils.rs:36
msgid "{0} liked your article."
msgstr ""
msgid "Something broke on our side."
# src/template_utils.rs:37
msgid "{0} mentioned you."
msgstr ""
msgid "Sorry about that. If you think this is a bug, please report it."
# src/template_utils.rs:38
msgid "{0} boosted your article."
msgstr ""
msgid "Configuration"
# src/template_utils.rs:68
msgid "{0}'s avatar"
msgstr ""
msgid "Configure your instance"
# src/routes/blogs.rs:65
msgid "You need to be logged in order to create a new blog"
msgstr ""
msgid "Name"
# src/routes/blogs.rs:136
msgid "You are not allowed to delete this blog."
msgstr ""
msgid "Let&#x27;s go!"
# src/routes/likes.rs:41
msgid "You need to be logged in order to like a post"
msgstr ""
msgid "Welcome to {0}"
# src/routes/notifications.rs:23
msgid "You need to be logged in order to see your notifications"
msgstr ""
msgid "Notifications"
# src/routes/posts.rs:81
msgid "This post isn't published yet."
msgstr ""
msgid "Written by {0}"
# src/routes/posts.rs:100
msgid "You need to be logged in order to write a new post"
msgstr ""
msgid "This article is published under the {0} license."
# src/routes/posts.rs:113
msgid "You are not author in this blog."
msgstr ""
msgid "One like"
msgid_plural "{0} likes"
msgstr[0] ""
msgstr[1] ""
msgid "I don&#x27;t like this anymore"
# src/routes/posts.rs:119
msgid "New post"
msgstr ""
msgid "Add yours"
# src/routes/posts.rs:156
msgid "Edit {0}"
msgstr ""
msgid "One boost"
msgid_plural "{0} Boosts"
msgstr[0] ""
msgstr[1] ""
msgid "I don&#x27;t want this boosted anymore"
# src/routes/reshares.rs:41
msgid "You need to be logged in order to reshare a post"
msgstr ""
msgid "Boost"
# src/routes/user.rs:131
msgid "You need to be logged in order to access your dashboard"
msgstr ""
msgid "Comments"
# src/routes/user.rs:164
msgid "You need to be logged in order to follow someone"
msgstr ""
msgid "Respond"
# src/routes/user.rs:227
msgid "You need to be logged in order to edit your profile"
msgstr ""
msgid "Comment"
msgid "Plume"
msgstr ""
msgid "Create an article"
msgid "Menu"
msgstr ""
msgid "Publish"
msgid "Search"
msgstr ""
msgid "Login"
msgid "Dashboard"
msgstr ""
msgid "Username, or email"
msgid "Notifications"
msgstr ""
msgid "Password"
msgid "Log Out"
msgstr ""
msgid "Dashboard"
msgid "My account"
msgstr ""
msgid "Your Dashboard"
msgid "Log In"
msgstr ""
msgid "Your blogs"
msgid "Register"
msgstr ""
msgid "You don&#x27;t have any blog yet. Create your own, or ask to join one."
msgid "About this instance"
msgstr ""
msgid "Start a new blog"
msgid "Source code"
msgstr ""
msgid "Admin"
msgid "Matrix room"
msgstr ""
msgid "That's you"
msgid "Administration"
msgstr ""
msgid "Edit your profile"
msgid "Welcome on {}"
msgstr ""
msgid "Open on {0}"
msgid "Latest articles"
msgstr ""
msgid "Follow"
msgid "Your feed"
msgstr ""
msgid "Unfollow"
msgid "Federated feed"
msgstr ""
msgid "Recently boosted"
msgid "Local feed"
msgstr ""
msgid "One follower"
msgid_plural "{0} followers"
msgstr[0] ""
msgstr[1] ""
msgid "Edit your account"
msgid "Administration of {0}"
msgstr ""
msgid "Your profile"
msgid "Instances"
msgstr ""
msgid "Display Name"
msgid "Configuration"
msgstr ""
msgid "Email"
msgid "Users"
msgstr ""
msgid "Summary"
msgid "Unblock"
msgstr ""
msgid "Update your account"
msgid "Block"
msgstr ""
msgid "{0}'s followers"
msgid "Ban"
msgstr ""
msgid "Followers"
msgid "All the articles of the Fediverse"
msgstr ""
msgid "New Account"
msgid "Articles from {}"
msgstr ""
msgid "Create an account"
msgid "Nothing to see here yet. Try to follow more people."
msgstr ""
msgid "Username"
# src/template_utils.rs:144
msgid "Name"
msgstr ""
msgid "Password confirmation"
# src/template_utils.rs:146
msgid "Optional"
msgstr ""
msgid "Create account"
msgid "Allow anyone to register here"
msgstr ""
msgid "Plume"
msgid "Short description - byline"
msgstr ""
msgid "Menu"
msgid "Markdown syntax is supported"
msgstr ""
msgid "My account"
msgid "Long description"
msgstr ""
msgid "Log Out"
# src/template_utils.rs:144
msgid "Default article license"
msgstr ""
msgid "Log In"
msgid "Save these settings"
msgstr ""
msgid "Register"
msgid "About {0}"
msgstr ""
msgid "You need to be signed in, for you to create a new blog"
msgid "Home to <em>{0}</em> users"
msgstr ""
msgid "You need to be signed in, so that you can post a comment"
msgid "Who wrote <em>{0}</em> articles"
msgstr ""
msgid "You need to be signed in, to be able to like a post"
msgid "And connected to <em>{0}</em> other instances"
msgstr ""
msgid "You need to be logged in, so that you can see your notifications"
msgid "Administred by"
msgstr ""
msgid "You need to be logged in, to be able to write a new post"
msgid "Runs Plume {0}"
msgstr ""
msgid "You need to be logged in, for you to be able to boost a post"
msgid "Edit your account"
msgstr ""
msgid "Invalid username, or password"
msgid "Your Profile"
msgstr ""
msgid "You need to be logged in, to be able to access your dashboard"
# src/template_utils.rs:144
msgid "Display name"
msgstr ""
msgid "You need to be logged in, to be able to follow someone"
# src/template_utils.rs:144
msgid "Email"
msgstr ""
msgid "You need to be logged in, to be able to edit your profile"
# src/template_utils.rs:144
msgid "Summary"
msgstr ""
msgid "By {0}"
msgid "Update account"
msgstr ""
msgid "{0} gave a boost to your article"
msgid "Danger zone"
msgstr ""
msgid "{0} started following you"
msgid "Be very careful, any action taken here can't be cancelled."
msgstr ""
msgid "{0} liked your post"
msgid "Delete your account"
msgstr ""
msgid "{0} commented on your post"
msgid "Sorry, but as an admin, you can't leave your own instance."
msgstr ""
msgid "We couldn&#x27;t find this page."
msgid "Your Dashboard"
msgstr ""
msgid "The link that led you here may be broken."
msgid "Your Blogs"
msgstr ""
msgid "You are not authorized to access this page."
msgid "You don't have any blog yet. Create your own, or ask to join one."
msgstr ""
msgid "You are not an author on this blog."
msgid "Start a new blog"
msgstr ""
msgid "{0} mentioned you."
msgid "Your Drafts"
msgstr ""
msgid "Your comment"
msgid "Your media"
msgstr ""
msgid "Unknown error"
msgid "Go to your gallery"
msgstr ""
msgid "Invalid name"
msgid "Create your account"
msgstr ""
msgid "A blog with the same name already exists."
msgid "Create an account"
msgstr ""
msgid "The comment field can't be left empty"
# src/template_utils.rs:144
msgid "Username"
msgstr ""
msgid "An article with the same title already exists."
# src/template_utils.rs:144
msgid "Password"
msgstr ""
msgid "We need an email, or a username to identify you"
# src/template_utils.rs:144
msgid "Password confirmation"
msgstr ""
msgid "Your password field can't be left empty"
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
msgstr ""
msgid "The two passwords must be a match!"
msgid "Articles"
msgstr ""
msgid "The 'username' field can't be left empty"
msgid "Followers"
msgstr ""
msgid "Invalid email"
msgid "Atom feed"
msgstr ""
msgid "The password should be at least 8 characters long"
msgid "Recently boosted"
msgstr ""
msgid "This blog has one author: "
msgid_plural "This blog has {0} authors: "
msgstr[0] ""
msgstr[1] ""
msgid "Log in, or use your other account within the Fediverse, to interact with this article"
msgid "Admin"
msgstr ""
msgid "Optional"
msgid "It is you"
msgstr ""
msgid "This blog has one article"
msgid_plural "This blog has {0} articles"
msgstr[0] ""
msgstr[1] ""
msgid "Previous page"
msgid "Edit your profile"
msgstr ""
msgid "Next page"
msgid "Open on {0}"
msgstr ""
msgid "Source code"
msgid "Unfollow"
msgstr ""
msgid "Matrix room"
msgid "Follow"
msgstr ""
msgid "Administration"
msgid "{0}'s followers"
msgstr ""
msgid "Instance settings"
msgid "Respond"
msgstr ""
msgid "Allow anyone to register here"
msgid "Delete this comment"
msgstr ""
msgid "Short description - byline"
msgid "What is Plume?"
msgstr ""
msgid "Markdown syntax is supported"
msgid "Plume is a decentralized blogging engine."
msgstr ""
msgid "Long description"
msgid "Authors can manage various blogs from an unique website."
msgstr ""
msgid "Default article license"
msgid "Articles are also visible on other Plume websites, and you can interact with them directly from other platforms like Mastodon."
msgstr ""
msgid "Save these settings"
msgid "Home to <em>{0}</em> people"
msgstr ""
msgid "There are no comments here yet. Be the first to react!"
msgstr ""
msgid "About this instance"
msgid "Read the detailed rules"
msgstr ""
msgid "What is Plume?"
msgid "View all"
msgstr ""
msgid "Plume is a decentralized blogging engine and a member of the Fediverse."
msgid "By {0}"
msgstr ""
msgid "Authors can manage various blogs, each from a separate, unique website."
msgid "Draft"
msgstr ""
msgid "Articles are also visible on other Plume websites, called instances, and you can interact with them directly from other platforms like Mastodon, or WriteFreely."
msgid "Your query"
msgstr ""
msgid "Create your account"
msgid "Advanced search"
msgstr ""
msgid "About {0}"
# src/template_utils.rs:185
msgid "Article title matching these words"
msgstr ""
msgid "Home to <em>{0}</em> users"
msgid "Title"
msgstr ""
msgid "Who wrote <em>{0}</em> articles"
# src/template_utils.rs:185
msgid "Subtitle matching these words"
msgstr ""
msgid "And are connected to <em>{0}</em> other instances"
msgid "Subtitle - byline"
msgstr ""
msgid "Read the detailed rules"
# src/template_utils.rs:185
msgid "Content matching these words"
msgstr ""
msgid "Delete this article"
msgid "Body content"
msgstr ""
msgid "Delete this blog"
# src/template_utils.rs:185
msgid "From this date"
msgstr ""
msgid "Administred by"
# src/template_utils.rs:185
msgid "To this date"
msgstr ""
msgid "Runs Plume {0}"
# src/template_utils.rs:185
msgid "Containing these tags"
msgstr ""
msgid "Your media"
msgid "Tags"
msgstr ""
msgid "Go to your gallery"
# src/template_utils.rs:185
msgid "Posted on one of these instances"
msgstr ""
msgid "{0}'s avatar'"
msgid "Instance domain"
msgstr ""
msgid "Media details"
# src/template_utils.rs:185
msgid "Posted by one of these authors"
msgstr ""
msgid "Go back to the gallery"
msgid "Authors"
msgstr ""
msgid "Markdown syntax"
# src/template_utils.rs:185
msgid "Posted on one of these blogs"
msgstr ""
msgid "Copy it into your articles, to insert this media."
msgid "Blog title"
msgstr ""
msgid "Use as an avatar"
# src/template_utils.rs:185
msgid "Written in this language"
msgstr ""
msgid "Delete"
msgid "Language"
msgstr ""
msgid "Upload"
# src/template_utils.rs:185
msgid "Published under this license"
msgstr ""
msgid "You don't have any media uploaded yet."
msgid "Article license"
msgstr ""
msgid "Media upload"
msgid "Search result for \"{0}\""
msgstr ""
msgid "Description"
msgid "Search result"
msgstr ""
msgid "Content warning"
msgid "No result for your query"
msgstr ""
msgid "File"
msgid "No more result for your query"
msgstr ""
msgid "Send"
msgid "Login"
msgstr ""
msgid "Apologies, but registrations are closed on this particular instance. You can, however, find a different one."
# src/template_utils.rs:144
msgid "Username or email"
msgstr ""
# src/template_utils.rs:144
msgid "Subtitle"
msgstr ""
msgid "Log In to like"
msgid "Content"
msgstr ""
msgid "Log In to boost"
# src/template_utils.rs:144
msgid "Tags, separated by commas"
msgstr ""
msgid "Personal feed"
# src/template_utils.rs:144
msgid "License"
msgstr ""
msgid "Federated feed"
# src/template_utils.rs:148
msgid "Leave it empty to reserve all rights"
msgstr ""
msgid "Local feed"
msgid "Illustration"
msgstr ""
msgid "Nothing to see here yet. Try to follow some people."
msgid "None"
msgstr ""
msgid "Articles"
msgid "This is a draft, don't publish it yet."
msgstr ""
msgid "All of the articles within the Fediverse"
msgid "Update"
msgstr ""
msgid "Articles from {0}"
msgid "Update, or publish"
msgstr ""
msgid "View all"
msgid "Publish your post"
msgstr ""
msgid "Articles tagged under \"{0}\""
msgid "Written by {0}"
msgstr ""
msgid "Edit"
msgstr ""
msgid "Edit {0}"
msgid "Delete this article"
msgstr ""
msgid "Update"
msgid "All rights reserved."
msgstr ""
msgid "We couldn't find this page."
msgid "This article is under the {0} license."
msgstr ""
msgid "Invalid CSRF token."
msgstr ""
msgid "One like"
msgid_plural "{0} likes"
msgstr[0] ""
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
msgid "I don't like this anymore"
msgstr ""
msgid "Administration of {0}"
msgid "Add yours"
msgstr ""
msgid "Instances"
msgstr ""
msgid "One boost"
msgid_plural "{0} boost"
msgstr[0] ""
msgid "Unblock"
msgid "I don't want to boost this anymore"
msgstr ""
msgid "Block"
msgid "Boost"
msgstr ""
msgid "Ban"
msgid "Login or use your Fediverse account to interact with this article"
msgstr ""
msgid "Useful for visually impaired people and information about licenses"
msgid "Comments"
msgstr ""
msgid "Leave it empty, if none is meeded"
# src/template_utils.rs:144
msgid "Content warning"
msgstr ""
msgid "Draft"
msgid "Your comment"
msgstr ""
msgid "This is a draft, don't publish it yet."
msgid "Submit comment"
msgstr ""
msgid "Update, or publish"
msgid "No comments yet. Be the first to react!"
msgstr ""
msgid "Your drafts"
msgid "Invalid CSRF token"
msgstr ""
msgid "Danger zone"
msgid "Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
msgstr ""
msgid "Be very careful, any action taken here cannot be reversed."
msgid "Page not found"
msgstr ""
msgid "Delete your account"
msgid "We couldn't find this page."
msgstr ""
msgid "Sorry, but as an admin, you can't leave your own instance."
msgid "The link that led you here may be broken."
msgstr ""
msgid "Users"
msgid "The content you sent can't be processed."
msgstr ""
msgid "This post isn't published yet."
msgid "Maybe it was too long."
msgstr ""
msgid "There are currently no articles with such a tag"
msgid "You are not authorized."
msgstr ""
msgid "Illustration"
msgid "Internal server error"
msgstr ""
msgid "None"
msgid "Something broke on our side."
msgstr ""
msgid "Leave empty to reserve all rights"
msgid "Sorry about that. If you think this is a bug, please report it."
msgstr ""
msgid "All rights reserved."
msgid "New Blog"
msgstr ""
msgid "Search"
msgid "Create a blog"
msgstr ""
msgid "Your query"
msgid "Create blog"
msgstr ""
msgid "Advanced search"
msgstr ""
msgid "There's one author on this blog: "
msgid_plural "There are {0} authors on this blog: "
msgstr[0] ""
msgid "Article title matching these words"
msgstr ""
msgid "There's one article on this blog"
msgid_plural "There are {0} articles on this blog"
msgstr[0] ""
msgid "Subtitle matching these words"
msgid "No posts to see here yet."
msgstr ""
msgid "Content matching these words"
msgid "New article"
msgstr ""
msgid "From this date"
msgid "Be very careful, any action taken here can't be reversed."
msgstr ""
msgid "To this date"
msgid "Permanently delete this blog"
msgstr ""
msgid "Containing these tags"
msgid "Articles tagged \"{0}\""
msgstr ""
msgid "Posted on one of these instances"
msgid "There are currently no articles with such a tag"
msgstr ""
msgid "Posted by one of these authors"
msgid "Upload"
msgstr ""
msgid "Posted on one of these blogs"
msgid "You don't have any media yet."
msgstr ""
msgid "Written in this language"
msgid "Delete"
msgstr ""
msgid "Published under this license"
msgid "Media upload"
msgstr ""
msgid "Search result for \"{0}\""
msgid "Description"
msgstr ""
msgid "Search result"
msgid "Useful for visually impaired people, as well as licensing information"
msgstr ""
msgid "No result for your query"
msgid "Leave it empty, if none is needed"
msgstr ""
msgid "No more result for your query"
msgid "File"
msgstr ""
msgid "Subtitle — byline"
msgid "Send"
msgstr ""
msgid "Body content"
msgid "Media details"
msgstr ""
msgid "Tags"
msgid "Go back to the gallery"
msgstr ""
msgid "Instance domain"
msgid "Markdown syntax"
msgstr ""
msgid "Authors"
msgid "Copy it into your articles, to insert this media:"
msgstr ""
msgid "Blog title"
msgid "Use as avatar"
msgstr ""
msgid "Language"
msgid "Login to boost"
msgstr ""
msgid "Article license"
msgid "Login to like"
msgstr ""

File diff suppressed because it is too large Load Diff

@ -10,6 +10,9 @@ extern crate ctrlc;
extern crate diesel;
extern crate dotenv;
extern crate failure;
#[macro_use]
extern crate gettext_macros;
extern crate gettext_utils;
extern crate guid_create;
extern crate heck;
extern crate multipart;
@ -21,7 +24,6 @@ extern crate plume_models;
extern crate rocket;
extern crate rocket_contrib;
extern crate rocket_csrf;
#[macro_use]
extern crate rocket_i18n;
extern crate scheduled_thread_pool;
extern crate serde;
@ -52,12 +54,18 @@ use std::process::exit;
use std::sync::Arc;
use std::time::Duration;
init_i18n!("plume", de, en, fr, gl, it, ja, nb, pl, ru);
mod api;
mod inbox;
#[macro_use]
mod template_utils;
mod routes;
include!(concat!(env!("OUT_DIR"), "/templates.rs"));
compile_i18n!();
type Worker<'a> = State<'a, ScheduledThreadPool>;
type Searcher<'a> = State<'a, Arc<UnmanagedSearcher>>;
@ -216,7 +224,7 @@ Then try to restart Plume.
.manage(dbpool)
.manage(workpool)
.manage(searcher)
.manage(include_i18n!("plume", [ "de", "en", "fr", "gl", "it", "ja", "nb", "pl", "ru" ]))
.manage(include_i18n!())
.attach(CsrfFairingBuilder::new()
.set_default_target("/csrf-violation?target=<uri>".to_owned(), rocket::http::Method::Post)
.add_exceptions(vec![
@ -229,5 +237,3 @@ Then try to restart Plume.
.finalize().expect("main: csrf fairing creation error"))
.launch();
}
include!(concat!(env!("OUT_DIR"), "/templates.rs"));

@ -62,7 +62,7 @@ pub fn new(user: User, conn: DbConn, intl: I18n) -> Ructe {
#[get("/blogs/new", rank = 2)]
pub fn new_auth(i18n: I18n) -> Flash<Redirect>{
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to create a new blog"),
&i18n!(i18n.catalog, "You need to be logged in order to create a new blog"),
uri!(new)
)
}
@ -133,7 +133,7 @@ pub fn delete(conn: DbConn, name: String, user: Option<User>, intl: I18n, search
// TODO actually return 403 error code
Err(render!(errors::not_authorized(
&(&*conn, &intl.catalog, user),
"You are not allowed to delete this blog."
i18n!(intl.catalog, "You are not allowed to delete this blog.")
)))
}
}

@ -38,7 +38,7 @@ pub fn create(blog: String, slug: String, user: User, conn: DbConn, worker: Work
#[post("/~/<blog>/<slug>/like", rank = 2)]
pub fn create_auth(blog: String, slug: String, i18n: I18n) -> Flash<Redirect>{
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to like a post"),
&i18n!(i18n.catalog, "You need to be logged in order to like a post"),
uri!(create: blog = blog, slug = slug)
)
}

@ -20,7 +20,7 @@ pub fn notifications(conn: DbConn, user: User, page: Option<Page>, intl: I18n) -
#[get("/notifications?<page>", rank = 2)]
pub fn notifications_auth(i18n: I18n, page: Option<Page>) -> Flash<Redirect>{
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to see your notifications"),
&i18n!(i18n.catalog, "You need to be logged in order to see your notifications"),
uri!(notifications: page = page)
)
}

@ -78,7 +78,7 @@ pub fn details(blog: String, slug: String, conn: DbConn, user: Option<User>, res
} else {
Ok(render!(errors::not_authorized(
&(&*conn, &intl.catalog, user.clone()),
"This post isn't published yet."
i18n!(intl.catalog, "This post isn't published yet.")
)))
}
}
@ -97,7 +97,7 @@ pub fn activity_details(blog: String, slug: String, conn: DbConn, _ap: ApRequest
#[get("/~/<blog>/new", rank = 2)]
pub fn new_auth(blog: String, i18n: I18n) -> Flash<Redirect> {
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to write a new post"),
&i18n!(i18n.catalog, "You need to be logged in order to write a new post"),
uri!(new: blog = blog)
)
}
@ -110,12 +110,13 @@ pub fn new(blog: String, user: User, cl: ContentLen, conn: DbConn, intl: I18n) -
// TODO actually return 403 error code
Ok(render!(errors::not_authorized(
&(&*conn, &intl.catalog, Some(user)),
"You are not author in this blog."
i18n!(intl.catalog, "You are not author in this blog.")
)))
} else {
let medias = Media::for_user(&*conn, user.id)?;
Ok(render!(posts::new(
&(&*conn, &intl.catalog, Some(user)),
i18n!(intl.catalog, "New post"),
b,
false,
&NewPostForm {
@ -139,7 +140,7 @@ pub fn edit(blog: String, slug: String, user: User, cl: ContentLen, conn: DbConn
if !user.is_author_in(&*conn, &b)? {
Ok(render!(errors::not_authorized(
&(&*conn, &intl.catalog, Some(user)),
"You are not author in this blog."
i18n!(intl.catalog, "You are not author in this blog.")
)))
} else {
let source = if !post.source.is_empty() {
@ -149,8 +150,10 @@ pub fn edit(blog: String, slug: String, user: User, cl: ContentLen, conn: DbConn
};
let medias = Media::for_user(&*conn, user.id)?;
let title = post.title.clone();
Ok(render!(posts::new(
&(&*conn, &intl.catalog, Some(user)),
i18n!(intl.catalog, "Edit {0}"; &title),
b,
true,
&NewPostForm {
@ -257,6 +260,7 @@ pub fn update(blog: String, slug: String, user: User, cl: ContentLen, form: Leni
let medias = Media::for_user(&*conn, user.id).expect("posts:update: medias error");
Err(render!(posts::new(
&(&*conn, &intl.catalog, Some(user)),
i18n!(intl.catalog, "Edit {0}"; &form.title),
b,
true,
&*form,
@ -381,6 +385,7 @@ pub fn create(blog_name: String, form: LenientForm<NewPostForm>, user: User, cl:
let medias = Media::for_user(&*conn, user.id).expect("posts::create: medias error");
Err(Ok(render!(posts::new(
&(&*conn, &intl.catalog, Some(user)),
i18n!(intl.catalog, "New post"),
blog,
false,
&*form,

@ -38,7 +38,7 @@ pub fn create(blog: String, slug: String, user: User, conn: DbConn, worker: Work
#[post("/~/<blog>/<slug>/reshare", rank=1)]
pub fn create_auth(blog: String, slug: String, i18n: I18n) -> Flash<Redirect> {
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to reshare a post"),
&i18n!(i18n.catalog, "You need to be logged in order to reshare a post"),
uri!(create: blog = blog, slug = slug)
)
}

@ -128,7 +128,7 @@ pub fn dashboard(user: User, conn: DbConn, intl: I18n) -> Result<Ructe, ErrorPag
#[get("/dashboard", rank = 2)]
pub fn dashboard_auth(i18n: I18n) -> Flash<Redirect> {
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to access your dashboard"),
&i18n!(i18n.catalog, "You need to be logged in order to access your dashboard"),
uri!(dashboard),
)
}
@ -161,7 +161,7 @@ pub fn follow(name: String, conn: DbConn, user: User, worker: Worker) -> Result<
#[post("/@/<name>/follow", rank = 2)]
pub fn follow_auth(name: String, i18n: I18n) -> Flash<Redirect> {
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to follow someone"),
&i18n!(i18n.catalog, "You need to be logged in order to follow someone"),
uri!(follow: name = name),
)
}
@ -224,7 +224,7 @@ pub fn edit(name: String, user: User, conn: DbConn, intl: I18n) -> Result<Ructe,
#[get("/@/<name>/edit", rank = 2)]
pub fn edit_auth(name: String, i18n: I18n) -> Flash<Redirect> {
utils::requires_login(
i18n!(i18n.catalog, "You need to be logged in order to edit your profile"),
&i18n!(i18n.catalog, "You need to be logged in order to edit your profile"),
uri!(edit: name = name),
)
}

@ -1,4 +1,4 @@
use plume_models::{Connection, users::User};
use plume_models::{Connection, notifications::*, users::User};
use rocket::response::Content;
use rocket_i18n::Catalog;
use templates::Html;
@ -28,6 +28,18 @@ macro_rules! render {
}
}
pub fn translate_notification(ctx: BaseContext, notif: Notification) -> String {
let name = notif.get_actor(ctx.0).unwrap().name(ctx.0);
match notif.kind.as_ref() {
notification_kind::COMMENT => i18n!(ctx.1, "{0} commented your article."; &name),
notification_kind::FOLLOW => i18n!(ctx.1, "{0} is now following you."; &name),
notification_kind::LIKE => i18n!(ctx.1, "{0} liked your article."; &name),
notification_kind::MENTION => i18n!(ctx.1, "{0} mentioned you."; &name),
notification_kind::RESHARE => i18n!(ctx.1, "{0} boosted your article."; &name),
_ => unreachable!("translate_notification: Unknow type"),
}
}
pub enum Size {
Small,
Medium,
@ -57,7 +69,7 @@ pub fn avatar(conn: &Connection, user: &User, size: Size, pad: bool, catalog: &C
))
}
pub fn tabs(links: &[(&str, &str, bool)]) -> Html<String> {
pub fn tabs(links: &[(&str, String, bool)]) -> Html<String> {
let mut res = String::from(r#"<div class="tabs">"#);
for (url, title, selected) in links {
res.push_str(r#"<a href=""#);
@ -117,6 +129,7 @@ macro_rules! input {
{
use validator::ValidationErrorsKind;
use std::borrow::Cow;
let cat = $catalog;
Html(format!(r#"
<label for="{name}">
@ -128,16 +141,16 @@ macro_rules! input {
<input type="{kind}" id="{name}" name="{name}" value="{val}" {props}/>
"#,
name = stringify!($name),
label = i18n!($catalog, $label),
label = i18n!(cat, $label),
kind = stringify!($kind),
optional = if $optional { format!("<small>{}</small>", i18n!($catalog, "Optional")) } else { String::new() },
optional = if $optional { format!("<small>{}</small>", i18n!(cat, "Optional")) } else { String::new() },
details = if $details.len() > 0 {
format!("<small>{}</small>", i18n!($catalog, $details))
format!("<small>{}</small>", i18n!(cat, $details))
} else {
String::new()
},
error = if let Some(ValidationErrorsKind::Field(errs)) = $err.errors().get(stringify!($name)) {
format!(r#"<p class="error">{}</p>"#, i18n!($catalog, &*errs[0].message.clone().unwrap_or(Cow::from("Unknown error"))))
format!(r#"<p class="error">{}</p>"#, errs[0].message.clone().unwrap_or(Cow::from("Unknown error")))
} else {
String::new()
},
@ -163,12 +176,13 @@ macro_rules! input {
};
($catalog:expr, $name:tt ($kind:tt), $label:expr, $props:expr) => {
{
let cat = $catalog;
Html(format!(r#"
<label for="{name}">{label}</label>
<input type="{kind}" id="{name}" name="{name}" {props}/>
"#,
name = stringify!($name),
label = i18n!($catalog, $label),
label = i18n!(cat, $label),
kind = stringify!($kind),
props = $props
))

@ -1,12 +1,12 @@
@use template_utils::*;
@use routes::*;
@(ctx: BaseContext, title: &str, head: Content, header: Content, content: Content)
@(ctx: BaseContext, title: String, head: Content, header: Content, content: Content)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>@i18n!(ctx.1, title) ⋅ @i18n!(ctx.1, "Plume")</title>
<title>@title ⋅ @i18n!(ctx.1, "Plume")</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="@uri!(static_files: file = "css/main.css")" />
<link rel="stylesheet" href="@uri!(static_files: file = "css/feather.css")" />

@ -7,7 +7,7 @@
@(ctx: BaseContext, blog: Blog, fqn: String, authors: &Vec<User>, total_articles: i64, page: i32, n_pages: i32, is_author: bool, posts: Vec<Post>)
@:base(ctx, blog.title.as_ref(), {}, {
@:base(ctx, blog.title.clone(), {}, {
<a href="@uri!(blogs::details: name = &fqn, page = _)">@blog.title</a>
}, {
<div class="hidden">
@ -22,13 +22,13 @@
<h1><span class="p-name">@blog.title</span> <small>~@fqn</small></h1>
<p>@blog.summary</p>
<p>
@i18n!(ctx.1, "There's one author on this blog: ", "There are {0} authors on this blog: ", authors.len())
@i18n!(ctx.1, "There's one author on this blog: ", "There are {0} authors on this blog: "; authors.len())
@for author in authors {
<a class="author p-author" href="@uri!(user::details: name = author.get_fqn(ctx.0))">@author.name(ctx.0)</a>
}
</p>
<p>
@i18n!(ctx.1, "There's one article on this blog", "There are {0} articles on this blog", total_articles)
@i18n!(ctx.1, "There's one article on this blog", "There are {0} articles on this blog"; total_articles)
</p>
<section>

@ -6,7 +6,7 @@
@(ctx: BaseContext, form: &NewBlogForm, errors: ValidationErrors)
@:base(ctx, "New Blog", {}, {}, {
@:base(ctx, i18n!(ctx.1, "New Blog"), {}, {}, {
<h1>@i18n!(ctx.1, "Create a blog")</h1>
<form method="post" action="@uri!(blogs::create)">
@input!(ctx.1, title (text), "Title", form, errors, "required minlength=\"1\"")

@ -1,9 +1,9 @@
@use templates::base as base_template;
@use template_utils::*;
@(ctx: BaseContext, error_message: &str, error: Content)
@(ctx: BaseContext, error_message: String, error: Content)
@:base_template(ctx, error_message, {}, {}, {
@:base_template(ctx, error_message.clone(), {}, {}, {
@:error()
<p>@error_message</p>
})

@ -3,10 +3,11 @@
@(ctx: BaseContext)
@:base(ctx, "", {
<h1>@i18n!(ctx.1, "Invalid CSRF token.")</h1>
<p>@i18n!(ctx.1, r#"Something is wrong with your CSRF token.
Make sure cookies are enabled in you browser, and try reloading this page.
If you continue to see this error message, please report it."#)
</p>
@:base(ctx, i18n!(ctx.1, "Invalid CSRF token"), {
<h1>@i18n!(ctx.1, "Invalid CSRF token")</h1>
<p>
@i18n!(ctx.1,
"Something is wrong with your CSRF token. Make sure cookies are enabled in you browser, and try reloading this page. If you continue to see this error message, please report it."
)
</p>
})

@ -1,7 +1,7 @@
@use templates::errors::base;
@use template_utils::*;
@(ctx: BaseContext, error_message: &str)
@(ctx: BaseContext, error_message: String)
@:base(ctx, error_message, {
<h1>@i18n!(ctx.1, "You are not authorized.")</h1>

@ -3,7 +3,7 @@
@(ctx: BaseContext)
@:base(ctx, "Page not found", {
@:base(ctx, i18n!(ctx.1, "Page not found"), {
<h1>@i18n!(ctx.1, "We couldn't find this page.")</h1>
<p>@i18n!(ctx.1, "The link that led you here may be broken.")</p>
})

@ -3,7 +3,7 @@
@(ctx: BaseContext)
@:base(ctx, "Internal server error", {
@:base(ctx, i18n!(ctx.1, "Internal server error"), {
<h1>@i18n!(ctx.1, "Something broke on our side.")</h1>
<p>@i18n!(ctx.1, "Sorry about that. If you think this is a bug, please report it.")</p>
})

@ -3,7 +3,7 @@
@(ctx: BaseContext)
@:base(ctx, "Unprocessable entity", {
@:base(ctx, "Unprocessable entity".to_string(), {
<h1>@i18n!(ctx.1, "The content you sent can't be processed.")</h1>
<p>@i18n!(ctx.1, "Maybe it was too long.")</p>
})

@ -5,7 +5,7 @@
@(ctx: BaseContext, instance: Instance, admin: User, n_users: i64, n_articles: i64, n_instances: i64)
@:base(ctx, i18n!(ctx.1, "About {0}"; instance.name.clone()).as_str(), {}, {}, {
@:base(ctx, i18n!(ctx.1, "About {0}"; instance.name.clone()), {}, {}, {
<h1>@i18n!(ctx.1, "About {0}"; instance.name)</h1>
<section>
@Html(instance.short_description_html)

@ -7,7 +7,7 @@
@(ctx: BaseContext, instance: Instance, form: InstanceSettingsForm, errors: ValidationErrors)
@:base(ctx, i18n!(ctx.1, "Administration of {0}"; instance.name.clone()).as_str(), {}, {}, {
@:base(ctx, i18n!(ctx.1, "Administration of {0}"; instance.name.clone()), {}, {}, {
<h1>@i18n!(ctx.1, "Administration")</h1>
@tabs(&[

@ -5,7 +5,7 @@
@(ctx: BaseContext, articles: Vec<Post>, page: i32, n_pages: i32)
@:base(ctx, "All the articles of the Fediverse", {}, {}, {
@:base(ctx, i18n!(ctx.1, "All the articles of the Fediverse"), {}, {}, {
<div class="h-feed">
<h1 "p-name">@i18n!(ctx.1, "All the articles of the Fediverse")</h1>

@ -5,7 +5,7 @@
@(ctx: BaseContext, articles: Vec<Post>, page: i32, n_pages: i32)
@:base(ctx, "Your feed", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Your feed"), {}, {}, {
<h1>@i18n!(ctx.1, "Your feed")</h1>
@tabs(&[

@ -6,7 +6,7 @@
@(ctx: BaseContext, instance: Instance, n_users: i64, n_articles: i64, local: Vec<Post>, federated: Vec<Post>, user_feed: Option<Vec<Post>>)
@:base(ctx, instance.name.clone().as_ref(), {}, {}, {
@:base(ctx, instance.name.clone(), {}, {}, {
<h1>@i18n!(ctx.1, "Welcome on {}"; instance.name.as_str())</h1>
@if ctx.2.is_some() {
@ -17,9 +17,9 @@
(&uri!(instance::local: _).to_string(), i18n!(ctx.1, "Local feed"), false),
])
@:home_feed(ctx, user_feed.unwrap_or_default(), &uri!(instance::feed: _).to_string(), "Your feed")
@:home_feed(ctx, federated, &uri!(instance::federated: _).to_string(), "Federated feed")
@:home_feed(ctx, local, &uri!(instance::local: _).to_string(), "Local feed")
@:home_feed(ctx, user_feed.unwrap_or_default(), &uri!(instance::feed: _).to_string(), i18n!(ctx.1, "Your feed"))
@:home_feed(ctx, federated, &uri!(instance::federated: _).to_string(), i18n!(ctx.1, "Federated feed"))
@:home_feed(ctx, local, &uri!(instance::local: _).to_string(), i18n!(ctx.1, "Local feed"))
@:instance_description(ctx, instance, n_users, n_articles)
} else {
@tabs(&[
@ -28,8 +28,8 @@
(&uri!(instance::local: _).to_string(), i18n!(ctx.1, "Local feed"), false),
])
@:home_feed(ctx, federated, &uri!(instance::federated: _).to_string(), "Federated feed")
@:home_feed(ctx, local, &uri!(instance::local: _).to_string(), "Local feed")
@:home_feed(ctx, federated, &uri!(instance::federated: _).to_string(), i18n!(ctx.1, "Federated feed"))
@:home_feed(ctx, local, &uri!(instance::local: _).to_string(), i18n!(ctx.1, "Local feed"))
@:instance_description(ctx, instance, n_users, n_articles)
}
})

@ -5,7 +5,7 @@
@(ctx: BaseContext, instance: Instance, instances: Vec<Instance>, page: i32, n_pages: i32)
@:base(ctx, i18n!(ctx.1, "Administration of {0}"; instance.name.clone()).as_str(), {}, {}, {
@:base(ctx, i18n!(ctx.1, "Administration of {0}"; instance.name.clone()), {}, {}, {
<h1>@i18n!(ctx.1, "Instances")</h1>
@tabs(&[
@ -23,7 +23,7 @@
</p>
@if !instance.local {
<form class="inline" method="post" action="@uri!(instance::toggle_block: id = instance.id)">
<input type="submit" value="@i18n!(ctx.1, if instance.blocked { "Unblock" } else { "Block"})">
<input type="submit" value="@if instance.blocked { @i18n!(ctx.1, "Unblock") } else { @i18n!(ctx.1, "Block") }">
</form>
}
</div>

@ -6,7 +6,7 @@
@(ctx: BaseContext, instance: Instance, articles: Vec<Post>, page: i32, n_pages: i32)
@:base(ctx, i18n!(ctx.1, "Articles from {}"; instance.name.clone()).as_str(), {}, {}, {
@:base(ctx, i18n!(ctx.1, "Articles from {}"; instance.name.clone()), {}, {}, {
<div class="h-feed">
<h1 class="p-name">@i18n!(ctx.1, "Articles from {}"; instance.name)</h1>

@ -5,7 +5,7 @@
@(ctx: BaseContext, users: Vec<User>, page: i32, n_pages: i32)
@:base(ctx, "Users", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Users"), {}, {}, {
<h1>@i18n!(ctx.1, "Users")</h1>
@tabs(&[

@ -6,7 +6,7 @@
@(ctx: BaseContext, media: Media)
@:base(ctx, "Media details", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Media details"), {}, {}, {
<h1>@i18n!(ctx.1, "Media details")</h1>
<section>
<a href="@uri!(medias::list)">@i18n!(ctx.1, "Go back to the gallery")</a>

@ -6,7 +6,7 @@
@(ctx: BaseContext, medias: Vec<Media>)
@:base(ctx, "Your media", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Your media"), {}, {}, {
<h1>@i18n!(ctx.1, "Your media")</h1>
<div>
<a href="@uri!(medias::new)" class="inline-block button">@i18n!(ctx.1, "Upload")</a>

@ -4,7 +4,7 @@
@(ctx: BaseContext)
@:base(ctx, "Media upload", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Media upload"), {}, {}, {
<h1>@i18n!(ctx.1, "Media upload")</h1>
<form method="post" enctype="multipart/form-data" action="@uri!(medias::upload)">
<label for="alt">

@ -4,7 +4,7 @@
@(ctx: BaseContext, notifications: Vec<Notification>, page: i32, n_pages: i32)
@:base(ctx, "Notifications", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Notifications"), {}, {}, {
<h1>@i18n!(ctx.1, "Notifications")</h1>
<div class="list">
@ -15,10 +15,10 @@
<h3>
@if let Some(url) = notification.get_url(ctx.0) {
<a href="@url">
@i18n!(ctx.1, notification.get_message(); notification.get_actor(ctx.0).unwrap().name(ctx.0))
@translate_notification(ctx, notification.clone())
</a>
} else {
@i18n!(ctx.1, notification.get_message(); notification.get_actor(ctx.0).unwrap().name(ctx.0))
@translate_notification(ctx, notification.clone())
}
</h3>
@if let Some(post) = notification.get_post(ctx.0) {

@ -2,11 +2,11 @@
@use plume_models::posts::Post;
@use template_utils::*;
@(ctx: BaseContext, articles: Vec<Post>, link: &str, title: &str)
@(ctx: BaseContext, articles: Vec<Post>, link: &str, title: String)
@if articles.len() > 0 {
<div class="h-feed">
<h2><span class="p-name">@i18n!(ctx.1, title)</span> &mdash; <a href="@link">@i18n!(ctx.1, "View all")</a></h2>
<h2><span class="p-name">@title</span> &mdash; <a href="@link">@i18n!(ctx.1, "View all")</a></h2>
<div class="cards spaced">
@for article in articles {
@:post_card(ctx, article)

@ -11,7 +11,7 @@
@(ctx: BaseContext, article: Post, blog: Blog, comment_form: &NewCommentForm, comment_errors: ValidationErrors, tags: Vec<Tag>, comments: Vec<CommentTree>, previous_comment: Option<Comment>, n_likes: i64, n_reshares: i64, has_liked: bool, has_reshared: bool, is_following: bool, author: User)
@:base(ctx, &article.title.clone(), {
@:base(ctx, article.title.clone(), {
<meta property="og:title" content="@article.title"/>
<meta property="og:type" content="article"/>
@if article.cover_id.is_some() {
@ -87,7 +87,7 @@
@if ctx.2.is_some() {
<div class="actions">
<form class="likes" action="@uri!(likes::create: blog = blog.get_fqn(ctx.0), slug = &article.slug)" method="POST">
<p aria-label="@i18n!(ctx.1, "One like", "{0} likes", &n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes", n_likes)">
<p aria-label="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)">
@n_likes
</p>
@ -98,7 +98,7 @@
}
</form>
<form class="reshares" action="@uri!(reshares::create: blog = blog.get_fqn(ctx.0), slug = &article.slug)" method="POST">
<p aria-label="@i18n!(ctx.1, "One boost", "{0} boost", &n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts", n_reshares)">
<p aria-label="@i18n!(ctx.1, "One boost", "{0} boost"; n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)">
@n_reshares
</p>
@ -113,14 +113,14 @@
<p class="center">@i18n!(ctx.1, "Login or use your Fediverse account to interact with this article")</p>
<div class="actions">
<div class="likes">
<p aria-label="@i18n!(ctx.1, "One like", "{0} likes", &n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes", n_likes)">
<p aria-label="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)" title="@i18n!(ctx.1, "One like", "{0} likes"; n_likes)">
@n_likes
</p>
<a href="@uri!(session::new: m = i18n!(ctx.1, "Login to like"))" class="action">@icon!("heart") @i18n!(ctx.1, "Add yours")</a>
</div>
<div class="reshares">
<p aria-label="@i18n!(ctx.1, "One boost", "{0} boost", &n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts", n_reshares)">
<p aria-label="@i18n!(ctx.1, "One boost", "{0} boost"; n_reshares)" title="@i18n!(ctx.1, "One boost", "{0} boosts"; n_reshares)">
@n_reshares
</p>
<a href="@uri!(session::new: m = i18n!(ctx.1, "Login to boost"))" class="action">@icon!("repeat") @i18n!(ctx.1, "Boost")</a>

@ -8,16 +8,10 @@
@use routes::posts::NewPostForm;
@use routes::*;
@(ctx: BaseContext, blog: Blog, editing: bool, form: &NewPostForm, is_draft: bool, article: Option<Post>, errors: ValidationErrors, medias: Vec<Media>, content_len: u64)
@(ctx: BaseContext, title: String, blog: Blog, editing: bool, form: &NewPostForm, is_draft: bool, article: Option<Post>, errors: ValidationErrors, medias: Vec<Media>, content_len: u64)
@:base(ctx, &i18n!(ctx.1, if editing { "Edit {0}" } else { "New post" }; &form.title), {}, {}, {
<h1>
@if editing {
@i18n!(ctx.1, "Edit {0}"; &form.title)
} else {
@i18n!(ctx.1, "Create a new post")
}
</h1>
@:base(ctx, title.clone(), {}, {}, {
<h1>@title</h1>
@if let Some(article) = article {
<form id="post-form" class="new-post" method="post" action="@uri!(posts::update: blog = blog.actor_id, slug = &article.slug)" content-size="@content_len">
} else {
@ -27,7 +21,7 @@
@input!(ctx.1, subtitle (optional text), "Subtitle", form, errors.clone(), "")
@if let Some(ValidationErrorsKind::Field(errs)) = errors.clone().errors().get("content") {
@format!(r#"<p class="error">{}</p>"#, i18n!(ctx.1, &*errs[0].message.clone().unwrap_or(Cow::from("Unknown error"))))
@format!(r#"<p class="error">{}</p>"#, errs[0].message.clone().unwrap_or(Cow::from("Unknown error")))
}
<label for="plume-editor">@i18n!(ctx.1, "Content")<small>@i18n!(ctx.1, "Markdown syntax is supported")</small></label>

@ -3,14 +3,14 @@
@(ctx: BaseContext, now: &str)
@:base(ctx, "Search", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Search"), {}, {}, {
<h1>@i18n!(ctx.1, "Search")</h1>
<form method="get" id="form">
<input id="q" name="q" placeholder="@i18n!(ctx.1, "Your query")" type="search">
<details>
<summary>@i18n!(ctx.1, "Advanced search")</summary>
@input!(ctx.1, title (text), "Article title matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Title")))
@input!(ctx.1, subtitle (text), "Subtitle matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Subtitle byline")))
@input!(ctx.1, subtitle (text), "Subtitle matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Subtitle - byline")))
@input!(ctx.1, content (text), "Content matching these words", &format!("placeholder=\"{}\"", i18n!(ctx.1, "Body content")))
@input!(ctx.1, after (date), "From this date", &format!("max={}", now))
@input!(ctx.1, before (date), "To this date", &format!("max={}", now))

@ -4,7 +4,7 @@
@(ctx: BaseContext, query_str: &str, articles: Vec<Post>, page: i32, n_pages: i32)
@:base(ctx, i18n!(ctx.1, "Search result for \"{0}\""; query_str).as_str(), {}, {}, {
@:base(ctx, i18n!(ctx.1, "Search result for \"{0}\""; query_str), {}, {}, {
<h1>@i18n!(ctx.1, "Search result")</h1>
<p>@query_str</p>

@ -6,7 +6,7 @@
@(ctx: BaseContext, message: Option<String>, form: &LoginForm, errors: ValidationErrors)
@:base(ctx, "Login", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Login"), {}, {}, {
<h1>@i18n!(ctx.1, "Login")</h1>
@if let Some(message) = message {
<p>@message</p>

@ -4,7 +4,7 @@
@(ctx: BaseContext, tag: String, articles: Vec<Post>, page: i32, n_pages: i32)
@:base(ctx, i18n!(ctx.1, "Articles tagged \"{0}\""; &tag).as_str(), {}, {}, {
@:base(ctx, i18n!(ctx.1, "Articles tagged \"{0}\""; &tag), {}, {}, {
<h1>@i18n!(ctx.1, "Articles tagged \"{0}\""; &tag)</h1>
@if !articles.is_empty() {

@ -6,7 +6,7 @@
@(ctx: BaseContext, blogs: Vec<Blog>, drafts: Vec<Post>)
@:base(ctx, "Your Dashboard", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Your Dashboard"), {}, {}, {
<h1>@i18n!(ctx.1, "Your Dashboard")</h1>
<section>

@ -6,7 +6,7 @@
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, recents: Vec<Post>, reshares: Vec<Post>)
@:base(ctx, &user.name(ctx.0), {}, {}, {
@:base(ctx, user.name(ctx.0), {}, {}, {
@:header(ctx, &user, follows, is_remote, remote_url)
@tabs(&[

@ -6,7 +6,7 @@
@(ctx: BaseContext, form: UpdateUserForm, errors: ValidationErrors)
@:base(ctx, "Edit your account", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Edit your account"), {}, {}, {
@if let Some(u) = ctx.2.clone() {
<h1>@i18n!(ctx.1, "Your Profile")</h1>
<form method="post" action="@uri!(user::update: _name = u.username.clone())">

@ -5,7 +5,7 @@
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, followers: Vec<User>, page: i32, n_pages: i32)
@:base(ctx, &i18n!(ctx.1, "{0}'s followers"; user.name(ctx.0)), {}, {}, {
@:base(ctx, i18n!(ctx.1, "{0}'s followers"; user.name(ctx.0)), {}, {}, {
@:header(ctx, &user, follows, is_remote, remote_url)
@tabs(&[

@ -6,7 +6,7 @@
@(ctx: BaseContext, enabled: bool, form: &NewUserForm, errors: ValidationErrors)
@:base(ctx, "Create your account", {}, {}, {
@:base(ctx, i18n!(ctx.1, "Create your account"), {}, {}, {
@if enabled {
<h1>@i18n!(ctx.1, "Create an account")</h1>
<form method="post" action="@uri!(user::create)">

Loading…
Cancel
Save