Translation args in templates

This commit is contained in:
Pascal Engélibert 2022-12-04 18:06:29 +01:00
commit 800036ce49
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA
7 changed files with 76 additions and 26 deletions

View file

@ -286,7 +286,7 @@ async fn handle_post_comments(
return Err(tide::Error::from_str(404, "No topic"))
};
helpers::check_comment(config, &query.comment, &mut errors);
helpers::check_comment(config, locales, &client_langs, &query.comment, &mut errors);
if let Some(client_addr) = &client_addr {
if antispam_enabled {
@ -360,7 +360,7 @@ async fn handle_post_comments(
return Err(tide::Error::from_str(403, "Forbidden"));
}
helpers::check_comment(config, &query.comment, &mut errors);
helpers::check_comment(config, locales, &client_langs, &query.comment, &mut errors);
let comment_id = if let Ok(comment_id) = CommentId::from_base64(&query.id) {
comment_id