From: Dessalines Date: Sat, 10 Aug 2019 00:15:27 +0000 (-0700) Subject: Making a few internationalization fixes. X-Git-Url: http://these/git/%22%7Bauthor_url%7D/static/%24%7Bargs.thread.url%7D?a=commitdiff_plain;h=c494fe8e9b29b81d41145f39351710852e5024d4;p=lemmy.git Making a few internationalization fixes. --- diff --git a/server/src/api/comment.rs b/server/src/api/comment.rs index 19752d83..3d18c72a 100644 --- a/server/src/api/comment.rs +++ b/server/src/api/comment.rs @@ -101,7 +101,7 @@ impl Perform for Oper { let _inserted_like = match CommentLike::like(&conn, &like_form) { Ok(like) => like, Err(_e) => { - return Err(APIError::err(&self.op, ""))? + return Err(APIError::err(&self.op, "couldnt_like_comment"))? } }; diff --git a/ui/src/components/navbar.tsx b/ui/src/components/navbar.tsx index 5738483d..7a173bed 100644 --- a/ui/src/components/navbar.tsx +++ b/ui/src/components/navbar.tsx @@ -155,8 +155,7 @@ export class Navbar extends Component { parseMessage(msg: any) { let op: UserOperation = msgOp(msg); if (msg.error) { - // TODO - if (msg.error == "Not logged in.") { + if (msg.error == "not_logged_in") { UserService.Instance.logout(); location.reload(); } diff --git a/ui/src/components/post-form.tsx b/ui/src/components/post-form.tsx index 8aa7a5ea..79d37b42 100644 --- a/ui/src/components/post-form.tsx +++ b/ui/src/components/post-form.tsx @@ -131,7 +131,7 @@ export class PostForm extends Component { + this.props.post ? capitalizeFirstLetter(i18n.t('save')) : capitalizeFirstLetter(i18n.t('create'))} {this.props.post && }