Add a page listing people someone follows (#444)

Nothing exceptional, the layout is the same as the followers page.

Fixes #325
This commit is contained in:
Baptiste Gelez 2019-02-26 13:13:00 +01:00 committed by GitHub
parent 7bac70a483
commit e28371bbe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1122 additions and 610 deletions

View file

@ -568,7 +568,7 @@ impl User {
.map_err(Error::from)
}
pub fn get_following(&self, conn: &Connection) -> Result<Vec<User>> {
pub fn get_followed(&self, conn: &Connection) -> Result<Vec<User>> {
use schema::follows::dsl::*;
let f = follows.filter(follower_id.eq(self.id)).select(following_id);
users::table
@ -577,6 +577,28 @@ impl User {
.map_err(Error::from)
}
pub fn count_followed(&self, conn: &Connection) -> Result<i64> {
use schema::follows;
follows::table
.filter(follows::follower_id.eq(self.id))
.count()
.get_result(conn)
.map_err(Error::from)
}
pub fn get_followed_page(&self, conn: &Connection, (min, max): (i32, i32)) -> Result<Vec<User>> {
use schema::follows;
let follows = follows::table
.filter(follows::follower_id.eq(self.id))
.select(follows::following_id)
.limit((max - min).into());
users::table
.filter(users::id.eq_any(follows))
.offset(min.into())
.load::<User>(conn)
.map_err(Error::from)
}
pub fn is_followed_by(&self, conn: &Connection, other_id: i32) -> Result<bool> {
use schema::follows;
follows::table

View file

@ -19,9 +19,9 @@ msgstr ""
msgid "{0} commented your article."
msgstr "علَّق {0} على مقالك"
#, fuzzy
msgid "{0} is now following you."
msgstr "إنّ {0} يتبعك الآن"
# src/template_utils.rs:35
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
msgid "{0} liked your article."
@ -73,7 +73,8 @@ msgstr "يجب عليك تسجيل الدخول قصد الإعجاب بالمن
msgid "You need to be logged in order to access your dashboard"
msgstr "يجب عليك أولا تسجيل الدخول للوصول إلى لوح التحكم"
msgid "You need to be logged in order to follow someone"
#, fuzzy
msgid "You need to be logged in order to subscribe to someone"
msgstr "يجب عليك أولا تسجيل الدخول قصد متابعة شخص آخر"
msgid "You need to be logged in order to edit your profile"
@ -162,7 +163,8 @@ msgstr "كافة مقالات الفديفرس"
msgid "Articles from {}"
msgstr "مقالات مِن {0}"
msgid "Nothing to see here yet. Try to follow more people."
#, fuzzy
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "حاليا لا يوجد أي شيء هنا. حاول متابعة أشخاص آخرين."
msgid "Name"
@ -292,8 +294,12 @@ msgstr ""
msgid "Articles"
msgstr "المقالات"
msgid "Followers"
msgstr "المتابِعون"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "الوصف"
#, fuzzy
msgid "Atom feed"
@ -314,14 +320,19 @@ msgstr "تعديل ملفك الشخصي"
msgid "Open on {0}"
msgstr "افتح على {0}"
msgid "Unfollow"
msgstr "الغاء المتابعة"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "اتبع"
msgid "Subscribe"
msgstr ""
msgid "{0}'s followers"
msgstr "{0} متابِعون"
#, fuzzy
msgid "{0}'s subscriptions'"
msgstr "الوصف"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "الوصف"
msgid "Respond"
msgstr "رد"
@ -702,6 +713,26 @@ msgstr "قم بنسخه و إلصاقه في محتوى مقالك لعرض ال
msgid "Use as avatar"
msgstr "استخدمها كصورة رمزية"
#~ msgid "{0}'s followers"
#~ msgstr "{0} متابِعون"
#, fuzzy
#~ msgid "{0} is now following you."
#~ msgstr "إنّ {0} يتبعك الآن"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "{0} متابِعون"
#~ msgid "Followers"
#~ msgstr "المتابِعون"
#~ msgid "Unfollow"
#~ msgstr "الغاء المتابعة"
#~ msgid "Follow"
#~ msgstr "اتبع"
#~ msgid "Comment \"{0}\""
#~ msgstr "تعليق \"{0}\""

View file

@ -18,7 +18,7 @@ msgid "{0} commented your article."
msgstr "{0} hat deinen Artikel kommentiert"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
@ -79,7 +79,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr "Du musst eingeloggt sein, um dein Dashboard zu sehen"
#, fuzzy
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr "Du musst eingeloggt sein, um jemandem zu folgen"
#, fuzzy
@ -175,7 +175,7 @@ msgid "Articles from {}"
msgstr "Artikel von {0}"
#, fuzzy
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "Hier gibts noch nichts. Versuche dich mehr Leuten anzuschließen."
msgid "Name"
@ -315,8 +315,11 @@ msgstr ""
msgid "Articles"
msgstr "Artikel"
msgid "Followers"
msgstr "Follower"
msgid "Subscribers"
msgstr "Abonomenten"
msgid "Subscriptions"
msgstr "Abonoment"
#, fuzzy
msgid "Atom feed"
@ -338,15 +341,19 @@ msgstr "Ändere dein Profil"
msgid "Open on {0}"
msgstr ""
msgid "Unsubscribe"
msgstr "Abbestellen"
msgid "Subscribe"
msgstr "Abonieren"
#, fuzzy
msgid "Unfollow"
msgstr "Folgen"
msgid "{0}'s subscriptions'"
msgstr "Abonoment"
msgid "Follow"
msgstr "Folgen"
msgid "{0}'s followers"
msgstr "{0}s Follower"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Abonoment"
msgid "Respond"
msgstr "Antworten"
@ -725,6 +732,27 @@ msgstr "Um diese Mediendatei einzufügen, kopiere sie in deine Artikel."
msgid "Use as avatar"
msgstr "Als Avatar verwenden"
#~ msgid "{0}'s followers"
#~ msgstr "{0}s Follower"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "{0}s Follower"
#~ msgid "Followers"
#~ msgstr "Follower"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "Folgen"
#, fuzzy
#~ msgid "Unfollow"
#~ msgstr "Folgen"
#~ msgid "Follow"
#~ msgstr "Folgen"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Bisher keine Artikel vorhanden."

View file

@ -19,7 +19,7 @@ msgid "{0} commented your article."
msgstr ""
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
# src/template_utils.rs:36
@ -83,7 +83,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr ""
# src/routes/user.rs:164
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr ""
# src/routes/user.rs:227
@ -171,7 +171,7 @@ msgstr ""
msgid "Articles from {}"
msgstr ""
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr ""
# src/template_utils.rs:144
@ -299,7 +299,10 @@ msgstr ""
msgid "Articles"
msgstr ""
msgid "Followers"
msgid "Subscribers"
msgstr ""
msgid "Subscriptions"
msgstr ""
msgid "Atom feed"
@ -320,13 +323,16 @@ msgstr ""
msgid "Open on {0}"
msgstr ""
msgid "Unfollow"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgid "Subscribe"
msgstr ""
msgid "{0}'s followers"
msgid "{0}'s subscriptions'"
msgstr ""
msgid "{0}'s subscribers"
msgstr ""
msgid "Respond"

File diff suppressed because it is too large Load diff

View file

@ -21,7 +21,7 @@ msgid "{0} commented your article."
msgstr "{0} a commenté votre article"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
@ -81,7 +81,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr "Vous devez vous connecter pour accéder à votre tableau de bord"
#, fuzzy
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr "Vous devez vous connecter pour suivre quelquun"
#, fuzzy
@ -173,7 +173,7 @@ msgid "Articles from {}"
msgstr "Articles de {0}"
#, fuzzy
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "Rien par ici pour le moment. Essayez de suivre plus de monde."
msgid "Name"
@ -313,8 +313,12 @@ msgstr ""
msgid "Articles"
msgstr "Articles"
msgid "Followers"
msgstr "Abonné⋅e⋅s"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Description"
#, fuzzy
msgid "Atom feed"
@ -336,15 +340,19 @@ msgstr "Modifier votre profil"
msgid "Open on {0}"
msgstr ""
msgid "Unsubscribe"
msgstr ""
msgid "Subscribe"
msgstr ""
#, fuzzy
msgid "Unfollow"
msgstr "Sabonner"
msgid "{0}'s subscriptions'"
msgstr "Description"
msgid "Follow"
msgstr "Sabonner"
msgid "{0}'s followers"
msgstr "Abonné⋅e⋅s de {0}"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Description"
msgid "Respond"
msgstr "Répondre"
@ -718,6 +726,25 @@ msgstr "Copiez-le dans vos articles pour insérer ce média."
msgid "Use as avatar"
msgstr "Utiliser comme avatar"
#~ msgid "{0}'s followers"
#~ msgstr "Abonné⋅e⋅s de {0}"
#~ msgid "People {0} follows"
#~ msgstr "Personnes suivies par {0}"
#~ msgid "Followers"
#~ msgstr "Abonné⋅e⋅s"
#~ msgid "Followed"
#~ msgstr "Suivi⋅e⋅s"
#, fuzzy
#~ msgid "Unfollow"
#~ msgstr "Sabonner"
#~ msgid "Follow"
#~ msgstr "Sabonner"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Aucun article pour le moment."

View file

@ -17,7 +17,7 @@ msgid "{0} commented your article."
msgstr "{0} comentou o seu artigo"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
@ -78,7 +78,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr "Debe estar conectada para acceder ao seu taboleiro"
#, fuzzy
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr "Debe estar conectada para seguir a alguén"
#, fuzzy
@ -174,7 +174,7 @@ msgid "Articles from {}"
msgstr "Artigos desde {0}"
#, fuzzy
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "Nada que ler por aquí. Intente seguir a máis xente."
msgid "Name"
@ -309,8 +309,12 @@ msgstr ""
msgid "Articles"
msgstr "Artigos"
msgid "Followers"
msgstr "Seguidoras"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Descrición"
#, fuzzy
msgid "Atom feed"
@ -332,16 +336,19 @@ msgstr "Edite o seu perfil"
msgid "Open on {0}"
msgstr ""
#, fuzzy
msgid "Unfollow"
msgstr "Seguir"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "Seguir"
msgid "Subscribe"
msgstr ""
#, fuzzy
msgid "{0}'s followers"
msgstr "Unha seguidora"
msgid "{0}'s subscriptions'"
msgstr "Descrición"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Descrición"
msgid "Respond"
msgstr "Respostar"
@ -715,6 +722,28 @@ msgstr "Copie para incrustar este contido nos seus artigos"
msgid "Use as avatar"
msgstr "Utilizar como avatar"
#, fuzzy
#~ msgid "{0}'s followers"
#~ msgstr "Unha seguidora"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "Unha seguidora"
#~ msgid "Followers"
#~ msgstr "Seguidoras"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "Seguir"
#, fuzzy
#~ msgid "Unfollow"
#~ msgstr "Seguir"
#~ msgid "Follow"
#~ msgstr "Seguir"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Aínda non hai entradas publicadas"

View file

@ -17,7 +17,7 @@ msgid "{0} commented your article."
msgstr "{0} ha commentato il tuo articolo"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
@ -78,7 +78,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr "Devi effettuare l'accesso per accedere al tuo pannello"
#, fuzzy
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr "Devi effettuare l'accesso per seguire qualcuno"
#, fuzzy
@ -174,7 +174,7 @@ msgid "Articles from {}"
msgstr "Articoli da {0}}"
#, fuzzy
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "Non c'è niente da mostrare qui. Prova a seguire più persone."
msgid "Name"
@ -312,8 +312,12 @@ msgstr ""
msgid "Articles"
msgstr "Articoli"
msgid "Followers"
msgstr "Seguaci"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Descrizione"
#, fuzzy
msgid "Atom feed"
@ -335,16 +339,19 @@ msgstr "Modifica il tuo profilo"
msgid "Open on {0}"
msgstr ""
#, fuzzy
msgid "Unfollow"
msgstr "Segui"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "Segui"
msgid "Subscribe"
msgstr ""
#, fuzzy
msgid "{0}'s followers"
msgstr "Uno ti segue"
msgid "{0}'s subscriptions'"
msgstr "Descrizione"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Descrizione"
msgid "Respond"
msgstr "Rispondi"
@ -722,6 +729,28 @@ msgstr "Copialo nei tuoi articoli per inserire questo media."
msgid "Use as avatar"
msgstr "Usa come avatar"
#, fuzzy
#~ msgid "{0}'s followers"
#~ msgstr "Uno ti segue"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "Uno ti segue"
#~ msgid "Followers"
#~ msgstr "Seguaci"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "Segui"
#, fuzzy
#~ msgid "Unfollow"
#~ msgstr "Segui"
#~ msgid "Follow"
#~ msgstr "Segui"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Nessun post da mostrare qui."

View file

@ -18,9 +18,9 @@ msgstr ""
msgid "{0} commented your article."
msgstr "{{ data }} があなたの記事にコメントしました"
#, fuzzy
msgid "{0} is now following you."
msgstr "{{ user }} はあなたをフォローしています。"
# src/template_utils.rs:35
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
msgid "{0} liked your article."
@ -74,7 +74,8 @@ msgstr "投稿をいいねするにはログインする必要があります"
msgid "You need to be logged in order to access your dashboard"
msgstr "ダッシュボードにアクセスするにはログインする必要があります"
msgid "You need to be logged in order to follow someone"
#, fuzzy
msgid "You need to be logged in order to subscribe to someone"
msgstr "他の人をフォローするにはログインする必要があります"
msgid "You need to be logged in order to edit your profile"
@ -163,7 +164,8 @@ msgstr "Fediverse のすべての記事"
msgid "Articles from {}"
msgstr "{{ instance.name }} の記事"
msgid "Nothing to see here yet. Try to follow more people."
#, fuzzy
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr ""
"ここにはまだ表示できるものがありません。他の人をもっとフォローしてみてくださ"
"い。"
@ -298,8 +300,12 @@ msgstr ""
msgid "Articles"
msgstr "記事"
msgid "Followers"
msgstr "フォロワー"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "説明"
#, fuzzy
msgid "Atom feed"
@ -320,15 +326,19 @@ msgstr "自分のプロフィールを編集"
msgid "Open on {0}"
msgstr ""
msgid "Unfollow"
msgstr "フォロー解除"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "フォロー"
msgid "Subscribe"
msgstr ""
#, fuzzy
msgid "{0}'s followers"
msgstr "{{ count }} フォロワー"
msgid "{0}'s subscriptions'"
msgstr "説明"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "説明"
msgid "Respond"
msgstr "返信"
@ -693,6 +703,30 @@ msgstr "このメディアを記事に挿入するには、自分の記事にコ
msgid "Use as avatar"
msgstr "アバターとして使う"
#~ msgid "{0}'s followers"
#~ msgstr "{{ count }} フォロワー"
#, fuzzy
#~ msgid "{0} is now following you."
#~ msgstr "{{ user }} はあなたをフォローしています。"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "{0} さんのフォロワー"
#~ msgid "Followers"
#~ msgstr "フォロワー"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "フォロー"
#~ msgid "Unfollow"
#~ msgstr "フォロー解除"
#~ msgid "Follow"
#~ msgstr "フォロー"
#, fuzzy
#~ msgid "Comment \"{0}\""
#~ msgstr "\"{{ post }}\" にコメント"

View file

@ -18,9 +18,9 @@ msgstr ""
msgid "{0} commented your article."
msgstr "{0} la inn en kommentar til artikkelen din"
#, fuzzy
msgid "{0} is now following you."
msgstr "{0} har begynt å følge deg"
# src/template_utils.rs:35
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
msgid "{0} liked your article."
@ -81,7 +81,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr "Du må være logget inn for å redigere profilen din"
#, fuzzy
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr "Du må være logget inn for å følge noen"
#, fuzzy
@ -177,7 +177,7 @@ msgstr ""
msgid "Articles from {}"
msgstr "Om {0}"
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr ""
# src/template_utils.rs:144
@ -314,8 +314,12 @@ msgstr ""
msgid "Articles"
msgstr "artikler"
msgid "Followers"
msgstr "Følgere"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Lang beskrivelse"
#, fuzzy
msgid "Atom feed"
@ -338,15 +342,19 @@ msgstr "Din profil"
msgid "Open on {0}"
msgstr ""
msgid "Unfollow"
msgstr "Slutt å følge"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "Følg"
msgid "Subscribe"
msgstr ""
#, fuzzy
msgid "{0}'s followers"
msgstr "Én følger"
msgid "{0}'s subscriptions'"
msgstr "Lang beskrivelse"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Lang beskrivelse"
msgid "Respond"
msgstr "Svar"
@ -732,6 +740,31 @@ msgstr ""
msgid "Use as avatar"
msgstr ""
#, fuzzy
#~ 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"
#~ msgid "Followers"
#~ msgstr "Følgere"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "Følg"
#~ msgid "Unfollow"
#~ msgstr "Slutt å følge"
#~ msgid "Follow"
#~ msgstr "Følg"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Ingen innlegg å vise enda."

View file

@ -18,8 +18,8 @@ msgid "{0} commented your article."
msgstr "{0} skomentował(a) Twój artykuł."
# src/template_utils.rs:35
msgid "{0} is now following you."
msgstr "{0} zaczął(-eła) Cię obserwować."
msgid "{0} is subscribed to you."
msgstr ""
msgid "{0} liked your article."
msgstr "{0} polubił(a) Twój artykuł."
@ -66,7 +66,8 @@ msgstr "Musisz się zalogować, aby udostępnić wpis"
msgid "You need to be logged in order to access your dashboard"
msgstr "Musisz się zalogować, aby uzyskać dostęp do panelu"
msgid "You need to be logged in order to follow someone"
#, fuzzy
msgid "You need to be logged in order to subscribe to someone"
msgstr "Musisz się zalogować, aby zacząć obserwować innych"
msgid "You need to be logged in order to edit your profile"
@ -153,7 +154,8 @@ msgstr "Wszystkie artykuły w Fediwersum"
msgid "Articles from {}"
msgstr "Artykuły z {}"
msgid "Nothing to see here yet. Try to follow more people."
#, fuzzy
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "Nie ma tutaj niczego. Spróbuj zacząć śledzić więcej osób."
msgid "Name"
@ -276,9 +278,14 @@ msgstr ""
msgid "Articles"
msgstr "Artykuły"
msgid "Followers"
msgstr "Śledzący"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Opis"
#, fuzzy
msgid "Atom feed"
msgstr "Strumień Atom"
@ -297,14 +304,19 @@ msgstr "Edytuj swój profil"
msgid "Open on {0}"
msgstr "Otwórz w {0}"
msgid "Unfollow"
msgstr "Przestań obserwować"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "Obserwuj"
msgid "Subscribe"
msgstr ""
msgid "{0}'s followers"
msgstr "Obserwujący {0}"
#, fuzzy
msgid "{0}'s subscriptions'"
msgstr "Opis"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Opis"
msgid "Respond"
msgstr "Odpowiedz"
@ -658,6 +670,30 @@ msgstr "Skopiuj do swoich artykułów, aby wstawić tę zawartość multimedialn
msgid "Use as avatar"
msgstr "Użyj jako awataru"
#~ msgid "{0}'s followers"
#~ msgstr "Obserwujący {0}"
# src/template_utils.rs:35
#~ msgid "{0} is now following you."
#~ msgstr "{0} zaczął(-eła) Cię obserwować."
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "Obserwujący {0}"
#~ msgid "Followers"
#~ msgstr "Śledzący"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "Śledzący"
#~ msgid "Unfollow"
#~ msgstr "Przestań obserwować"
#~ msgid "Follow"
#~ msgstr "Obserwuj"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Brak wpisów do wyświetlenia."

View file

@ -17,7 +17,7 @@ msgid "{0} commented your article."
msgstr ""
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
# src/template_utils.rs:36
@ -81,10 +81,10 @@ msgid "You need to be logged in order to access your dashboard"
msgstr ""
# src/routes/user.rs:164
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr ""
# src/routes/user.rs:227
# src/routes/user.rs:245
msgid "You need to be logged in order to edit your profile"
msgstr ""
@ -169,7 +169,7 @@ msgstr ""
msgid "Articles from {}"
msgstr ""
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr ""
# src/template_utils.rs:144
@ -295,7 +295,10 @@ msgstr ""
msgid "Articles"
msgstr ""
msgid "Followers"
msgid "Subscribers"
msgstr ""
msgid "Subscriptions"
msgstr ""
msgid "Atom feed"
@ -316,13 +319,16 @@ msgstr ""
msgid "Open on {0}"
msgstr ""
msgid "Unfollow"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgid "Subscribe"
msgstr ""
msgid "{0}'s followers"
msgid "{0}'s subscriptions'"
msgstr ""
msgid "{0}'s subscribers"
msgstr ""
msgid "Respond"

View file

@ -18,9 +18,9 @@ msgstr ""
msgid "{0} commented your article."
msgstr "{0} comentou o seu artigo"
#, fuzzy
msgid "{0} is now following you."
msgstr "{0} começou a seguir você"
# src/template_utils.rs:35
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
msgid "{0} liked your article."
@ -72,7 +72,8 @@ msgstr "Você precisa estar logado para gostar de um post"
msgid "You need to be logged in order to access your dashboard"
msgstr "Você precisa estar autenticado para acessar seu painel de controle"
msgid "You need to be logged in order to follow someone"
#, fuzzy
msgid "You need to be logged in order to subscribe to someone"
msgstr "Você precisa estar autenticado para poder seguir alguém"
msgid "You need to be logged in order to edit your profile"
@ -161,7 +162,8 @@ msgstr "Todos os artigos do Fediverse"
msgid "Articles from {}"
msgstr "Artigos de {0}"
msgid "Nothing to see here yet. Try to follow more people."
#, fuzzy
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr "Ainda não há nada para ver aqui. Tente seguir mais pessoas."
msgid "Name"
@ -292,8 +294,12 @@ msgstr ""
msgid "Articles"
msgstr "Artigos"
msgid "Followers"
msgstr "Seguidores"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Descrição"
#, fuzzy
msgid "Atom feed"
@ -314,14 +320,19 @@ msgstr "Editar o seu perfil"
msgid "Open on {0}"
msgstr "Abrir em {0}"
msgid "Unfollow"
msgstr "Não Seguir"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "Seguir"
msgid "Subscribe"
msgstr ""
msgid "{0}'s followers"
msgstr "Seguidores de {0}"
#, fuzzy
msgid "{0}'s subscriptions'"
msgstr "Descrição"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Descrição"
msgid "Respond"
msgstr "Responder"
@ -683,6 +694,26 @@ msgstr "Copie-o em seus artigos para inserir esta mídia."
msgid "Use as avatar"
msgstr "Utilizar como avatar"
#~ msgid "{0}'s followers"
#~ msgstr "Seguidores de {0}"
#, fuzzy
#~ msgid "{0} is now following you."
#~ msgstr "{0} começou a seguir você"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "Seguidores de {0}"
#~ msgid "Followers"
#~ msgstr "Seguidores"
#~ msgid "Unfollow"
#~ msgstr "Não Seguir"
#~ msgid "Follow"
#~ msgstr "Seguir"
#~ msgid "Comment \"{0}\""
#~ msgstr "Comentário \"{0}\""

View file

@ -19,7 +19,7 @@ msgid "{0} commented your article."
msgstr "{0} прокомментировал(а) вашу статью"
# src/template_utils.rs:35
msgid "{0} is now following you."
msgid "{0} is subscribed to you."
msgstr ""
#, fuzzy
@ -80,7 +80,7 @@ msgid "You need to be logged in order to access your dashboard"
msgstr "Вы должны войти чтобы получить доступ к вашей панели управления"
#, fuzzy
msgid "You need to be logged in order to follow someone"
msgid "You need to be logged in order to subscribe to someone"
msgstr "Вы должны войти чтобы подписаться на кого-либо"
#, fuzzy
@ -178,7 +178,7 @@ msgid "Articles from {}"
msgstr "Статьи с {0}"
#, fuzzy
msgid "Nothing to see here yet. Try to follow more people."
msgid "Nothing to see here yet. Try to subscribe to more people."
msgstr ""
"Пока что здесь ничего нет. Попробуйте подписаться на большее число людей."
@ -316,8 +316,12 @@ msgstr ""
msgid "Articles"
msgstr "Статьи"
msgid "Followers"
msgstr "Подписчики"
msgid "Subscribers"
msgstr ""
#, fuzzy
msgid "Subscriptions"
msgstr "Описание"
#, fuzzy
msgid "Atom feed"
@ -339,16 +343,19 @@ msgstr "Редактировать ваш профиль"
msgid "Open on {0}"
msgstr ""
#, fuzzy
msgid "Unfollow"
msgstr "Подписаться"
msgid "Unsubscribe"
msgstr ""
msgid "Follow"
msgstr "Подписаться"
msgid "Subscribe"
msgstr ""
#, fuzzy
msgid "{0}'s followers"
msgstr "Один подписчик"
msgid "{0}'s subscriptions'"
msgstr "Описание"
#, fuzzy
msgid "{0}'s subscribers"
msgstr "Описание"
msgid "Respond"
msgstr "Ответить"
@ -727,6 +734,28 @@ msgstr ""
msgid "Use as avatar"
msgstr "Использовать как аватар"
#, fuzzy
#~ msgid "{0}'s followers"
#~ msgstr "Один подписчик"
#, fuzzy
#~ msgid "People {0} follows"
#~ msgstr "Один подписчик"
#~ msgid "Followers"
#~ msgstr "Подписчики"
#, fuzzy
#~ msgid "Followed"
#~ msgstr "Подписаться"
#, fuzzy
#~ msgid "Unfollow"
#~ msgstr "Подписаться"
#~ msgid "Follow"
#~ msgstr "Подписаться"
#, fuzzy
#~ msgid "No articles to see here yet."
#~ msgstr "Здесь пока нет постов."

View file

@ -54,7 +54,7 @@ use std::process::exit;
use std::sync::Arc;
use std::time::Duration;
init_i18n!("plume", ar, de, en, fr, gl, it, ja, nb, pl, pt, ru);
init_i18n!("plume", ar, de, en, es, fr, gl, it, ja, nb, pl, pt, ru);
mod api;
mod inbox;
@ -187,6 +187,7 @@ Then try to restart Plume.
routes::user::dashboard,
routes::user::dashboard_auth,
routes::user::followers,
routes::user::followed,
routes::user::edit,
routes::user::edit_auth,
routes::user::update,

View file

@ -28,7 +28,7 @@ pub fn index(conn: DbConn, user: Option<User>, intl: I18n) -> Result<Ructe, Erro
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_following(&*conn).ok()?;
let followed = user.get_followed(&*conn).ok()?;
let mut in_feed = followed.into_iter().map(|u| u.id).collect::<Vec<i32>>();
in_feed.push(user.id);
Post::user_feed_page(&*conn, in_feed, Page::default().limits()).ok()
@ -62,7 +62,7 @@ pub fn local(conn: DbConn, user: Option<User>, page: Option<Page>, intl: I18n) -
#[get("/feed?<page>")]
pub fn feed(conn: DbConn, user: User, page: Option<Page>, intl: I18n) -> Result<Ructe, ErrorPage> {
let page = page.unwrap_or_default();
let followed = user.get_following(&*conn)?;
let followed = user.get_followed(&*conn)?;
let mut in_feed = followed.into_iter().map(|u| u.id).collect::<Vec<i32>>();
in_feed.push(user.id);
let articles = Post::user_feed_page(&*conn, in_feed, page.limits())?;

View file

@ -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 subscribe to someone"),
uri!(follow: name = name),
)
}
@ -184,6 +184,24 @@ pub fn followers(name: String, conn: DbConn, account: Option<User>, page: Option
)))
}
#[get("/@/<name>/followed?<page>", rank = 2)]
pub fn followed(name: String, conn: DbConn, account: Option<User>, page: Option<Page>, intl: I18n) -> Result<Ructe, ErrorPage> {
let page = page.unwrap_or_default();
let user = User::find_by_fqn(&*conn, &name)?;
let followed_count = user.count_followed(&*conn)?;
Ok(render!(users::followed(
&(&*conn, &intl.catalog, account.clone()),
user.clone(),
account.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())?,
page.0,
Page::total(followed_count as i32)
)))
}
#[get("/@/<name>", rank = 1)]
pub fn activity_details(
name: String,

View file

@ -32,7 +32,7 @@ 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::FOLLOW => i18n!(ctx.1, "{0} is subscribed to 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),

View file

@ -22,7 +22,7 @@
}
</div>
} else {
<p class="center">@i18n!(ctx.1, "Nothing to see here yet. Try to follow more people.")</p>
<p class="center">@i18n!(ctx.1, "Nothing to see here yet. Try to subscribe to more people.")</p>
}
@paginate(ctx.1, page, n_pages)
})

View file

@ -80,7 +80,7 @@
</div>
@if !ctx.2.as_ref().map(|u| u.id == author.id).unwrap_or(false) {
<form action="@uri!(user::follow: name = author.get_fqn(ctx.0))" method="POST">
<input type="submit" class="button" value="@if is_following {@i18n!(ctx.1, "Unfollow")} else {@i18n!(ctx.1, "Follow")}">
<input type="submit" class="button" value="@if is_following {@i18n!(ctx.1, "Unsubscribe")} else {@i18n!(ctx.1, "Subscribe")}">
</form>
}
</div>

View file

@ -11,7 +11,8 @@
@tabs(&[
(&uri!(user::details: name= user.get_fqn(ctx.0)).to_string(), i18n!(ctx.1, "Articles"), true),
(&uri!(user::followers: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Followers"), false)
(&uri!(user::followers: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Subscribers"), false),
(&uri!(user::followed: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Subscriptions"), false)
])
@if !recents.is_empty() {

View file

@ -0,0 +1,26 @@
@use templates::{base, users::header};
@use template_utils::*;
@use plume_models::users::User;
@use routes::*;
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, followed: Vec<User>, page: i32, n_pages: i32)
@:base(ctx, i18n!(ctx.1, "{0}'s subscriptions'"; user.name(ctx.0)), {}, {}, {
@:header(ctx, &user, follows, is_remote, remote_url)
@tabs(&[
(&uri!(user::details: name= user.get_fqn(ctx.0)).to_string(), i18n!(ctx.1, "Articles"), true),
(&uri!(user::followers: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Subscribers"), false),
(&uri!(user::followed: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Subscriptions"), false)
])
<div class="cards">
@for follow in followed {
<div class="card">
<h3><a href="@uri!(user::details: name = follow.get_fqn(ctx.0))">@follow.name(ctx.0)</a> <small>@format!("@{}", follow.get_fqn(ctx.0))</small></h3>
<main><p>@Html(follow.summary)</p></main>
</div>
}
</div>
@paginate(ctx.1, page, n_pages)
})

View file

@ -5,12 +5,13 @@
@(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 subscribers"; user.name(ctx.0)), {}, {}, {
@:header(ctx, &user, follows, is_remote, remote_url)
@tabs(&[
(&uri!(user::details: name= user.get_fqn(ctx.0)).to_string(), i18n!(ctx.1, "Articles"), false),
(&uri!(user::followers: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Followers"), true)
(&uri!(user::details: name= user.get_fqn(ctx.0)).to_string(), i18n!(ctx.1, "Articles"), true),
(&uri!(user::followers: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Subscribers"), false),
(&uri!(user::followed: name = user.get_fqn(ctx.0), page = _).to_string(), i18n!(ctx.1, "Subscriptions"), false)
])
<div class="cards">

View file

@ -35,9 +35,9 @@
@if ctx.2.clone().map(|u| u.id != user.id).unwrap_or(false) {
<form class="inline" method="post" action="@uri!(user::follow: name = user.get_fqn(ctx.0))">
@if follows {
<input type="submit" value="@i18n!(ctx.1, "Unfollow")">
<input type="submit" value="@i18n!(ctx.1, "Unsubscribe")">
} else {
<input type="submit" value="@i18n!(ctx.1, "Follow")">
<input type="submit" value="@i18n!(ctx.1, "Subscribe")">
}
</form>
}