Fix Blog::find_by_name

This commit is contained in:
Bat 2018-06-18 18:44:18 +01:00
parent 84e4128795
commit 0dfc303c83
5 changed files with 78 additions and 7 deletions

View File

@ -253,3 +253,24 @@ msgstr ""
msgid "You need to be logged in order to edit your profile" msgid "You need to be logged in order to edit your profile"
msgstr "" msgstr ""
msgid "By {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name }}{{ link_4 }}"
msgstr ""
msgid "{{ data }} reshared your article"
msgstr ""
msgid "{{ data }} started following you"
msgstr ""
msgid "{{ data }} liked your article"
msgstr ""
msgid "{{ data }} commented your article"
msgstr ""
msgid "We couldn't find this page."
msgstr ""
msgid "The link that led you here may be broken."
msgstr ""

View File

@ -252,3 +252,25 @@ msgstr "Vous devez vous connecter pour suivre quelqu'un"
msgid "You need to be logged in order to edit your profile" msgid "You need to be logged in order to edit your profile"
msgstr "Vous devez vous connecter pour modifier votre profil" msgstr "Vous devez vous connecter pour modifier votre profil"
#, fuzzy
msgid "By {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name }}{{ link_4 }}"
msgstr "Écrit par {{ link_1 }}{{ url }}{{ link_2 }}{{ name }}{{ link_3 }}"
msgid "{{ data }} reshared your article"
msgstr ""
msgid "{{ data }} started following you"
msgstr ""
msgid "{{ data }} liked your article"
msgstr ""
msgid "{{ data }} commented your article"
msgstr ""
msgid "We couldn't find this page."
msgstr ""
msgid "The link that led you here may be broken."
msgstr ""

View File

@ -10,7 +10,8 @@ msgstr ""
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 " "|| n%100>=20) ? 1 : 2);\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2);\n"
msgid "Latest articles" msgid "Latest articles"
msgstr "Najnowsze artykuły" msgstr "Najnowsze artykuły"
@ -46,7 +47,8 @@ msgid "Something broke on our side."
msgstr "Coś poszło nie tak." msgstr "Coś poszło nie tak."
msgid "Sorry about that. If you think this is a bug, please report it." msgid "Sorry about that. If you think this is a bug, please report it."
msgstr "Przepraszamy. Jeżeli uważasz że wystąpił błąd, prosimy o zgłoszenie go." msgstr ""
"Przepraszamy. Jeżeli uważasz że wystąpił błąd, prosimy o zgłoszenie go."
msgid "Configuration" msgid "Configuration"
msgstr "Konfiguracja" msgstr "Konfiguracja"
@ -114,8 +116,8 @@ msgstr "Utwórz wpis"
msgid "Publish" msgid "Publish"
msgstr "Opublikuj" msgstr "Opublikuj"
msgid "Logowanie" msgid "Login"
msgstr "Zaloguj się" msgstr ""
msgid "Username or email" msgid "Username or email"
msgstr "Nazwa użytkownika lub adres e-mail" msgstr "Nazwa użytkownika lub adres e-mail"
@ -133,7 +135,9 @@ msgid "Your Blogs"
msgstr "Twoje blogi" msgstr "Twoje blogi"
msgid "You don't have any blog yet. Create your own, or ask to join one." msgid "You don't have any blog yet. Create your own, or ask to join one."
msgstr "Nie posiadasz żadnego bloga. Utwórz własny, lub poproś o dołączanie do istniejącego." msgstr ""
"Nie posiadasz żadnego bloga. Utwórz własny, lub poproś o dołączanie do "
"istniejącego."
msgid "Start a new blog" msgid "Start a new blog"
msgstr "Utwórz nowy blog" msgstr "Utwórz nowy blog"
@ -252,3 +256,27 @@ msgstr "Musisz się zalogować, aby zacząć obserwować innych"
msgid "You need to be logged in order to edit your profile" msgid "You need to be logged in order to edit your profile"
msgstr "Musisz się zalogować , aby móc edytować swój profil" msgstr "Musisz się zalogować , aby móc edytować swój profil"
#, fuzzy
msgid "By {{ link_1 }}{{ link_2 }}{{ link_3 }}{{ name }}{{ link_4 }}"
msgstr "Napisano przez {{ link_1 }}{{ url }}{{ link_2 }}{{ name }}{{ link_3 }}"
msgid "{{ data }} reshared your article"
msgstr ""
msgid "{{ data }} started following you"
msgstr ""
msgid "{{ data }} liked your article"
msgstr ""
msgid "{{ data }} commented your article"
msgstr ""
msgid "We couldn't find this page."
msgstr ""
msgid "The link that led you here may be broken."
msgstr ""
#~ msgid "Logowanie"
#~ msgstr "Zaloguj się"

View File

@ -67,7 +67,7 @@ impl Blog {
.expect("Couldn't load blogs ") .expect("Couldn't load blogs ")
} }
find_by!(blogs, find_by_name, ap_url as String, instance_id as i32); find_by!(blogs, find_by_name, actor_id as String, instance_id as i32);
pub fn find_local(conn: &PgConnection, name: String) -> Option<Blog> { pub fn find_local(conn: &PgConnection, name: String) -> Option<Blog> {
Blog::find_by_name(conn, name, Instance::local_id(conn)) Blog::find_by_name(conn, name, Instance::local_id(conn))

View File

@ -9,7 +9,7 @@ macro_rules! may_fail {
let $res = res.unwrap(); let $res = res.unwrap();
$block $block
} else { } else {
Template::render(concat!("errors/", stringify!($template)), json!({ Template::render(concat!("errors/", $template), json!({
"error_message": $msg "error_message": $msg
})) }))
} }