Skip to content

Commit

Permalink
fix(phone/twitter): add missing/wrong translations
Browse files Browse the repository at this point in the history
  • Loading branch information
itschip committed Dec 23, 2021
1 parent 18fcae0 commit 622c3ec
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion phone/src/apps/twitter/components/AddTweetModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const AddTweetModal = () => {
if (resp.status !== 'ok') {
return addAlert({
type: 'error',
message: t('APPS_TWITTER_CREATE_FAILED'),
message: t('TWITTER.FEEDBACK.CREATE_PROFILE_FAILURE'),
});
}
});
Expand Down
2 changes: 1 addition & 1 deletion phone/src/apps/twitter/components/buttons/LikeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function LikeButton({ tweetId, isLiked }) {
fetchNui<ServerPromiseResp<void>>(TwitterEvents.TOGGLE_LIKE, { tweetId }).then((resp) => {
if (resp.status !== 'ok') {
return addAlert({
message: t('APPS_TWITTER_LIKE_TWEET_FAILED'),
message: t('TWITTER.FEEDBACK.LIKE_TWEET_FAILED'),
type: 'error',
});
}
Expand Down
4 changes: 2 additions & 2 deletions phone/src/apps/twitter/components/buttons/ReportButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function ReportButton({ handleClose, tweetId, isReported }) {
fetchNui<ServerPromiseResp<void>>(TwitterEvents.REPORT, { tweetId }).then((resp) => {
if (resp.status !== 'ok') {
return addAlert({
message: t('APPS_TWITTER_REPORT_TWEET_FAILED'),
message: t('TWITTER.FEEDBACK.REPORT_TWEET_FAILED'),
type: 'error',
});
}
Expand All @@ -27,7 +27,7 @@ function ReportButton({ handleClose, tweetId, isReported }) {
handleClose();

addAlert({
message: t('APPS_TWITTER_REPORT_TWEET_SUCCESS'),
message: t('TWITTER.FEEDBACK.REPORT_TWEET_SUCCESS'),
type: 'success',
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const RetweetButton = ({ tweetId, isRetweet, retweetId }: IProps) => {
(resp) => {
if (resp.status !== 'ok') {
return addAlert({
message: t('APPS_TWITTER_RETWEET_FAILED'),
message: t('TWITTER.FEEDBACK.RETWEET_FAILED'),
type: 'error',
});
}
Expand Down
2 changes: 1 addition & 1 deletion phone/src/apps/twitter/components/tweet/ShowMore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ShowMore = ({ id, isReported, isMine }) => {
fetchNui<ServerPromiseResp<void>>(TwitterEvents.DELETE_TWEET, { tweetId: id }).then((resp) => {
if (resp.status !== 'ok') {
return addAlert({
message: t('APPS_TWITTER_DELETE_TWEET_FAILED'),
message: t('TWITTER.FEEDBACK.DELETE_TWEET_FAILED'),
type: 'error',
});
}
Expand Down
2 changes: 1 addition & 1 deletion phone/src/apps/twitter/components/tweet/TweetList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function TweetList({ tweets }: { tweets: FormattedTweet[] }) {
if (resp.status !== 'ok') {
return addAlert({
type: 'error',
message: t('APPS_TWITTER_FETCH_TWEETS_FAILED'),
message: t('TWITTER.FEEDBACK.FETCH_TWEETS_FAILED'),
});
}

Expand Down
8 changes: 7 additions & 1 deletion phone/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,13 @@
"EDIT_PROFILE_SUCCESS": "Successfully updated your profile",
"EDIT_PROFILE_FAILURE": "Failed to update your profile",
"CREATE_FAILED": "Failed to send your tweet",
"RETWEET_EXISTS": "You have already retweeted this tweet!"
"RETWEET_FAILED": "Failed to retweet this tweet",
"RETWEET_EXISTS": "You have already retweeted this tweet!",
"LIKE_TWEET_FAILED": "Failed to like tweet",
"REPORT_TWEET_SUCCESS": "Successfully reported tweet",
"REPORT_TWEET_FAILED": "Failed to report tweet",
"FETCH_TWEETS_FAILED": "Failed to fetch tweets",
"DELETE_TWEET_FAILED": "Failed to delete tweet"
},
"MESSAGES": {
"NEW_RETWEET_BROADCAST": "@{{ profile_name }} retweeted someone!",
Expand Down

0 comments on commit 622c3ec

Please sign in to comment.