From e74499aea4ee0178477df80d2e296eb72ce9bf3c Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:11 +0200 Subject: [PATCH 001/112] New translations common.json (Portuguese, Brazilian) --- src/i18n/pt_BR/common.json | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/i18n/pt_BR/common.json diff --git a/src/i18n/pt_BR/common.json b/src/i18n/pt_BR/common.json new file mode 100644 index 00000000..d17849b2 --- /dev/null +++ b/src/i18n/pt_BR/common.json @@ -0,0 +1,22 @@ +{ + "buttons": { + "OK": "", + "apply": "", + "cancel": "" + }, + "customEmoji": { + "accessibilityLabel": "" + }, + "message": { + "success": { + "message": "" + }, + "warning": { + "message": "" + }, + "error": { + "message": "" + } + }, + "separator": "" +} \ No newline at end of file From ceb631f6118923f8369bdc1d8fe5d4e6cb0ba34f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:13 +0200 Subject: [PATCH 002/112] New translations instance.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/instance.json | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/i18n/pt_BR/components/instance.json diff --git a/src/i18n/pt_BR/components/instance.json b/src/i18n/pt_BR/components/instance.json new file mode 100644 index 00000000..caf79184 --- /dev/null +++ b/src/i18n/pt_BR/components/instance.json @@ -0,0 +1,28 @@ +{ + "server": { + "textInput": { + "placeholder": "" + }, + "button": "", + "information": { + "name": "", + "accounts": "", + "statuses": "", + "domains": "" + }, + "disclaimer": { + "base": "", + "privacy": "" + } + }, + "update": { + "alert": { + "title": "", + "message": "", + "buttons": { + "cancel": "", + "continue": "" + } + } + } +} \ No newline at end of file From ad78e0373a1f3edbbd36d80fffcc47f71b4118d6 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:14 +0200 Subject: [PATCH 003/112] New translations parse.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/parse.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/i18n/pt_BR/components/parse.json diff --git a/src/i18n/pt_BR/components/parse.json b/src/i18n/pt_BR/components/parse.json new file mode 100644 index 00000000..8b1b18b8 --- /dev/null +++ b/src/i18n/pt_BR/components/parse.json @@ -0,0 +1,9 @@ +{ + "HTML": { + "expanded": { + "true": "", + "false": "" + }, + "defaultHint": "" + } +} \ No newline at end of file From bc3d434e1b14c5edc7136b6e1e25c011fbf0aa88 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:15 +0200 Subject: [PATCH 004/112] New translations relationship.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/relationship.json | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/i18n/pt_BR/components/relationship.json diff --git a/src/i18n/pt_BR/components/relationship.json b/src/i18n/pt_BR/components/relationship.json new file mode 100644 index 00000000..ccf2aa7b --- /dev/null +++ b/src/i18n/pt_BR/components/relationship.json @@ -0,0 +1,16 @@ +{ + "follow": { + "function": "" + }, + "block": { + "function": "" + }, + "button": { + "error": "", + "blocked_by": "", + "blocking": "", + "following": "", + "requested": "", + "default": "" + } +} \ No newline at end of file From 9fdb0bbce7c861e63ace753137401aa534b37f3f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:16 +0200 Subject: [PATCH 005/112] New translations timeline.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/timeline.json | 234 ++++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 src/i18n/pt_BR/components/timeline.json diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json new file mode 100644 index 00000000..adaf6ba5 --- /dev/null +++ b/src/i18n/pt_BR/components/timeline.json @@ -0,0 +1,234 @@ +{ + "empty": { + "error": { + "message": "", + "button": "" + }, + "success": { + "message": "" + } + }, + "end": { + "message": "" + }, + "lookback": { + "message": "" + }, + "refresh": { + "fetchPreviousPage": "", + "refetch": "" + }, + "shared": { + "actioned": { + "pinned": "", + "favourite": "", + "status": "", + "follow": "", + "follow_request": "", + "poll": "", + "reblog": { + "default": "", + "notification": "" + } + }, + "actions": { + "reply": { + "accessibilityLabel": "" + }, + "reblogged": { + "accessibilityLabel": "", + "function": "" + }, + "favourited": { + "accessibilityLabel": "", + "function": "" + }, + "bookmarked": { + "accessibilityLabel": "", + "function": "" + } + }, + "actionsUsers": { + "reblogged_by": { + "accessibilityLabel": "", + "accessibilityHint": "", + "text": "" + }, + "favourited_by": { + "accessibilityLabel": "", + "accessibilityHint": "", + "text": "" + }, + "history": { + "accessibilityLabel": "", + "accessibilityHint": "", + "text_one": "", + "text_other": "" + } + }, + "attachment": { + "sensitive": { + "button": "" + }, + "unsupported": { + "text": "", + "button": "" + } + }, + "avatar": { + "accessibilityLabel": "", + "accessibilityHint": "" + }, + "content": { + "expandHint": "" + }, + "filtered": "", + "fullConversation": "", + "translate": { + "default": "", + "succeed": "", + "failed": "", + "source_not_supported": "", + "target_not_supported": "" + }, + "header": { + "shared": { + "account": { + "name": { + "accessibilityHint": "" + }, + "account": { + "accessibilityHint": "" + } + }, + "application": "", + "edited": { + "accessibilityLabel": "" + }, + "muted": { + "accessibilityLabel": "" + }, + "visibility": { + "direct": { + "accessibilityLabel": "" + }, + "private": { + "accessibilityLabel": "" + } + } + }, + "conversation": { + "withAccounts": "", + "delete": { + "function": "" + } + }, + "actions": { + "accessibilityHint": "", + "account": { + "heading": "", + "mute": { + "function": "", + "button": "" + }, + "block": { + "function": "", + "button": "" + }, + "reports": { + "function": "", + "button": "" + } + }, + "domain": { + "heading": "", + "block": { + "function": "", + "button": "" + }, + "alert": { + "title": "", + "message": "", + "buttons": { + "confirm": "", + "cancel": "" + } + } + }, + "share": { + "status": { + "heading": "", + "button": "" + }, + "account": { + "heading": "", + "button": "" + } + }, + "status": { + "heading": "", + "edit": { + "function": "", + "button": "" + }, + "delete": { + "function": "", + "button": "", + "alert": { + "title": "", + "message": "", + "buttons": { + "confirm": "", + "cancel": "" + } + } + }, + "deleteEdit": { + "function": "", + "button": "", + "alert": { + "title": "", + "message": "", + "buttons": { + "confirm": "", + "cancel": "" + } + } + }, + "mute": { + "function": "", + "button": { + "positive": "", + "negative": "" + } + }, + "pin": { + "function": "", + "button": { + "positive": "", + "negative": "" + } + } + } + } + }, + "poll": { + "meta": { + "button": { + "vote": "", + "refresh": "" + }, + "count": { + "voters_one": "", + "voters_other": "", + "votes_one": "", + "votes_other": "" + }, + "expiration": { + "expired": "", + "until": "" + } + } + } + } +} \ No newline at end of file From c9802d160f0d5a1d22894b2dda874ba09eb91a9a Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:17 +0200 Subject: [PATCH 006/112] New translations actions.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/actions.json | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/i18n/pt_BR/screens/actions.json diff --git a/src/i18n/pt_BR/screens/actions.json b/src/i18n/pt_BR/screens/actions.json new file mode 100644 index 00000000..d6d2c219 --- /dev/null +++ b/src/i18n/pt_BR/screens/actions.json @@ -0,0 +1,19 @@ +{ + "content": { + "button": { + "apply": "", + "cancel": "" + }, + "notificationsFilter": { + "heading": "", + "content": { + "follow": "", + "favourite": "", + "reblog": "", + "mention": "", + "poll": "", + "follow_request": "" + } + } + } +} \ No newline at end of file From fa51e8d0358c3f94db68c9f203ec57a0300e0a69 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:18 +0200 Subject: [PATCH 007/112] New translations imageViewer.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/imageViewer.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/i18n/pt_BR/screens/imageViewer.json diff --git a/src/i18n/pt_BR/screens/imageViewer.json b/src/i18n/pt_BR/screens/imageViewer.json new file mode 100644 index 00000000..ad2b495c --- /dev/null +++ b/src/i18n/pt_BR/screens/imageViewer.json @@ -0,0 +1,17 @@ +{ + "content": { + "actions": { + "accessibilityLabel": "", + "accessibilityHint": "" + }, + "options": { + "save": "", + "share": "", + "cancel": "" + }, + "save": { + "succeed": "", + "failed": "" + } + } +} \ No newline at end of file From 8194bae5bd50772034d2d42110b99bd85f9de2bf Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:19 +0200 Subject: [PATCH 008/112] New translations announcements.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/announcements.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/i18n/pt_BR/screens/announcements.json diff --git a/src/i18n/pt_BR/screens/announcements.json b/src/i18n/pt_BR/screens/announcements.json new file mode 100644 index 00000000..95737a45 --- /dev/null +++ b/src/i18n/pt_BR/screens/announcements.json @@ -0,0 +1,10 @@ +{ + "heading": "", + "content": { + "published": "", + "button": { + "read": "", + "unread": "" + } + } +} \ No newline at end of file From 2765265624dd71a3ee460409f360acb43d7427b2 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:20 +0200 Subject: [PATCH 009/112] New translations compose.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/compose.json | 178 ++++++++++++++++++++++++++++ 1 file changed, 178 insertions(+) create mode 100644 src/i18n/pt_BR/screens/compose.json diff --git a/src/i18n/pt_BR/screens/compose.json b/src/i18n/pt_BR/screens/compose.json new file mode 100644 index 00000000..dc1419b3 --- /dev/null +++ b/src/i18n/pt_BR/screens/compose.json @@ -0,0 +1,178 @@ +{ + "heading": { + "left": { + "button": "", + "alert": { + "title": "", + "buttons": { + "save": "", + "delete": "", + "cancel": "" + } + } + }, + "right": { + "button": { + "default": "", + "conversation": "", + "reply": "", + "deleteEdit": "", + "edit": "", + "share": "" + }, + "alert": { + "default": { + "title": "", + "button": "" + }, + "removeReply": { + "title": "", + "description": "", + "cancel": "", + "confirm": "" + } + } + } + }, + "content": { + "root": { + "header": { + "postingAs": "", + "spoilerInput": { + "placeholder": "" + }, + "textInput": { + "placeholder": "", + "keyboardImage": { + "exceedMaximum": { + "title": "", + "OK": "" + } + } + } + }, + "footer": { + "attachments": { + "sensitive": "", + "remove": { + "accessibilityLabel": "" + }, + "edit": { + "accessibilityLabel": "" + }, + "upload": { + "accessibilityLabel": "" + } + }, + "emojis": { + "accessibilityHint": "" + }, + "poll": { + "option": { + "placeholder": { + "accessibilityLabel": "", + "single": "", + "multiple": "" + } + }, + "quantity": { + "reduce": { + "accessibilityLabel": "", + "accessibilityHint": "" + }, + "increase": { + "accessibilityLabel": "", + "accessibilityHint": "" + } + }, + "multiple": { + "heading": "", + "options": { + "single": "", + "multiple": "", + "cancel": "" + } + }, + "expiration": { + "heading": "", + "options": { + "300": "", + "1800": "", + "3600": "", + "21600": "", + "86400": "", + "259200": "", + "604800": "", + "cancel": "" + } + } + } + }, + "actions": { + "attachment": { + "accessibilityLabel": "", + "accessibilityHint": "", + "failed": { + "alert": { + "title": "", + "button": "" + } + } + }, + "poll": { + "accessibilityLabel": "", + "accessibilityHint": "" + }, + "visibility": { + "accessibilityLabel": "", + "title": "", + "options": { + "public": "", + "unlisted": "", + "private": "", + "direct": "", + "cancel": "" + } + }, + "spoiler": { + "accessibilityLabel": "" + }, + "emoji": { + "accessibilityLabel": "", + "accessibilityHint": "" + } + }, + "drafts_one": "", + "drafts_other": "" + }, + "editAttachment": { + "header": { + "title": "", + "right": { + "accessibilityLabel": "", + "failed": { + "title": "", + "button": "" + } + } + }, + "content": { + "altText": { + "heading": "", + "placeholder": "" + }, + "imageFocus": "" + } + }, + "draftsList": { + "header": { + "title": "" + }, + "content": { + "accessibilityHint": "", + "textEmpty": "" + }, + "checkAttachment": "" + } + } +} \ No newline at end of file From b55fde1cd405e38bc6cfb18e8e78ca483b0603df Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:21 +0200 Subject: [PATCH 010/112] New translations screens.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/i18n/pt_BR/screens.json diff --git a/src/i18n/pt_BR/screens.json b/src/i18n/pt_BR/screens.json new file mode 100644 index 00000000..59b67261 --- /dev/null +++ b/src/i18n/pt_BR/screens.json @@ -0,0 +1,18 @@ +{ + "screenshot": { + "title": "", + "message": "", + "button": "" + }, + "localCorrupt": { + "message": "" + }, + "pushError": { + "message": "", + "description": "" + }, + "shareError": { + "imageNotSupported": "", + "videoNotSupported": "" + } +} \ No newline at end of file From e1a706d714ef549f545f41158de7a038e57939da Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:22 +0200 Subject: [PATCH 011/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 345 +++++++++++++++++++++++++++++++ 1 file changed, 345 insertions(+) create mode 100644 src/i18n/pt_BR/screens/tabs.json diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json new file mode 100644 index 00000000..5df9d0ae --- /dev/null +++ b/src/i18n/pt_BR/screens/tabs.json @@ -0,0 +1,345 @@ +{ + "tabs": { + "local": { + "name": "" + }, + "public": { + "name": "", + "segments": { + "left": "", + "right": "" + } + }, + "notifications": { + "name": "" + }, + "me": { + "name": "" + } + }, + "common": { + "search": { + "accessibilityLabel": "", + "accessibilityHint": "" + } + }, + "notifications": { + "filter": { + "accessibilityLabel": "", + "accessibilityHint": "" + } + }, + "me": { + "stacks": { + "bookmarks": { + "name": "" + }, + "conversations": { + "name": "" + }, + "favourites": { + "name": "" + }, + "fontSize": { + "name": "" + }, + "lists": { + "name": "" + }, + "list": { + "name": "" + }, + "push": { + "name": "" + }, + "profile": { + "name": "" + }, + "profileName": { + "name": "" + }, + "profileNote": { + "name": "" + }, + "profileFields": { + "name": "" + }, + "settings": { + "name": "" + }, + "webSettings": { + "name": "" + }, + "switch": { + "name": "" + } + }, + "fontSize": { + "showcase": "", + "demo": "", + "availableSizes": "", + "sizes": { + "S": "", + "M": "", + "L": "", + "XL": "", + "XXL": "" + } + }, + "profile": { + "cancellation": { + "title": "", + "message": "", + "buttons": { + "cancel": "", + "discard": "" + } + }, + "feedback": { + "succeed": "", + "failed": "" + }, + "root": { + "name": { + "title": "" + }, + "avatar": { + "title": "", + "description": "" + }, + "header": { + "title": "", + "description": "" + }, + "note": { + "title": "" + }, + "fields": { + "title": "", + "total_one": "", + "total_other": "" + }, + "visibility": { + "title": "", + "options": { + "public": "", + "unlisted": "", + "private": "", + "cancel": "" + } + }, + "sensitive": { + "title": "" + }, + "lock": { + "title": "", + "description": "" + }, + "bot": { + "title": "", + "description": "" + } + }, + "fields": { + "group": "", + "label": "", + "content": "" + } + }, + "push": { + "notAvailable": "", + "enable": { + "direct": "", + "settings": "" + }, + "global": { + "heading": "", + "description": "" + }, + "decode": { + "heading": "", + "description": "" + }, + "default": { + "heading": "" + }, + "follow": { + "heading": "" + }, + "favourite": { + "heading": "" + }, + "reblog": { + "heading": "" + }, + "mention": { + "heading": "" + }, + "poll": { + "heading": "" + }, + "howitworks": "" + }, + "root": { + "announcements": { + "content": { + "unread": "", + "read": "", + "empty": "" + } + }, + "push": { + "content": { + "enabled": "", + "disabled": "" + } + }, + "update": { + "title": "" + }, + "logout": { + "button": "", + "alert": { + "title": "", + "message": "", + "buttons": { + "logout": "", + "cancel": "" + } + } + } + }, + "settings": { + "fontsize": { + "heading": "", + "content": { + "S": "", + "M": "", + "L": "", + "XL": "", + "XXL": "" + } + }, + "language": { + "heading": "", + "options": { + "cancel": "" + } + }, + "theme": { + "heading": "", + "options": { + "auto": "", + "light": "", + "dark": "", + "cancel": "" + } + }, + "darkTheme": { + "heading": "", + "options": { + "lighter": "", + "darker": "", + "cancel": "" + } + }, + "browser": { + "heading": "", + "options": { + "internal": "", + "external": "", + "cancel": "" + } + }, + "staticEmoji": { + "heading": "", + "description": "" + }, + "feedback": { + "heading": "" + }, + "support": { + "heading": "" + }, + "review": { + "heading": "" + }, + "contact": { + "heading": "" + }, + "analytics": { + "heading": "", + "description": "" + }, + "version": "", + "instanceVersion": "" + }, + "switch": { + "existing": "", + "new": "" + } + }, + "shared": { + "account": { + "actions": { + "accessibilityLabel": "", + "accessibilityHint": "" + }, + "followed_by": "", + "moved": "", + "created_at": "", + "summary": { + "statuses_count": "", + "following_count": "", + "followers_count": "" + }, + "toots": { + "default": "", + "all": "" + } + }, + "attachments": { + "name": "" + }, + "search": { + "header": { + "prefix": "", + "placeholder": "" + }, + "empty": { + "general": "", + "advanced": { + "header": "", + "example": { + "account": "", + "hashtag": "", + "statusLink": "", + "accountLink": "" + } + } + }, + "sections": { + "accounts": "", + "hashtags": "", + "statuses": "" + }, + "notFound": "" + }, + "toot": { + "name": "" + }, + "users": { + "accounts": { + "following": "", + "followers": "" + }, + "statuses": { + "reblogged_by": "", + "favourited_by": "" + } + }, + "history": { + "name": "" + } + } +} \ No newline at end of file From ffc45080e39fab5bd417fe79d9d6effd26901457 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:23 +0200 Subject: [PATCH 012/112] New translations mediaSelector.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/mediaSelector.json | 28 ++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/i18n/pt_BR/components/mediaSelector.json diff --git a/src/i18n/pt_BR/components/mediaSelector.json b/src/i18n/pt_BR/components/mediaSelector.json new file mode 100644 index 00000000..16411094 --- /dev/null +++ b/src/i18n/pt_BR/components/mediaSelector.json @@ -0,0 +1,28 @@ +{ + "title": "", + "options": { + "library": "", + "photo": "", + "cancel": "" + }, + "library": { + "alert": { + "title": "", + "message": "", + "buttons": { + "settings": "", + "cancel": "" + } + } + }, + "photo": { + "alert": { + "title": "", + "message": "", + "buttons": { + "settings": "", + "cancel": "" + } + } + } +} \ No newline at end of file From 028d0b95e9c1d4d9ed68780ba3fc9e9250f49345 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 15:09:24 +0200 Subject: [PATCH 013/112] New translations emojis.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/emojis.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/i18n/pt_BR/components/emojis.json diff --git a/src/i18n/pt_BR/components/emojis.json b/src/i18n/pt_BR/components/emojis.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/src/i18n/pt_BR/components/emojis.json @@ -0,0 +1 @@ +{} \ No newline at end of file From 5ef6d64f52561727fbc1bc28a7a312827894293b Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 16:04:18 +0200 Subject: [PATCH 014/112] New translations instance.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/instance.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/i18n/pt_BR/components/instance.json b/src/i18n/pt_BR/components/instance.json index caf79184..7d619638 100644 --- a/src/i18n/pt_BR/components/instance.json +++ b/src/i18n/pt_BR/components/instance.json @@ -1,27 +1,27 @@ { "server": { "textInput": { - "placeholder": "" + "placeholder": "Domínio da instância" }, - "button": "", + "button": "Entrar", "information": { - "name": "", - "accounts": "", - "statuses": "", - "domains": "" + "name": "Nome", + "accounts": "Usuários", + "statuses": "Toots", + "domains": "Universo" }, "disclaimer": { - "base": "", - "privacy": "" + "base": "O processo de login usa o navegador do sistema e as informações da sua conta não estarão visíveis para o aplicativo Tooot. Consulte Mais informação ", + "privacy": "política de privacidade" } }, "update": { "alert": { - "title": "", - "message": "", + "title": "Conectado a esta instância", + "message": "Você pode fazer login em outra conta mantendo a conta existente logada", "buttons": { - "cancel": "", - "continue": "" + "cancel": "$t(common:buttons.cancel)", + "continue": "Continuar" } } } From bda0d3157b5ffcbc86465e457a4a347ab16c140c Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 16:04:19 +0200 Subject: [PATCH 015/112] New translations mediaSelector.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/mediaSelector.json | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/i18n/pt_BR/components/mediaSelector.json b/src/i18n/pt_BR/components/mediaSelector.json index 16411094..bbb7c59a 100644 --- a/src/i18n/pt_BR/components/mediaSelector.json +++ b/src/i18n/pt_BR/components/mediaSelector.json @@ -1,27 +1,27 @@ { - "title": "", + "title": "Selecionar fonte de mídia", "options": { - "library": "", - "photo": "", - "cancel": "" + "library": "Carregar da biblioteca", + "photo": "Tirar foto", + "cancel": "$t(common:buttons.cancel)" }, "library": { "alert": { - "title": "", - "message": "", + "title": "Sem permissão", + "message": "Exigir permissão de leitura da biblioteca de fotos para fazer upload", "buttons": { - "settings": "", - "cancel": "" + "settings": "Atualizar configurações", + "cancel": "$t(common:buttons.cancel)" } } }, "photo": { "alert": { - "title": "", - "message": "", + "title": "Sem permissão", + "message": "Requer permissão de uso da câmera para fazer upload", "buttons": { - "settings": "", - "cancel": "" + "settings": "Atualizar configurações", + "cancel": "$t(common:buttons.cancel)" } } } From 17141af4d150c79f2de043af6ef80facdd11133f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 16:04:20 +0200 Subject: [PATCH 016/112] New translations emojis.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/emojis.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/pt_BR/components/emojis.json b/src/i18n/pt_BR/components/emojis.json index 9e26dfee..21996015 100644 --- a/src/i18n/pt_BR/components/emojis.json +++ b/src/i18n/pt_BR/components/emojis.json @@ -1 +1,3 @@ -{} \ No newline at end of file +{ + "frequentUsed": "Usados frequentemente" +} \ No newline at end of file From abadd610f37c2ad6027164fa5ab894f4ade5ea15 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 18:12:45 +0200 Subject: [PATCH 017/112] New translations parse.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/parse.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/pt_BR/components/parse.json b/src/i18n/pt_BR/components/parse.json index 8b1b18b8..606d1a46 100644 --- a/src/i18n/pt_BR/components/parse.json +++ b/src/i18n/pt_BR/components/parse.json @@ -1,9 +1,9 @@ { "HTML": { "expanded": { - "true": "", - "false": "" + "true": "Fechar {{hint}}", + "false": "Expandir {{hint}}" }, - "defaultHint": "" + "defaultHint": "artigo" } } \ No newline at end of file From 9cdad9619074e2a7379ebf7f099216e698ac80a5 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 18:12:46 +0200 Subject: [PATCH 018/112] New translations relationship.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/relationship.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i18n/pt_BR/components/relationship.json b/src/i18n/pt_BR/components/relationship.json index ccf2aa7b..f1942799 100644 --- a/src/i18n/pt_BR/components/relationship.json +++ b/src/i18n/pt_BR/components/relationship.json @@ -1,16 +1,16 @@ { "follow": { - "function": "" + "function": "Seguir usuário" }, "block": { - "function": "" + "function": "Bloquear usuário" }, "button": { - "error": "", - "blocked_by": "", - "blocking": "", - "following": "", - "requested": "", - "default": "" + "error": "Erro ao carregar", + "blocked_by": "Bloqueado pelo usuário", + "blocking": "Desbloquear", + "following": "Deixar de seguir", + "requested": "Cancelar a solicitação", + "default": "Seguir" } } \ No newline at end of file From c61290483c28ba6dac071e467d571975d72b5edb Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 18:12:47 +0200 Subject: [PATCH 019/112] New translations timeline.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/timeline.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json index adaf6ba5..670e51d1 100644 --- a/src/i18n/pt_BR/components/timeline.json +++ b/src/i18n/pt_BR/components/timeline.json @@ -1,21 +1,21 @@ { "empty": { "error": { - "message": "", - "button": "" + "message": "Erro ao carregar", + "button": "Tentar novamente" }, "success": { - "message": "" + "message": "Linha do tempo vazia" } }, "end": { - "message": "" + "message": "Que tal um copo de <0 />" }, "lookback": { - "message": "" + "message": "Última leitura em" }, "refresh": { - "fetchPreviousPage": "", + "fetchPreviousPage": "Mais novo aqui", "refetch": "" }, "shared": { From 1438536cabfcab8e604cf777aa4c2103c37e1ecf Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 19:09:06 +0200 Subject: [PATCH 020/112] New translations common.json (Portuguese, Brazilian) --- src/i18n/pt_BR/common.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/i18n/pt_BR/common.json b/src/i18n/pt_BR/common.json index d17849b2..0cc54b9b 100644 --- a/src/i18n/pt_BR/common.json +++ b/src/i18n/pt_BR/common.json @@ -1,22 +1,22 @@ { "buttons": { - "OK": "", - "apply": "", - "cancel": "" + "OK": "OK", + "apply": "Aplicar", + "cancel": "Cancelar" }, "customEmoji": { - "accessibilityLabel": "" + "accessibilityLabel": "Emoji personalizado {{emoji}}" }, "message": { "success": { - "message": "" + "message": "{{function}} com sucesso" }, "warning": { "message": "" }, "error": { - "message": "" + "message": "{{function}} falhou, por favor, tente novamente" } }, - "separator": "" + "separator": ", " } \ No newline at end of file From 72704b6eac1e33d3020062584a0e8f7d30da52a8 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 18 May 2022 19:09:07 +0200 Subject: [PATCH 021/112] New translations timeline.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/timeline.json | 56 ++++++++++++------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json index 670e51d1..f3b07d63 100644 --- a/src/i18n/pt_BR/components/timeline.json +++ b/src/i18n/pt_BR/components/timeline.json @@ -16,67 +16,67 @@ }, "refresh": { "fetchPreviousPage": "Mais novo aqui", - "refetch": "" + "refetch": "Mais recente" }, "shared": { "actioned": { - "pinned": "", - "favourite": "", - "status": "", - "follow": "", - "follow_request": "", - "poll": "", + "pinned": "Fixado", + "favourite": "{{name}} favoritou seu toot", + "status": "{{name}} acabou de postar", + "follow": "{{name}} seguiu você", + "follow_request": "{{name}} pediu para te seguir", + "poll": "Uma enquete em que você votou terminou", "reblog": { - "default": "", - "notification": "" + "default": "{{name}} boostou", + "notification": "{{name}} deu boost no teu toot" } }, "actions": { "reply": { - "accessibilityLabel": "" + "accessibilityLabel": "Responder a este toot" }, "reblogged": { - "accessibilityLabel": "", - "function": "" + "accessibilityLabel": "Boost este toot", + "function": "Boost toot" }, "favourited": { - "accessibilityLabel": "", - "function": "" + "accessibilityLabel": "Adicionar este toot aos favoritos", + "function": "Toot favorito" }, "bookmarked": { - "accessibilityLabel": "", - "function": "" + "accessibilityLabel": "Adicionar este toot aos favoritos", + "function": "Favoritos" } }, "actionsUsers": { "reblogged_by": { - "accessibilityLabel": "", - "accessibilityHint": "", + "accessibilityLabel": "{{count}} usuários compartilharam este toot", + "accessibilityHint": "Toque para conhecer os usuários", "text": "" }, "favourited_by": { - "accessibilityLabel": "", - "accessibilityHint": "", + "accessibilityLabel": "{{count}} usuários favoritaram este toot", + "accessibilityHint": "Toque para conhecer os usuários", "text": "" }, "history": { - "accessibilityLabel": "", - "accessibilityHint": "", - "text_one": "", - "text_other": "" + "accessibilityLabel": "Este toot foi editado {{count}} vezes", + "accessibilityHint": "Toque para ver o histórico completo de edição", + "text_one": "{{count}} edição", + "text_other": "{{count}} edições" } }, "attachment": { "sensitive": { - "button": "" + "button": "Mostrar mídia sensível" }, "unsupported": { - "text": "", - "button": "" + "text": "Erro ao carregar", + "button": "Experimente o link remoto" } }, "avatar": { - "accessibilityLabel": "", + "accessibilityLabel": "Avatar de {{name}}", "accessibilityHint": "" }, "content": { From 2692832cd46d85946e5c277a78f45e56cd1d7600 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 19 May 2022 03:32:52 +0200 Subject: [PATCH 022/112] New translations screens.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/i18n/pt_BR/screens.json b/src/i18n/pt_BR/screens.json index 59b67261..3adf992a 100644 --- a/src/i18n/pt_BR/screens.json +++ b/src/i18n/pt_BR/screens.json @@ -1,18 +1,18 @@ { "screenshot": { - "title": "", - "message": "", - "button": "" + "title": "Proteção de privacidade", + "message": "Por favor, não divulgue a identidade de outros usuários, como nome de usuário, avatar, etc. Obrigado!", + "button": "Confirmar" }, "localCorrupt": { - "message": "" + "message": "Sua sessão expirou. Por favor, faça o login novamente" }, "pushError": { - "message": "", - "description": "" + "message": "Erro no Serviço Push", + "description": "Por favor, re-ative as notificações push nas configurações" }, "shareError": { - "imageNotSupported": "", - "videoNotSupported": "" + "imageNotSupported": "Tipo de imagem {{type}} não suportado", + "videoNotSupported": "Tipo de vídeo {{type}} não suportado" } } \ No newline at end of file From 0e5eacae58a107c5d68754400634b11331441c04 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 19 May 2022 04:30:04 +0200 Subject: [PATCH 023/112] New translations timeline.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/timeline.json | 136 ++++++++++++------------ 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json index f3b07d63..4ef048d0 100644 --- a/src/i18n/pt_BR/components/timeline.json +++ b/src/i18n/pt_BR/components/timeline.json @@ -52,12 +52,12 @@ "reblogged_by": { "accessibilityLabel": "{{count}} usuários compartilharam este toot", "accessibilityHint": "Toque para conhecer os usuários", - "text": "" + "text": "$t(screenTabs:shared.users.statuses.reblogged_by)" }, "favourited_by": { "accessibilityLabel": "{{count}} usuários favoritaram este toot", "accessibilityHint": "Toque para conhecer os usuários", - "text": "" + "text": "$t(screenTabs:shared.users.statuses.favourited_by)" }, "history": { "accessibilityLabel": "Este toot foi editado {{count}} vezes", @@ -77,136 +77,136 @@ }, "avatar": { "accessibilityLabel": "Avatar de {{name}}", - "accessibilityHint": "" + "accessibilityHint": "Toque para ir à página de {{name}}" }, "content": { - "expandHint": "" + "expandHint": "conteúdo oculto" }, - "filtered": "", - "fullConversation": "", + "filtered": "Filtrado", + "fullConversation": "Ler conversas", "translate": { - "default": "", - "succeed": "", - "failed": "", - "source_not_supported": "", - "target_not_supported": "" + "default": "Traduzir", + "succeed": "Traduzido por {{provider}} de {{source}}", + "failed": "Falha na tradução", + "source_not_supported": "idioma do toot não é suportado", + "target_not_supported": "O idioma de destino não é suportado" }, "header": { "shared": { "account": { "name": { - "accessibilityHint": "" + "accessibilityHint": "Nome de exibição" }, "account": { - "accessibilityHint": "" + "accessibilityHint": "Conta do usuário" } }, - "application": "", + "application": "Tooted com {{application}}", "edited": { - "accessibilityLabel": "" + "accessibilityLabel": "Toot editado" }, "muted": { - "accessibilityLabel": "" + "accessibilityLabel": "Toot silenciado" }, "visibility": { "direct": { - "accessibilityLabel": "" + "accessibilityLabel": "Enviar uma mensagem direta" }, "private": { - "accessibilityLabel": "" + "accessibilityLabel": "Toot é visível apenas para seguidores" } } }, "conversation": { - "withAccounts": "", + "withAccounts": "Com", "delete": { - "function": "" + "function": "Excluir mensagem direta" } }, "actions": { - "accessibilityHint": "", + "accessibilityHint": "Ações para este toot, como o seu usuário publicado", "account": { - "heading": "", + "heading": "Sobre o usuário", "mute": { - "function": "", - "button": "" + "function": "Silenciar usuário", + "button": "Silenciar @{{acct}}" }, "block": { - "function": "", - "button": "" + "function": "Bloquear usuário", + "button": "Bloquear @{{acct}}" }, "reports": { - "function": "", - "button": "" + "function": "Denunciar usuário", + "button": "Reportar @{{acct}}" } }, "domain": { - "heading": "", + "heading": "Sobre a instância", "block": { - "function": "", - "button": "" + "function": "Bloquear instância", + "button": "Bloquear a instância {{domain}}" }, "alert": { - "title": "", - "message": "", + "title": "Confirma bloquear {{domain}}?", + "message": "Na maioria das vezes, você pode silenciar ou bloquear determinado usuário.\n\nDepois de bloquear a instância, todo seu conteúdo, incluindo seguidores, será removido!", "buttons": { - "confirm": "", - "cancel": "" + "confirm": "Confirmar bloqueio", + "cancel": "$t(common:buttons.cancel)" } } }, "share": { "status": { - "heading": "", - "button": "" + "heading": "Compartilhar toot", + "button": "Compartilhar o link para este mundo" }, "account": { - "heading": "", - "button": "" + "heading": "Compartilhar Usuário", + "button": "Compartilhar link para este usuário" } }, "status": { - "heading": "", + "heading": "Sobre o toot", "edit": { - "function": "", - "button": "" + "function": "Editar toot", + "button": "Editar este toot" }, "delete": { - "function": "", - "button": "", + "function": "Remover toot", + "button": "Deletar este toot", "alert": { - "title": "", - "message": "", + "title": "Confirmar exclusão?", + "message": "Tem certeza que deseja excluir este toot? Todos os boosts e favoritos serão apagados, incluindo todas as respostas.", "buttons": { - "confirm": "", - "cancel": "" + "confirm": "Confirme a exclusão", + "cancel": "$t(common:buttons.cancel)" } } }, "deleteEdit": { - "function": "", - "button": "", + "function": "Remover toot", + "button": "Excluir e rascunhar", "alert": { - "title": "", - "message": "", + "title": "Confirmar exclusão?", + "message": "Tem certeza que deseja excluir este toot? Todos os boosts e favoritos serão apagados, incluindo todas as respostas.", "buttons": { - "confirm": "", - "cancel": "" + "confirm": "Confirme a exclusão", + "cancel": "$t(common:buttons.cancel)" } } }, "mute": { - "function": "", + "function": "Silenciar toot", "button": { - "positive": "", - "negative": "" + "positive": "Silenciar este toot e respostas", + "negative": "Desbloquear este toot e respostas" } }, "pin": { - "function": "", + "function": "Fixar", "button": { - "positive": "", - "negative": "" + "positive": "Fixar este toot", + "negative": "Desafixar este toot" } } } @@ -215,18 +215,18 @@ "poll": { "meta": { "button": { - "vote": "", - "refresh": "" + "vote": "Votar", + "refresh": "Atualizar" }, "count": { - "voters_one": "", - "voters_other": "", - "votes_one": "", - "votes_other": "" + "voters_one": "{{count}} usuário votou", + "voters_other": "{{count}} usuários votaram", + "votes_one": "{{count}} voto", + "votes_other": "{{count}} votos" }, "expiration": { - "expired": "", - "until": "" + "expired": "Voto expirado", + "until": "Expira em <0 />" } } } From 42e444c31f0f340470721097e03316c2fd403067 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 19 May 2022 21:19:51 +0200 Subject: [PATCH 024/112] New translations actions.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/actions.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/i18n/pt_BR/screens/actions.json b/src/i18n/pt_BR/screens/actions.json index d6d2c219..c4cff91b 100644 --- a/src/i18n/pt_BR/screens/actions.json +++ b/src/i18n/pt_BR/screens/actions.json @@ -1,18 +1,18 @@ { "content": { "button": { - "apply": "", - "cancel": "" + "apply": "$t(common:buttons.apply)", + "cancel": "$t(common:buttons.cancel)" }, "notificationsFilter": { - "heading": "", + "heading": "Exibir notificações", "content": { - "follow": "", - "favourite": "", - "reblog": "", - "mention": "", - "poll": "", - "follow_request": "" + "follow": "$t(screenTabs:me.push.follow.heading)", + "favourite": "$t(screenTabs:me.push.favourite.heading)", + "reblog": "$t(screenTabs:me.push.reblog.heading)", + "mention": "$t(screenTabs:me.push.mention.heading)", + "poll": "$t(screenTabs:me.push.poll.heading)", + "follow_request": "Seguidores pendentes" } } } From bfdf9e50542fda2d7c7a2169966da0d18b76870b Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 19 May 2022 22:55:39 +0200 Subject: [PATCH 025/112] New translations announcements.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/announcements.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/i18n/pt_BR/screens/announcements.json b/src/i18n/pt_BR/screens/announcements.json index 95737a45..067c02a1 100644 --- a/src/i18n/pt_BR/screens/announcements.json +++ b/src/i18n/pt_BR/screens/announcements.json @@ -1,10 +1,10 @@ { - "heading": "", + "heading": "Comunicados", "content": { - "published": "", + "published": "Publicado <0 />", "button": { - "read": "", - "unread": "" + "read": "Ler", + "unread": "Marcar como lido" } } } \ No newline at end of file From b88bad674d8b66159e309ceecd5c8421627dff60 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Thu, 19 May 2022 22:55:40 +0200 Subject: [PATCH 026/112] New translations compose.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/compose.json | 58 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/i18n/pt_BR/screens/compose.json b/src/i18n/pt_BR/screens/compose.json index dc1419b3..ebb4ace3 100644 --- a/src/i18n/pt_BR/screens/compose.json +++ b/src/i18n/pt_BR/screens/compose.json @@ -1,35 +1,35 @@ { "heading": { "left": { - "button": "", + "button": "Cancelar", "alert": { - "title": "", + "title": "Cancelar edições?", "buttons": { - "save": "", - "delete": "", - "cancel": "" + "save": "Salvar rascunho", + "delete": "Apagar rascunho", + "cancel": "Cancelar" } } }, "right": { "button": { - "default": "", - "conversation": "", - "reply": "", - "deleteEdit": "", - "edit": "", - "share": "" + "default": "Toot", + "conversation": "Toot DM", + "reply": "Resposta de toot", + "deleteEdit": "Toot", + "edit": "Toot", + "share": "Toot" }, "alert": { "default": { "title": "", - "button": "" + "button": "Tente Novamente" }, "removeReply": { - "title": "", - "description": "", - "cancel": "", - "confirm": "" + "title": "Não foi possível encontrar um toot respondido", + "description": "Um toot respondido pode ter sido excluído. Você quer removê-lo da sua referência?", + "cancel": "$t(common:buttons.cancel)", + "confirm": "Remover referência" } } } @@ -37,47 +37,47 @@ "content": { "root": { "header": { - "postingAs": "", + "postingAs": "Tooting cono @{{acct}}@{{domain}}", "spoilerInput": { "placeholder": "" }, "textInput": { - "placeholder": "", + "placeholder": "No que você está pensando", "keyboardImage": { "exceedMaximum": { - "title": "", - "OK": "" + "title": "Quantidade máxima de anexos atingida", + "OK": "$t(common:buttons.OK)" } } } }, "footer": { "attachments": { - "sensitive": "", + "sensitive": "Marcar anexos como sensível", "remove": { - "accessibilityLabel": "" + "accessibilityLabel": "Remover anexo enviado, número {{attachment}}" }, "edit": { - "accessibilityLabel": "" + "accessibilityLabel": "Editar o anexo enviado, número {{attachment}}" }, "upload": { - "accessibilityLabel": "" + "accessibilityLabel": "Carregar mais anexos" } }, "emojis": { - "accessibilityHint": "" + "accessibilityHint": "Toque para adicionar emojis ao toot" }, "poll": { "option": { "placeholder": { - "accessibilityLabel": "", - "single": "", - "multiple": "" + "accessibilityLabel": "Opção de enquete {{index}}", + "single": "Única escolha", + "multiple": "Múltiplas opções" } }, "quantity": { "reduce": { - "accessibilityLabel": "", + "accessibilityLabel": "Reduzir opções da enquete para {{amount}}", "accessibilityHint": "" }, "increase": { From f62e1eb7b7e071b0ed67c131f3932e5a27931ac0 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 24 May 2022 19:34:12 +0200 Subject: [PATCH 027/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 44 ++++++++++++++++---------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 5df9d0ae..1f3fc88f 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -1,74 +1,74 @@ { "tabs": { "local": { - "name": "" + "name": "Seguindo" }, "public": { "name": "", "segments": { - "left": "", - "right": "" + "left": "Global", + "right": "Local" } }, "notifications": { - "name": "" + "name": "Notificações" }, "me": { - "name": "" + "name": "Sobre mim" } }, "common": { "search": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Pesquisa", + "accessibilityHint": "Pesquisar por hashtags, usuários ou toots" } }, "notifications": { "filter": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Filtro", + "accessibilityHint": "Filtrar notificações por tipos" } }, "me": { "stacks": { "bookmarks": { - "name": "" + "name": "Favoritos" }, "conversations": { - "name": "" + "name": "Mensagens diretas" }, "favourites": { - "name": "" + "name": "Favoritos" }, "fontSize": { - "name": "" + "name": "Tamanho da fonte do Toot" }, "lists": { - "name": "" + "name": "Listas" }, "list": { - "name": "" + "name": "Lista: {{list}}" }, "push": { - "name": "" + "name": "Notificação" }, "profile": { - "name": "" + "name": "Editar Perfil" }, "profileName": { - "name": "" + "name": "Editar nome de exibição" }, "profileNote": { - "name": "" + "name": "Editar descrição" }, "profileFields": { - "name": "" + "name": "Editar Metadados" }, "settings": { - "name": "" + "name": "Configurações do Aplicativo" }, "webSettings": { - "name": "" + "name": "Mais configurações" }, "switch": { "name": "" From bf6fff9d1e5e895ed2918edb4068484096c612d5 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Tue, 24 May 2022 20:30:09 +0200 Subject: [PATCH 028/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 1f3fc88f..afe9b494 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -71,15 +71,15 @@ "name": "Mais configurações" }, "switch": { - "name": "" + "name": "Alterar Conta" } }, "fontSize": { - "showcase": "", - "demo": "", - "availableSizes": "", + "showcase": "Exemplo de toot", + "demo": "

Esta é uma demonstração também😊. Você pode escolher entre várias opções abaixo.

Esta configuração afeta apenas o conteúdo principal dos toots, mas não os tamanhos de outra fonte.

", + "availableSizes": "Tamanhos disponíveis", "sizes": { - "S": "", + "S": "S", "M": "", "L": "", "XL": "", From 2fd215e9a8168b8d8690555d30892243496de913 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Fri, 27 May 2022 23:04:27 +0200 Subject: [PATCH 029/112] New translations imageViewer.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/imageViewer.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/i18n/pt_BR/screens/imageViewer.json b/src/i18n/pt_BR/screens/imageViewer.json index ad2b495c..e6ec5e54 100644 --- a/src/i18n/pt_BR/screens/imageViewer.json +++ b/src/i18n/pt_BR/screens/imageViewer.json @@ -1,17 +1,17 @@ { "content": { "actions": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Mais ações desta imagem", + "accessibilityHint": "Você pode salvar ou compartilhar esta imagem" }, "options": { - "save": "", - "share": "", - "cancel": "" + "save": "Salvar imagem", + "share": "Compartilhar Imagem", + "cancel": "$t(common:buttons.cancel)" }, "save": { - "succeed": "", - "failed": "" + "succeed": "Imagem salva", + "failed": "Falha ao salvar imagem" } } } \ No newline at end of file From 628841ef91ccf89c5cff169c90283420d4c22d12 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Fri, 27 May 2022 23:04:28 +0200 Subject: [PATCH 030/112] New translations compose.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/compose.json | 94 ++++++++++++++--------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/src/i18n/pt_BR/screens/compose.json b/src/i18n/pt_BR/screens/compose.json index ebb4ace3..f59596b9 100644 --- a/src/i18n/pt_BR/screens/compose.json +++ b/src/i18n/pt_BR/screens/compose.json @@ -22,7 +22,7 @@ }, "alert": { "default": { - "title": "", + "title": "Falha no tooting", "button": "Tente Novamente" }, "removeReply": { @@ -39,7 +39,7 @@ "header": { "postingAs": "Tooting cono @{{acct}}@{{domain}}", "spoilerInput": { - "placeholder": "" + "placeholder": "Mensagem de aviso para Spoiler" }, "textInput": { "placeholder": "No que você está pensando", @@ -78,101 +78,101 @@ "quantity": { "reduce": { "accessibilityLabel": "Reduzir opções da enquete para {{amount}}", - "accessibilityHint": "" + "accessibilityHint": "Quantidade mínima de opções da enquete atingida, tem atualmente {{amount}}" }, "increase": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Aumentar opções de enquete para {{amount}}", + "accessibilityHint": "Quantidade máxima de opções da enquete atingida, tem atualmente {{amount}}" } }, "multiple": { - "heading": "", + "heading": "Tipo de opção", "options": { - "single": "", - "multiple": "", - "cancel": "" + "single": "Uma opção", + "multiple": "Múltipla escolha", + "cancel": "$t(common:buttons.cancel)" } }, "expiration": { - "heading": "", + "heading": "Validade", "options": { - "300": "", - "1800": "", - "3600": "", - "21600": "", - "86400": "", - "259200": "", - "604800": "", - "cancel": "" + "300": "5 minutos", + "1800": "30 minutos", + "3600": "1 hora", + "21600": "6 horas", + "86400": "1 dia", + "259200": "3 dias", + "604800": "7 dias", + "cancel": "$t(common:buttons.cancel)" } } } }, "actions": { "attachment": { - "accessibilityLabel": "", - "accessibilityHint": "", + "accessibilityLabel": "Fazer upload de um anexo", + "accessibilityHint": "A função de enquete será desativada quando houver qualquer anexo", "failed": { "alert": { - "title": "", - "button": "" + "title": "Falha no envio", + "button": "Tente Novamente" } } }, "poll": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Adicionar enquete", + "accessibilityHint": "A função Anexo será desabilitada quando a enquete estiver ativa" }, "visibility": { - "accessibilityLabel": "", - "title": "", + "accessibilityLabel": "Visibilidade do toot é {{visibility}}", + "title": "Visibilidade do Toot", "options": { - "public": "", - "unlisted": "", - "private": "", - "direct": "", - "cancel": "" + "public": "Público", + "unlisted": "Não listado", + "private": "Apenas seguidores", + "direct": "Mensagem Direta", + "cancel": "$t(common:buttons.cancel)" } }, "spoiler": { - "accessibilityLabel": "" + "accessibilityLabel": "Spoiler" }, "emoji": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Adicionar emoji", + "accessibilityHint": "Abra o painel de seleção de emojis, deslize horizontalmente para alterar a página" } }, - "drafts_one": "", - "drafts_other": "" + "drafts_one": "Rascunho ({{count}})", + "drafts_other": "Rascunhos ({{count}})" }, "editAttachment": { "header": { - "title": "", + "title": "Editar anexos", "right": { - "accessibilityLabel": "", + "accessibilityLabel": "Salvar anexo editado", "failed": { - "title": "", - "button": "" + "title": "Falha ao editar", + "button": "Tente Novamente" } } }, "content": { "altText": { - "heading": "", - "placeholder": "" + "heading": "Descrever mídia para deficientes visuais", + "placeholder": "Você pode adicionar uma descrição, às vezes chamada texto alternativo aos seus meios de comunicação social, assim eles estão acessíveis a ainda mais pessoas, incluindo as que são cegos ou deficientes visuais.\n\nAs boas descrições são concisas, mas apresentam o que está em sua mídia com precisão o suficiente para entender seu contexto." }, - "imageFocus": "" + "imageFocus": "Arraste o círculo de foco para atualizar o ponto de foco" } }, "draftsList": { "header": { - "title": "" + "title": "Rascunho" }, "content": { - "accessibilityHint": "", - "textEmpty": "" + "accessibilityHint": "Toque para editar este rascunho", + "textEmpty": "O conteúdo está vazio" }, - "checkAttachment": "" + "checkAttachment": "Verificando anexos no servidor..." } } } \ No newline at end of file From 61dab1a2bd2ab096bc0295fce167cb4cb1536260 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Fri, 27 May 2022 23:04:29 +0200 Subject: [PATCH 031/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index afe9b494..4eb3e6f3 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -80,35 +80,35 @@ "availableSizes": "Tamanhos disponíveis", "sizes": { "S": "S", - "M": "", - "L": "", - "XL": "", - "XXL": "" + "M": "M - Padrão", + "L": "Grande", + "XL": "Extra grande", + "XXL": "Extra grande" } }, "profile": { "cancellation": { - "title": "", - "message": "", + "title": "Alterações não salvas", + "message": "Sua alteração não foi salva. Descartar as alterações?", "buttons": { - "cancel": "", - "discard": "" + "cancel": "$t(common:buttons.cancel)", + "discard": "Descartar" } }, "feedback": { - "succeed": "", - "failed": "" + "succeed": "{{type}} atualizado", + "failed": "{{type}} falhou na atualização. Por favor, tente novamente" }, "root": { "name": { - "title": "" + "title": "Nome de exibição" }, "avatar": { - "title": "", - "description": "" + "title": "Imagem de perfil", + "description": "Será reduzido a 400x400px" }, "header": { - "title": "", + "title": "Banner", "description": "" }, "note": { From 7c84a0ca0945dd079cfaa37e19372088008fde61 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 00:24:54 +0200 Subject: [PATCH 032/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 4eb3e6f3..15e1a60d 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -109,74 +109,74 @@ }, "header": { "title": "Banner", - "description": "" + "description": "Será reduzido para 1500x500px" }, "note": { - "title": "" + "title": "Descrição" }, "fields": { - "title": "", - "total_one": "", - "total_other": "" + "title": "Metadados", + "total_one": "{{count}} campo", + "total_other": "{{count}} campos" }, "visibility": { - "title": "", + "title": "Visibilidade da Postagem", "options": { - "public": "", - "unlisted": "", - "private": "", - "cancel": "" + "public": "Público", + "unlisted": "Não listado", + "private": "Apenas seguidores", + "cancel": "$t(common:buttons.cancel)" } }, "sensitive": { - "title": "" + "title": "Publicação de Mídia Sensiva" }, "lock": { - "title": "", - "description": "" + "title": "Trancar conta", + "description": "Requer que você aprove manualmente seguidores" }, "bot": { - "title": "", - "description": "" + "title": "Conta bot", + "description": "Essa conta executa principalmente ações automatizadas e pode não ser monitorada" } }, "fields": { - "group": "", - "label": "", - "content": "" + "group": "Grupo {{index}}", + "label": "Rótulo", + "content": "Conteúdo" } }, "push": { - "notAvailable": "", + "notAvailable": "Seu telefone não suporta notificação de envio de tooot", "enable": { - "direct": "", - "settings": "" + "direct": "Habilitar notificações via push", + "settings": "Ativar em configurações" }, "global": { - "heading": "", - "description": "" + "heading": "Habilitar para {{acct}}", + "description": "Mensagens são encaminhadas pelo servidor do tooot" }, "decode": { - "heading": "", - "description": "" + "heading": "Ver detalhes da mensagem", + "description": "As mensagens enviadas através do servidor do tooot são criptografadas, mas você pode optar por decodificar a mensagem no servidor. Nosso código fonte de servidor é open source, e nenhuma política de registro." }, "default": { - "heading": "" + "heading": "Padrão" }, "follow": { - "heading": "" + "heading": "Novo seguidor" }, "favourite": { - "heading": "" + "heading": "Favoritos" }, "reblog": { - "heading": "" + "heading": "Boosted" }, "mention": { - "heading": "" + "heading": "Mencionou você" }, "poll": { - "heading": "" + "heading": "Pesquisa atualizada" }, "howitworks": "" }, From a686f7d3a7a4f24706e79688cf6821b4dc1b674b Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 01:24:19 +0200 Subject: [PATCH 033/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 148 +++++++++++++++---------------- 1 file changed, 74 insertions(+), 74 deletions(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 15e1a60d..ffb256ca 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -178,168 +178,168 @@ "poll": { "heading": "Pesquisa atualizada" }, - "howitworks": "" + "howitworks": "Saiba como funciona o roteamento" }, "root": { "announcements": { "content": { - "unread": "", - "read": "", - "empty": "" + "unread": "{{amount}} não lidas", + "read": "Não há mensagens não lidas", + "empty": "Nenhum" } }, "push": { "content": { - "enabled": "", - "disabled": "" + "enabled": "Habilitado", + "disabled": "Desabilitado" } }, "update": { - "title": "" + "title": "Atualize para a versão mais recente" }, "logout": { - "button": "", + "button": "Sair", "alert": { - "title": "", - "message": "", + "title": "Desconectar?", + "message": "Após sair, você precisa entrar novamente", "buttons": { - "logout": "", - "cancel": "" + "logout": "Sair", + "cancel": "$t(common:buttons.cancel)" } } } }, "settings": { "fontsize": { - "heading": "", + "heading": "$t(me.stacks.fontSize.name)", "content": { - "S": "", - "M": "", - "L": "", - "XL": "", - "XXL": "" + "S": "$t(me.fontSize.sizes.S)", + "M": "$t(me.fontSize.sizes.M)", + "L": "$t(me.fontSize.sizes.L)", + "XL": "$t(me.fontSize.sizes.XL)", + "XXL": "$t(me.fontSize.sizes.XXL)" } }, "language": { - "heading": "", + "heading": "Idioma", "options": { - "cancel": "" + "cancel": "$t(common:buttons.cancel)" } }, "theme": { - "heading": "", + "heading": "Aparência", "options": { - "auto": "", - "light": "", - "dark": "", - "cancel": "" + "auto": "Como o sistema", + "light": "Modo claro", + "dark": "Modo escuro", + "cancel": "$t(common:buttons.cancel)" } }, "darkTheme": { - "heading": "", + "heading": "Tema escuro", "options": { - "lighter": "", - "darker": "", - "cancel": "" + "lighter": "Claro", + "darker": "Escuro", + "cancel": "$t(common:buttons.cancel)" } }, "browser": { - "heading": "", + "heading": "Abrir links", "options": { - "internal": "", - "external": "", - "cancel": "" + "internal": "Dentro do aplicativo", + "external": "Usar navegador do sistema", + "cancel": "$t(common:buttons.cancel)" } }, "staticEmoji": { - "heading": "", - "description": "" + "heading": "Usar emojis estáticos", + "description": "Se você encontrar falhas frequentes de apps ao visualizar a lista de emojis, você pode tentar usar emojis estáticos." }, "feedback": { - "heading": "" + "heading": "Pedidos de Funcionalidades" }, "support": { - "heading": "" + "heading": "Suporte tooot" }, "review": { - "heading": "" + "heading": "Revisar tooot" }, "contact": { - "heading": "" + "heading": "Contatar tooot" }, "analytics": { - "heading": "", - "description": "" + "heading": "Ajude-nos a melhorar", + "description": "Coletando somente relativo ao uso, não ao usuário" }, - "version": "", - "instanceVersion": "" + "version": "Versão v{{version}}", + "instanceVersion": "Versão Mastodon v{{version}}" }, "switch": { - "existing": "", - "new": "" + "existing": "Escolha a partir do login", + "new": "Fazer login para instância" } }, "shared": { "account": { "actions": { - "accessibilityLabel": "", - "accessibilityHint": "" + "accessibilityLabel": "Ações para o usuário {{user}}", + "accessibilityHint": "Você pode silenciar, bloquear, relatar ou compartilhar este usuário" }, - "followed_by": "", - "moved": "", - "created_at": "", + "followed_by": " está seguindo você", + "moved": "Usuário movido", + "created_at": "Registrado em: {{date}}", "summary": { - "statuses_count": "", - "following_count": "", - "followers_count": "" + "statuses_count": "{{count}} toots", + "following_count": "$t(shared.users.accounts.following)", + "followers_count": "$t(shared.users.accounts.followers)" }, "toots": { - "default": "", - "all": "" + "default": "Toots", + "all": "Toots e respostas" } }, "attachments": { - "name": "" + "name": "<0 /><1>\"s mídia" }, "search": { "header": { - "prefix": "", - "placeholder": "" + "prefix": "Procurando", + "placeholder": "para..." }, "empty": { - "general": "", + "general": "Digite a palavra-chave para pesquisar por $t(screenTabs:shared.search.sections.accounts)£$t(screenTabs:shared.search.sections.hashtags) ou $t(screenTabs:shared.search.sections.statuses)", "advanced": { - "header": "", + "header": "Pesquisa avançada", "example": { - "account": "", - "hashtag": "", - "statusLink": "", - "accountLink": "" + "account": "$t(shared.search.header.prefix) $t(shared.search.sections.accounts)", + "hashtag": "$t(shared.search.header.prefix) $t(shared.search.sections.hashtags)", + "statusLink": "$t(shared.search.header.prefix) $t(shared.search.sections.statuses)", + "accountLink": "$t(shared.search.header.prefix) $t(shared.search.sections.accounts)" } } }, "sections": { - "accounts": "", - "hashtags": "", - "statuses": "" + "accounts": "Usuário", + "hashtags": "Palavras-chave", + "statuses": "Toot" }, - "notFound": "" + "notFound": "Não foi possível encontrar {{searchTerm}} {{type}} relacionado" }, "toot": { - "name": "" + "name": "Discussões" }, "users": { "accounts": { - "following": "", - "followers": "" + "following": "Seguindo {{count}}", + "followers": "{{count}} seguidores" }, "statuses": { - "reblogged_by": "", - "favourited_by": "" + "reblogged_by": "{{count}} boostou", + "favourited_by": "{{count}} favoritados" } }, "history": { - "name": "" + "name": "Histórico de Edição" } } } \ No newline at end of file From 5a23b73f690fd7b2270f5e3299bda4879699e459 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 28 May 2022 12:20:48 +0200 Subject: [PATCH 034/112] Bump packages --- package.json | 30 ++-- src/store.ts | 5 - yarn.lock | 440 +++++++++++++++++++++++++++++++++++---------------- 3 files changed, 318 insertions(+), 157 deletions(-) diff --git a/package.json b/package.json index 37f8acee..067c070b 100644 --- a/package.json +++ b/package.json @@ -26,12 +26,12 @@ }, "dependencies": { "@expo/react-native-action-sheet": "3.13.0", - "@formatjs/intl-datetimeformat": "^5.0.2", - "@formatjs/intl-getcanonicallocales": "^1.9.2", - "@formatjs/intl-locale": "^2.4.47", - "@formatjs/intl-numberformat": "^7.4.3", - "@formatjs/intl-pluralrules": "^4.3.3", - "@formatjs/intl-relativetimeformat": "^10.0.1", + "@formatjs/intl-datetimeformat": "^6.0.1", + "@formatjs/intl-getcanonicallocales": "^2.0.1", + "@formatjs/intl-locale": "^3.0.1", + "@formatjs/intl-numberformat": "^8.0.1", + "@formatjs/intl-pluralrules": "^5.0.1", + "@formatjs/intl-relativetimeformat": "^11.0.1", "@neverdull-agency/expo-unlimited-secure-store": "1.0.10", "@react-native-async-storage/async-storage": "1.17.4", "@react-native-community/blur": "3.6.0", @@ -42,7 +42,7 @@ "@react-navigation/native": "6.0.10", "@react-navigation/native-stack": "6.6.2", "@react-navigation/stack": "6.2.1", - "@reduxjs/toolkit": "1.8.1", + "@reduxjs/toolkit": "1.8.2", "@sentry/react-native": "3.4.2", "@sharcoux/slider": "6.0.3", "axios": "0.27.2", @@ -68,13 +68,13 @@ "expo-updates": "0.13.1", "expo-video-thumbnails": "6.3.0", "expo-web-browser": "10.2.0", - "i18next": "21.8.2", + "i18next": "21.8.4", "li": "1.3.0", "lodash": "4.17.21", "react": "17.0.2", "react-dom": "17.0.2", "react-i18next": "11.16.9", - "react-intl": "^5.25.1", + "react-intl": "^6.0.3", "react-native": "0.68.2", "react-native-animated-spinkit": "1.5.2", "react-native-base64": "^0.2.1", @@ -94,7 +94,7 @@ "react-native-swipe-list-view": "3.2.9", "react-native-tab-view": "3.1.1", "react-query": "3.39.0", - "react-redux": "8.0.1", + "react-redux": "8.0.2", "redux-persist": "6.0.0", "rn-placeholder": "3.0.3", "sentry-expo": "4.1.1", @@ -102,14 +102,14 @@ "valid-url": "1.0.9" }, "devDependencies": { - "@babel/core": "7.17.10", - "@babel/plugin-proposal-optional-chaining": "7.16.7", - "@babel/preset-typescript": "7.16.7", + "@babel/core": "7.18.2", + "@babel/plugin-proposal-optional-chaining": "7.17.12", + "@babel/preset-typescript": "7.17.12", "@expo/config": "6.0.24", "@types/lodash": "4.14.182", "@types/react": "17.0.43", "@types/react-dom": "17.0.14", - "@types/react-native": "0.67.6", + "@types/react-native": "0.67.7", "@types/react-native-base64": "^0.2.0", "@types/react-native-share-menu": "^5.0.2", "@types/react-timeago": "4.1.3", @@ -122,7 +122,7 @@ "patch-package": "6.4.7", "postinstall-postinstall": "2.1.0", "react-native-clean-project": "4.0.1", - "typescript": "4.6.4" + "typescript": "4.7.2" }, "resolutions": { "@types/react": "17.0.43", diff --git a/src/store.ts b/src/store.ts index e243870c..8e6e9e04 100644 --- a/src/store.ts +++ b/src/store.ts @@ -74,11 +74,6 @@ const store = configureStore({ serializableCheck: { ignoredActions: [FLUSH, REHYDRATE, PAUSE, PERSIST, PURGE, REGISTER] } - }).concat(store => next => action => { - console.log('dispatching', action) - let result = next(action) - console.log('next state', store.getState()) - return result }) }) diff --git a/yarn.lock b/yarn.lock index c20b0c3b..a229dda8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -33,7 +33,28 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== -"@babel/core@7.17.10", "@babel/core@^7.13.16": +"@babel/core@7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.2.tgz#87b2fcd7cce9becaa7f5acebdc4f09f3dd19d876" + integrity sha512-A8pri1YJiC5UnkdrWcmfZTJTV85b4UXTAfImGmCfYmax4TR9Cw8sDS0MOk++Gp2mE/BefVJ5nwy5yzqNJbP/DQ== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.18.2" + "@babel/helper-compilation-targets" "^7.18.2" + "@babel/helper-module-transforms" "^7.18.0" + "@babel/helpers" "^7.18.2" + "@babel/parser" "^7.18.0" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.18.2" + "@babel/types" "^7.18.2" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + +"@babel/core@^7.13.16": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.10.tgz#74ef0fbf56b7dfc3f198fc2d927f4f03e12f4b05" integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== @@ -102,6 +123,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" + integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== + dependencies: + "@babel/types" "^7.18.2" + "@jridgewell/gen-mapping" "^0.3.0" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" @@ -137,6 +167,16 @@ browserslist "^4.20.2" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.2.tgz#67a85a10cbd5fc7f1457fec2e7f45441dc6c754b" + integrity sha512-s1jnPotJS9uQnzFtiZVBUxe67CuBa679oWFHpxYYnTpRL/1ffhyX44R9uYiXoa/pLXcY9H2moJta0iaanlk/rQ== + dependencies: + "@babel/compat-data" "^7.17.10" + "@babel/helper-validator-option" "^7.16.7" + browserslist "^4.20.2" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.16.10", "@babel/helper-create-class-features-plugin@^7.16.7", "@babel/helper-create-class-features-plugin@^7.17.6": version "7.17.6" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz#3778c1ed09a7f3e65e6d6e0f6fbfcc53809d92c9" @@ -150,6 +190,19 @@ "@babel/helper-replace-supers" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" +"@babel/helper-create-class-features-plugin@^7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz#fac430912606331cb075ea8d82f9a4c145a4da19" + integrity sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-member-expression-to-functions" "^7.17.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-create-regexp-features-plugin@^7.16.7": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz#1dcc7d40ba0c6b6b25618997c5dbfd310f186fe1" @@ -179,6 +232,11 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd" + integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ== + "@babel/helper-explode-assignable-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz#12a6d8522fdd834f194e868af6354e8650242b7a" @@ -217,7 +275,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-member-expression-to-functions@^7.16.7": +"@babel/helper-member-expression-to-functions@^7.16.7", "@babel/helper-member-expression-to-functions@^7.17.7": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz#a34013b57d8542a8c4ff8ba3f747c02452a4d8c4" integrity sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw== @@ -245,6 +303,20 @@ "@babel/traverse" "^7.17.3" "@babel/types" "^7.17.0" +"@babel/helper-module-transforms@^7.18.0": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd" + integrity sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA== + dependencies: + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-simple-access" "^7.17.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.18.0" + "@babel/types" "^7.18.0" + "@babel/helper-optimise-call-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" @@ -257,6 +329,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== +"@babel/helper-plugin-utils@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96" + integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA== + "@babel/helper-remap-async-to-generator@^7.16.8": version "7.16.8" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz#29ffaade68a367e2ed09c90901986918d25e57e3" @@ -336,6 +413,15 @@ "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" +"@babel/helpers@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384" + integrity sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.18.2" + "@babel/types" "^7.18.2" + "@babel/highlight@^7.10.4", "@babel/highlight@^7.16.7": version "7.16.10" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" @@ -360,6 +446,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== +"@babel/parser@^7.18.0": + version "7.18.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.3.tgz#39e99c7b0c4c56cef4d1eed8de9f506411c2ebc2" + integrity sha512-rL50YcEuHbbauAFAysNsJA4/f89fGTOBRNs9P81sniKnKAr4xULe5AecolcsKbi88xu0ByWYDj/S1AJ3FSFuSQ== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" @@ -488,7 +579,16 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@7.16.7", "@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.16.7": +"@babel/plugin-proposal-optional-chaining@7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.17.12.tgz#f96949e9bacace3a9066323a5cf90cfb9de67174" + integrity sha512-7wigcOs/Z4YWlK7xxjkvaIw84vGhDv/P1dFGQap0nHkc8gFKY/r+hXc8Qzf5k1gY7CvGIcHqAnOagVKJJ1wVOQ== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-optional-chaining@^7.0.0", "@babel/plugin-proposal-optional-chaining@^7.13.12", "@babel/plugin-proposal-optional-chaining@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a" integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA== @@ -656,6 +756,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-syntax-typescript@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz#b54fc3be6de734a56b87508f99d6428b5b605a7b" + integrity sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-transform-arrow-functions@^7.0.0", "@babel/plugin-transform-arrow-functions@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" @@ -969,6 +1076,15 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/plugin-syntax-typescript" "^7.16.7" +"@babel/plugin-transform-typescript@^7.17.12": + version "7.18.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.1.tgz#5fd8b86130bad95c4a24377b41ab989a9ccad22d" + integrity sha512-F+RJmL479HJmC0KeqqwEGZMg1P7kWArLGbAKfEi9yPthJyMNjF+DjxFF/halfQvq1Q9GFM4TUbYDNV8xe4Ctqg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.18.0" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-typescript" "^7.17.12" + "@babel/plugin-transform-unicode-escapes@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz#da8717de7b3287a2c6d659750c964f302b31ece3" @@ -1084,7 +1200,16 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-typescript@7.16.7", "@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.16.7": +"@babel/preset-typescript@7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" + integrity sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-transform-typescript" "^7.17.12" + +"@babel/preset-typescript@^7.13.0", "@babel/preset-typescript@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz#ab114d68bb2020afc069cd51b37ff98a046a70b9" integrity sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ== @@ -1175,6 +1300,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8" + integrity sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.18.2" + "@babel/helper-environment-visitor" "^7.18.2" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.18.0" + "@babel/types" "^7.18.2" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.4.4": version "7.17.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b" @@ -1191,6 +1332,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.0", "@babel/types@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.2.tgz#191abfed79ebe6f4242f643a9a5cbaa36b10b091" + integrity sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@egjs/hammerjs@^2.0.17": version "2.0.17" resolved "https://registry.yarnpkg.com/@egjs/hammerjs/-/hammerjs-2.0.17.tgz#5dc02af75a6a06e4c2db0202cae38c9263895124" @@ -1653,127 +1802,127 @@ find-up "^5.0.0" js-yaml "^4.1.0" -"@formatjs/ecma402-abstract@1.11.4": - version "1.11.4" - resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz#b962dfc4ae84361f9f08fbce411b4e4340930eda" - integrity sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw== +"@formatjs/ecma402-abstract@1.11.6": + version "1.11.6" + resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.6.tgz#0e828ddfed6fb3413ae379e48fb7170fb0795db5" + integrity sha512-6TcI+IroIK+GTWXBJ643LBJklmCBsqLt1sUTGWfzdBcI5Y6b1L1iamrJB1B5OAQLnhzWveLbmzPYHYsFEZfeig== dependencies: - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/fast-memoize@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz#e6f5aee2e4fd0ca5edba6eba7668e2d855e0fc21" - integrity sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg== +"@formatjs/fast-memoize@1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-1.2.3.tgz#5c950bd64c4959e30bbd16b22a17040fbeb9c4d2" + integrity sha512-RVI3e4M7mIxAhKbbyS78H8++fsoiSRZgxh0zReHfvV6p1cpfgG2/k2qJYhJq0RXh6orVtUEsQ3xK9i4tDfsOSg== dependencies: - tslib "^2.1.0" + tslib "2.4.0" -"@formatjs/icu-messageformat-parser@2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz#a54293dd7f098d6a6f6a084ab08b6d54a3e8c12d" - integrity sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw== +"@formatjs/icu-messageformat-parser@2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.2.tgz#9ff4dfc4f1ed613cca2c188b29f299854b86b7f8" + integrity sha512-FYQ2pkgbDJxJlst/U5MU2H7+bR9HrZ4x8J4c0etrya24pJzQxYguVlAhc2S6NoEImlQ2LmIIGsURaBQu9bCtew== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/icu-skeleton-parser" "1.3.6" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/icu-skeleton-parser" "1.3.8" + tslib "2.4.0" -"@formatjs/icu-skeleton-parser@1.3.6": - version "1.3.6" - resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz#4ce8c0737d6f07b735288177049e97acbf2e8964" - integrity sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg== +"@formatjs/icu-skeleton-parser@1.3.8": + version "1.3.8" + resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.8.tgz#3d150fcb45b4867c1db84237ca1f1f701d598918" + integrity sha512-CVdsPMs/KvrIDKhMDw8bSq/Zst2bhdn/bTUfVCHi/c/bj462lChIJmW/JP/FaGKgZzdG8slGyVIFLonpG4uqFA== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + tslib "2.4.0" -"@formatjs/intl-datetimeformat@^5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-5.0.2.tgz#11bf5814416c03f544e0b118789fb1497b815566" - integrity sha512-yk7CItBMgtUsub123+iqOfXoqG6JHJIl3Pke7eOYb7QFAPsOZliAJb2i0+Tr1FXWcm1PdWZVHEv6C2l4nEmQdw== +"@formatjs/intl-datetimeformat@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-datetimeformat/-/intl-datetimeformat-6.0.1.tgz#cd107a2d3f85dd8e8103fc967e40618f65c7c8ad" + integrity sha512-j/cDALY35GENMBEvcTUaRO97VCZn8CaocbNl7WLIl2HC9jdcdnMeVTY38dYLM6lfSoarIiNAWRE3oTQKOh086g== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/intl-displaynames@5.4.3": - version "5.4.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz#e468586694350c722c7efab1a31fcde68aeaed8b" - integrity sha512-4r12A3mS5dp5hnSaQCWBuBNfi9Amgx2dzhU4lTFfhSxgb5DOAiAbMpg6+7gpWZgl4ahsj3l2r/iHIjdmdXOE2Q== +"@formatjs/intl-displaynames@6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.0.1.tgz#b4bf890d440a19da03203a5e7f1bff1460b2b859" + integrity sha512-KPfB+mOIzcptAzpNIciDc+rK4kRCg5aTCXPr5feIWNxvd/H1Wr3cVVDV2YGdPn+Woo9b1K4cnUi3b1IvBFQ/5g== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/intl-getcanonicallocales@1.9.2", "@formatjs/intl-getcanonicallocales@^1.9.2": - version "1.9.2" - resolved "https://registry.yarnpkg.com/@formatjs/intl-getcanonicallocales/-/intl-getcanonicallocales-1.9.2.tgz#5aab5f6ac2d923933538085eec20a19c393b6ebf" - integrity sha512-69WTStIJI2ikErOU1Il4NQKLVV8f2x6awr7+/dZz0uihuI7uQRcZtI6k/BBt4EtYaEl6w65YjUF93VuE015C0w== +"@formatjs/intl-getcanonicallocales@2.0.1", "@formatjs/intl-getcanonicallocales@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-getcanonicallocales/-/intl-getcanonicallocales-2.0.1.tgz#da2b7749a99d4347e2dacef103e3044eed3ef915" + integrity sha512-MDbYGYdBdhxNBNm5trIhYZWRu2yC6Le+2IQ0bzus7sY7AEHswz0TcyekfYywiV3QF4E7x0YtJDIKTi6oH14NRg== dependencies: - tslib "^2.1.0" + tslib "2.4.0" -"@formatjs/intl-listformat@6.5.3": - version "6.5.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-6.5.3.tgz#f29da613a8062dc3e4e3d847ba890c3ea745f051" - integrity sha512-ozpz515F/+3CU+HnLi5DYPsLa6JoCfBggBSSg/8nOB5LYSFW9+ZgNQJxJ8tdhKYeODT+4qVHX27EeJLoxLGLNg== +"@formatjs/intl-listformat@7.0.1": + version "7.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.0.1.tgz#9b7f0d46a6eb04138dde5d57c898222315f87334" + integrity sha512-sgE4B9+mu3ZF77vhZB0tR8O3evvcPA//WbA/8UJ21XOrSzfY6RXhSbvDfSd7Y5iEeBu+2C+5YxDuAwLnvq2SnQ== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/intl-locale@^2.4.47": - version "2.4.47" - resolved "https://registry.yarnpkg.com/@formatjs/intl-locale/-/intl-locale-2.4.47.tgz#7bf66960e55e7dfa77fcc7c02ee06aea29f92eb6" - integrity sha512-yEpjx6RgVVG3pPsxb/jydhnq/A02KmjMste5U/wWxscRK0sny8LPIoBwgkOQycRoMRLNlLemJaQB7VbHZJ9OVg== +"@formatjs/intl-locale@^3.0.1": + version "3.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-locale/-/intl-locale-3.0.1.tgz#ec6eb1d989b4ccb4f3669a03ac84c087dc686398" + integrity sha512-z3WXS9SxHUBi6JqvWgEPCvlSZF2Hw6jj272J/YqIVqBahViReUHjj3/2kVsTBndTe2HVkkaxURJNE+yd1MFqFw== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-getcanonicallocales" "1.9.2" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-getcanonicallocales" "2.0.1" + tslib "2.4.0" -"@formatjs/intl-localematcher@0.2.25": - version "0.2.25" - resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz#60892fe1b271ec35ba07a2eb018a2dd7bca6ea3a" - integrity sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA== +"@formatjs/intl-localematcher@0.2.27": + version "0.2.27" + resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.2.27.tgz#8a837ddca17a55d86e4ab68bcbb25b15f547d61d" + integrity sha512-XHYcVas2ebDTh3VtfdluvbTjqyMUHqFHARnuJo5KYF/0MKOTmozVSK7PJGnu1IEHdmRdTWuG6TB+2RnkasaxVw== dependencies: - tslib "^2.1.0" + tslib "2.4.0" -"@formatjs/intl-numberformat@^7.4.3": - version "7.4.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-7.4.3.tgz#dbf15fb6c8341088f1d526cf24d54f5388b478d1" - integrity sha512-oxhLCw00YO7brwMPqGD+ui5gdeWoMiRhqsRSqwsDSRd03aJ/N3/VZQDoxGIn3IM9bhlPM5W0ckXiXuOMFLszjw== +"@formatjs/intl-numberformat@^8.0.1": + version "8.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-numberformat/-/intl-numberformat-8.0.1.tgz#f5a9269480c869c3ec35c4689074c32ae6240a10" + integrity sha512-g0ce2KBbYFhbArsduHBB/QsGw4iVLEhbIYOT6Ra44/iEMGQ1aFLvSKiGYZatCZF7CgK0DTwmZ1RFy7vrs7w24w== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/intl-pluralrules@^4.3.3": - version "4.3.3" - resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-4.3.3.tgz#9dc5a96175d89c8887f003eacef457a1f3003caf" - integrity sha512-NLZN8gf2qLpCuc0m565IbKLNUarEGOzk0mkdTkE4XTuNCofzoQTurW6lL3fmDlneAoYl2FiTdHa5q4o2vZF50g== +"@formatjs/intl-pluralrules@^5.0.1": + version "5.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-5.0.1.tgz#23bce3c680791e25dec066c358d7aad81376cff7" + integrity sha512-YOgsZ4t2rrlfT53BC4AtxOrmG5i4yp75L/9HJOcH7leheqAT2AWc8GzimwGCXXzaHqrne5p4uhx4ikfzTyLbpw== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/intl-relativetimeformat@^10.0.1": - version "10.0.1" - resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-10.0.1.tgz#ed5e3df104a97e3ac6386ea7e5e34adb54ac8e74" - integrity sha512-AABPQtPjFilXegQsnmVHrSlzjFNUffAEk5DgowY6b7WSwDI7g2W6QgW903/lbZ58emhphAbgHdtKeUBXqTiLpw== +"@formatjs/intl-relativetimeformat@^11.0.1": + version "11.0.1" + resolved "https://registry.yarnpkg.com/@formatjs/intl-relativetimeformat/-/intl-relativetimeformat-11.0.1.tgz#4257938077881d069d134410971596ddb0045b27" + integrity sha512-+R7CReF9mgoCblWLsO6RPRCN47VLhi8TaK6yNL5bH7aQXcNk8m/4UZjz7taUVXBoJmqfxqzIh5pa8n9V+JtNgg== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/intl-localematcher" "0.2.25" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/intl-localematcher" "0.2.27" + tslib "2.4.0" -"@formatjs/intl@2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.2.1.tgz#6daf4dabed055b17f467f0aa1bc073a626bc9189" - integrity sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA== +"@formatjs/intl@2.2.5": + version "2.2.5" + resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.2.5.tgz#888f42750eacdcfb836a062eb889cb429d13f7f7" + integrity sha512-b0+5Bjsl3KDAII2frBPRO7ck9Ec/xqZ25BoiJATJhe//e4n6FOvVXk5QKYwBQPDt3JPu/Qa14oqHDiZlZmVdSg== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/fast-memoize" "1.2.1" - "@formatjs/icu-messageformat-parser" "2.1.0" - "@formatjs/intl-displaynames" "5.4.3" - "@formatjs/intl-listformat" "6.5.3" - intl-messageformat "9.13.0" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/fast-memoize" "1.2.3" + "@formatjs/icu-messageformat-parser" "2.1.2" + "@formatjs/intl-displaynames" "6.0.1" + "@formatjs/intl-listformat" "7.0.1" + intl-messageformat "10.0.1" + tslib "2.4.0" "@gar/promisify@^1.0.1": version "1.1.3" @@ -1839,6 +1988,15 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9" + integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" @@ -1862,6 +2020,14 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.13" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea" + integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@neverdull-agency/expo-unlimited-secure-store@1.0.10": version "1.0.10" resolved "https://registry.yarnpkg.com/@neverdull-agency/expo-unlimited-secure-store/-/expo-unlimited-secure-store-1.0.10.tgz#1e78b502257b267fc918a85eaa41aa01a46d2007" @@ -2178,10 +2344,10 @@ color "^3.1.3" warn-once "^0.1.0" -"@reduxjs/toolkit@1.8.1": - version "1.8.1" - resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.8.1.tgz#94ee1981b8cf9227cda40163a04704a9544c9a9f" - integrity sha512-Q6mzbTpO9nOYRnkwpDlFOAbQnd3g7zj7CtHAZWz5SzE5lcV97Tf8f3SzOO8BoPOMYBFgfZaqTUZqgGu+a0+Fng== +"@reduxjs/toolkit@1.8.2": + version "1.8.2" + resolved "https://registry.yarnpkg.com/@reduxjs/toolkit/-/toolkit-1.8.2.tgz#352fd17bc858af51d21ce8d28183a930cab9e638" + integrity sha512-CtPw5TkN1pHRigMFCOS/0qg3b/yfPV5qGCsltVnIz7bx4PKTJlGHYfIxm97qskLknMzuGfjExaYdXJ77QTL0vg== dependencies: immer "^9.0.7" redux "^4.1.2" @@ -2539,10 +2705,10 @@ resolved "https://registry.yarnpkg.com/@types/react-native-share-menu/-/react-native-share-menu-5.0.2.tgz#c9c8854a3d091cdb046df22dafe4a92332b322f3" integrity sha512-Qa9DGfL6Bvng2DXgCK0fFzdi9SJMGfs06MLSkCfSXBCGKlFLzSHCsXztvXlCCChn3dQArFHyz/uRUN3Sbt6LtQ== -"@types/react-native@0.67.6": - version "0.67.6" - resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.6.tgz#9a7de5feba6065aec9f44f9a1e8f6e55ee5d015c" - integrity sha512-NM6atxrefIXMLE/PyQ1bIQjQ/lWLdls3uVxItzKvNUUVZlGqgn/uGN4MarM9quSf90uSqJYPIAeAgTtBTUjhgg== +"@types/react-native@0.67.7": + version "0.67.7" + resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.67.7.tgz#903b7d56fb6a95ca0de897f2925c04ee0d4adee3" + integrity sha512-G7vi9vE226diNNXVNbIa8HH/wPxMWHTHkn9iQtQSezaWzO5WNsKZZW2/TOzCehtBDVx4MZieTs6GsdtpBBttMA== dependencies: "@types/react" "*" @@ -5066,10 +5232,10 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -i18next@21.8.2: - version "21.8.2" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.8.2.tgz#b2d9fd7feafc1a9929651c24a5c17ba703552bbc" - integrity sha512-H/oQvA/OXcqurXHemlyDwdIzr9GHYg5/xBuDeFXTXJGMOJFH0ke1wgbsDjFFk2noD4cJfzicVPpUtp39Z+OzgQ== +i18next@21.8.4: + version "21.8.4" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.8.4.tgz#646e23065752036b38d9fda8898c18139b9e8ebe" + integrity sha512-b3LQ5n9V1juu8UItb5x1QTI4OTvNqsNs/wetwQlBvfijEqks+N5HKMKSoevf8w0/RGUrDQ7g4cvVzF8WBp9pUw== dependencies: "@babel/runtime" "^7.17.2" @@ -5187,15 +5353,15 @@ internal-slot@^1.0.3: has "^1.0.3" side-channel "^1.0.4" -intl-messageformat@9.13.0: - version "9.13.0" - resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-9.13.0.tgz#97360b73bd82212e4f6005c712a4a16053165468" - integrity sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw== +intl-messageformat@10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.0.1.tgz#dae7ae81a477e92ea8691dd73c60d5eb5003f866" + integrity sha512-oZWDsNbauuWmPd98+zLEfNojuJkBdVpEWIcWQVCTxSJrhag2/czZnwKBsYa8NcVf4t0fWo0k77v+CBCudKEcjw== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/fast-memoize" "1.2.1" - "@formatjs/icu-messageformat-parser" "2.1.0" - tslib "^2.1.0" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/fast-memoize" "1.2.3" + "@formatjs/icu-messageformat-parser" "2.1.2" + tslib "2.4.0" invariant@*, invariant@^2.2.4: version "2.2.4" @@ -7230,21 +7396,21 @@ react-i18next@11.16.9: html-escaper "^2.0.2" html-parse-stringify "^3.0.1" -react-intl@^5.25.1: - version "5.25.1" - resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-5.25.1.tgz#68a73aefc485c9bf70062381ae7f6f4791680879" - integrity sha512-pkjdQDvpJROoXLMltkP/5mZb0/XqrqLoPGKUCfbdkP8m6U9xbK40K51Wu+a4aQqTEvEK5lHBk0fWzUV72SJ3Hg== +react-intl@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.0.3.tgz#eb5857f2fd525c83255bf6c8339562a7fea9f970" + integrity sha512-c6wHOnYjOBTbqIt+6TVV2QwdKrqYiFP713tMsw/sJWYgzfaRTjsvGkcxOXhX3SoBrqbUhKTEzjdniuwpAN/qKA== dependencies: - "@formatjs/ecma402-abstract" "1.11.4" - "@formatjs/icu-messageformat-parser" "2.1.0" - "@formatjs/intl" "2.2.1" - "@formatjs/intl-displaynames" "5.4.3" - "@formatjs/intl-listformat" "6.5.3" + "@formatjs/ecma402-abstract" "1.11.6" + "@formatjs/icu-messageformat-parser" "2.1.2" + "@formatjs/intl" "2.2.5" + "@formatjs/intl-displaynames" "6.0.1" + "@formatjs/intl-listformat" "7.0.1" "@types/hoist-non-react-statics" "^3.3.1" "@types/react" "16 || 17 || 18" hoist-non-react-statics "^3.3.2" - intl-messageformat "9.13.0" - tslib "^2.1.0" + intl-messageformat "10.0.1" + tslib "2.4.0" "react-is@^16.12.0 || ^17.0.0", react-is@^17.0.1: version "17.0.2" @@ -7444,10 +7610,10 @@ react-query@3.39.0: broadcast-channel "^3.4.1" match-sorter "^6.0.2" -react-redux@8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.0.1.tgz#2bc029f5ada9b443107914c373a2750f6bc0f40c" - integrity sha512-LMZMsPY4DYdZfLJgd7i79n5Kps5N9XVLCJJeWAaPYTV+Eah2zTuBjTxKtNEbjiyitbq80/eIkm55CYSLqAub3w== +react-redux@8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.0.2.tgz#bc2a304bb21e79c6808e3e47c50fe1caf62f7aad" + integrity sha512-nBwiscMw3NoP59NFCXFf02f8xdo+vSHT/uZ1ldDwF7XaTpzm+Phk97VT4urYBl5TYAPNVaFm12UHAEyzkpNzRA== dependencies: "@babel/runtime" "^7.12.1" "@types/hoist-non-react-statics" "^3.3.1" @@ -8573,10 +8739,10 @@ typedarray-to-buffer@^3.1.2: dependencies: is-typedarray "^1.0.0" -typescript@4.6.4: - version "4.6.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4" + integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A== ua-parser-js@^0.7.19, ua-parser-js@^0.7.30: version "0.7.31" From 4398e520ed6c777b40957e6178acde268c4b0daf Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 28 May 2022 19:24:08 +0200 Subject: [PATCH 035/112] Refine notifications https://github.com/tooot-app/app/issues/306 https://github.com/tooot-app/app/issues/305 This one uses the positive filtering that is added since v3.5, that a such a filter won't be shown as there is no way to check if a user is an admin or not and showing a useless option for majority users won't be a good experience. --- src/@types/mastodon.d.ts | 1 + src/components/Instance/Auth.tsx | 5 +- src/components/Timeline/Shared/Actioned.tsx | 30 ++++--- src/helpers/features.json | 15 ++++ src/i18n/en/components/timeline.json | 3 +- src/i18n/en/screens/actions.json | 4 +- src/screens/Actions/NotificationsFilter.tsx | 56 +++++++++---- src/screens/Tabs/Me/Switch.tsx | 9 +-- src/startup/sentry.ts | 3 +- src/store.ts | 2 +- src/utils/initQuery.ts | 5 +- src/utils/migrations/instances/migration.ts | 17 ++++ src/utils/migrations/instances/v10.ts | 81 +++++++++++++++++++ src/utils/push/useConnect.ts | 5 +- src/utils/push/useReceive.ts | 4 +- src/utils/push/useRespond.ts | 4 +- src/utils/queryHooks/timeline.ts | 25 ++++-- src/utils/slices/instances/add.ts | 14 ++-- src/utils/slices/instances/push/register.ts | 5 +- src/utils/slices/instances/remove.ts | 4 +- src/utils/slices/instances/updatePush.ts | 4 +- src/utils/slices/instances/updatePushAlert.ts | 8 +- .../slices/instances/updatePushDecode.ts | 5 +- src/utils/slices/instancesSlice.ts | 31 ++++--- 24 files changed, 254 insertions(+), 86 deletions(-) create mode 100644 src/utils/migrations/instances/v10.ts diff --git a/src/@types/mastodon.d.ts b/src/@types/mastodon.d.ts index 2e1663f7..1a62f519 100644 --- a/src/@types/mastodon.d.ts +++ b/src/@types/mastodon.d.ts @@ -341,6 +341,7 @@ declare namespace Mastodon { | 'favourite' | 'poll' | 'status' + | 'update' created_at: string account: Account diff --git a/src/components/Instance/Auth.tsx b/src/components/Instance/Auth.tsx index 2418bb49..16af0428 100644 --- a/src/components/Instance/Auth.tsx +++ b/src/components/Instance/Auth.tsx @@ -1,8 +1,9 @@ import { useNavigation } from '@react-navigation/native' import { useAppDispatch } from '@root/store' +import { InstanceLatest } from '@utils/migrations/instances/migration' import { TabMeStackNavigationProp } from '@utils/navigation/navigators' import addInstance from '@utils/slices/instances/add' -import { checkInstanceFeature, Instance } from '@utils/slices/instancesSlice' +import { checkInstanceFeature } from '@utils/slices/instancesSlice' import * as AuthSession from 'expo-auth-session' import React, { useEffect } from 'react' import { useQueryClient } from 'react-query' @@ -12,7 +13,7 @@ export interface Props { instanceDomain: string // Domain can be different than uri instance: Mastodon.Instance - appData: Instance['appData'] + appData: InstanceLatest['appData'] goBack?: boolean } diff --git a/src/components/Timeline/Shared/Actioned.tsx b/src/components/Timeline/Shared/Actioned.tsx index 9b600d2f..0ff986e3 100644 --- a/src/components/Timeline/Shared/Actioned.tsx +++ b/src/components/Timeline/Shared/Actioned.tsx @@ -34,7 +34,7 @@ const TimelineActioned = React.memo( navigation.push('Tab-Shared-Account', { account }) }, []) - const children = useMemo(() => { + const children = () => { switch (action) { case 'pinned': return ( @@ -48,7 +48,6 @@ const TimelineActioned = React.memo( {content(t('shared.actioned.pinned'))} ) - break case 'favourite': return ( <> @@ -63,7 +62,6 @@ const TimelineActioned = React.memo( ) - break case 'follow': return ( <> @@ -78,7 +76,6 @@ const TimelineActioned = React.memo( ) - break case 'follow_request': return ( <> @@ -93,7 +90,6 @@ const TimelineActioned = React.memo( ) - break case 'poll': return ( <> @@ -106,7 +102,6 @@ const TimelineActioned = React.memo( {content(t('shared.actioned.poll'))} ) - break case 'reblog': return ( <> @@ -125,7 +120,6 @@ const TimelineActioned = React.memo( ) - break case 'status': return ( <> @@ -140,9 +134,22 @@ const TimelineActioned = React.memo( ) - break + case 'update': + return ( + <> + + {content(t('shared.actioned.update'))} + + ) + default: + return <> } - }, []) + } return ( + > + {children()} + ) }, () => true diff --git a/src/helpers/features.json b/src/helpers/features.json index 73437eec..84241975 100644 --- a/src/helpers/features.json +++ b/src/helpers/features.json @@ -8,5 +8,20 @@ "feature": "deprecate_auth_follow", "version": 3.5, "reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0" + }, + { + "feature": "notification_type_status", + "version": 3.3, + "reference": "https://docs.joinmastodon.org/entities/notification/#required-attributes" + }, + { + "feature": "notification_type_update", + "version": 3.5, + "reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0" + }, + { + "feature": "notification_types_positive_filter", + "version": 3.5, + "reference": "https://github.com/mastodon/mastodon/releases/tag/v3.5.0" } ] \ No newline at end of file diff --git a/src/i18n/en/components/timeline.json b/src/i18n/en/components/timeline.json index a06addd8..caeb15ed 100644 --- a/src/i18n/en/components/timeline.json +++ b/src/i18n/en/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} boosted", "notification": "{{name}} boosted your toot" - } + }, + "update": "Reblog has been edited" }, "actions": { "reply": { diff --git a/src/i18n/en/screens/actions.json b/src/i18n/en/screens/actions.json index 14a46aaf..f5f2a7c5 100644 --- a/src/i18n/en/screens/actions.json +++ b/src/i18n/en/screens/actions.json @@ -8,11 +8,13 @@ "heading": "Show notification types", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "Follow request", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "Follow request" + "status": "Toot from subscribed users", + "update": "Reblog has been edited" } } } diff --git a/src/screens/Actions/NotificationsFilter.tsx b/src/screens/Actions/NotificationsFilter.tsx index 5bf31102..43f96741 100644 --- a/src/screens/Actions/NotificationsFilter.tsx +++ b/src/screens/Actions/NotificationsFilter.tsx @@ -4,6 +4,7 @@ import MenuHeader from '@components/Menu/Header' import MenuRow from '@components/Menu/Row' import { useNavigation } from '@react-navigation/native' import { + checkInstanceFeature, getInstanceNotificationsFilter, updateInstanceNotificationsFilter } from '@utils/slices/instancesSlice' @@ -33,42 +34,63 @@ const ActionsNotificationsFilter: React.FC = () => { return null } + const hasTypeStatus = useSelector( + checkInstanceFeature('notification_type_status') + ) + const hasTypeUpdate = useSelector( + checkInstanceFeature('notification_type_update') + ) const options = useMemo(() => { return ( instanceNotificationsFilter && ( [ 'follow', + 'follow_request', 'favourite', 'reblog', 'mention', 'poll', - 'follow_request' + 'status', + 'update' ] as [ 'follow', + 'follow_request', 'favourite', 'reblog', 'mention', 'poll', - 'follow_request' + 'status', + 'update' ] - ).map(type => ( - - dispatch( - updateInstanceNotificationsFilter({ - ...instanceNotificationsFilter, - [type]: !instanceNotificationsFilter[type] - }) - ) + ) + .filter(type => { + switch (type) { + case 'status': + return hasTypeStatus + case 'update': + return hasTypeUpdate + default: + return true } - /> - )) + }) + .map(type => ( + + dispatch( + updateInstanceNotificationsFilter({ + ...instanceNotificationsFilter, + [type]: !instanceNotificationsFilter[type] + }) + ) + } + /> + )) ) - }, [instanceNotificationsFilter]) + }, [instanceNotificationsFilter, hasTypeStatus, hasTypeUpdate]) return ( <> diff --git a/src/screens/Tabs/Me/Switch.tsx b/src/screens/Tabs/Me/Switch.tsx index 8df269a6..b345ff98 100644 --- a/src/screens/Tabs/Me/Switch.tsx +++ b/src/screens/Tabs/Me/Switch.tsx @@ -5,11 +5,8 @@ import ComponentInstance from '@components/Instance' import CustomText from '@components/Text' import { useNavigation } from '@react-navigation/native' import initQuery from '@utils/initQuery' -import { - getInstanceActive, - getInstances, - Instance -} from '@utils/slices/instancesSlice' +import { InstanceLatest } from '@utils/migrations/instances/migration' +import { getInstanceActive, getInstances } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' import React, { useEffect, useRef } from 'react' @@ -19,7 +16,7 @@ import { ScrollView } from 'react-native-gesture-handler' import { useSelector } from 'react-redux' interface Props { - instance: Instance + instance: InstanceLatest selected?: boolean } diff --git a/src/startup/sentry.ts b/src/startup/sentry.ts index 7d398c66..52e543e8 100644 --- a/src/startup/sentry.ts +++ b/src/startup/sentry.ts @@ -1,4 +1,3 @@ -import { isRelease } from '@utils/checkEnvironment' import * as Sentry from 'sentry-expo' import log from './log' @@ -7,7 +6,7 @@ const sentry = () => { Sentry.init({ dsn: 'https://53348b60ff844d52886e90251b3a5f41@o917354.ingest.sentry.io/6410576', enableInExpoDevelopment: false, - debug: !isRelease, + // debug: !isRelease, autoSessionTracking: true }) } diff --git a/src/store.ts b/src/store.ts index 8e6e9e04..81a06675 100644 --- a/src/store.ts +++ b/src/store.ts @@ -39,7 +39,7 @@ const instancesPersistConfig = { key: 'instances', prefix, storage: Platform.OS === 'ios' ? secureStorage : AsyncStorage, - version: 9, + version: 10, // @ts-ignore migrate: createMigrate(instancesMigration) } diff --git a/src/utils/initQuery.ts b/src/utils/initQuery.ts index 22ea7bfb..f51dcba0 100644 --- a/src/utils/initQuery.ts +++ b/src/utils/initQuery.ts @@ -1,13 +1,14 @@ import queryClient from '@helpers/queryClient' import { store } from '@root/store' +import { InstanceLatest } from './migrations/instances/migration' // import { prefetchTimelineQuery } from './queryHooks/timeline' -import { Instance, updateInstanceActive } from './slices/instancesSlice' +import { updateInstanceActive } from './slices/instancesSlice' const initQuery = async ({ instance, prefetch }: { - instance: Instance + instance: InstanceLatest prefetch?: { enabled: boolean; page?: 'Following' | 'LocalPublic' } }) => { store.dispatch(updateInstanceActive(instance)) diff --git a/src/utils/migrations/instances/migration.ts b/src/utils/migrations/instances/migration.ts index f7079c88..eadcf4d4 100644 --- a/src/utils/migrations/instances/migration.ts +++ b/src/utils/migrations/instances/migration.ts @@ -5,6 +5,7 @@ import { InstanceV6 } from './v6' import { InstanceV7 } from './v7' import { InstanceV8 } from './v8' import { InstanceV9 } from './v9' +import { InstanceV10 } from './v10' const instancesMigration = { 4: (state: InstanceV3): InstanceV4 => { @@ -99,7 +100,23 @@ const instancesMigration = { } }) } + }, + 10: (state: { instances: InstanceV9[] }): { instances: InstanceV10[] } => { + return { + instances: state.instances.map(instance => { + return { + ...instance, + notifications_filter: { + ...instance.notifications_filter, + status: true, + update: true + } + } + }) + } } } +export { InstanceV10 as InstanceLatest } + export default instancesMigration diff --git a/src/utils/migrations/instances/v10.ts b/src/utils/migrations/instances/v10.ts new file mode 100644 index 00000000..6257a75f --- /dev/null +++ b/src/utils/migrations/instances/v10.ts @@ -0,0 +1,81 @@ +import { ComposeStateDraft } from '@screens/Compose/utils/types' +import { QueryKeyTimeline } from '@utils/queryHooks/timeline' + +export type InstanceV10 = { + active: boolean + appData: { + clientId: string + clientSecret: string + } + url: string + token: string + uri: Mastodon.Instance['uri'] + urls: Mastodon.Instance['urls'] + account: { + id: Mastodon.Account['id'] + acct: Mastodon.Account['acct'] + avatarStatic: Mastodon.Account['avatar_static'] + preferences: Mastodon.Preferences + } + version: string + configuration?: Mastodon.Instance['configuration'] + filters: Mastodon.Filter[] + notifications_filter: { + follow: boolean + follow_request: boolean + favourite: boolean + reblog: boolean + mention: boolean + poll: boolean + status: boolean + update: boolean + } + push: { + global: { loading: boolean; value: boolean } + decode: { loading: boolean; value: boolean } + alerts: { + follow: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['follow'] + } + favourite: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['favourite'] + } + reblog: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['reblog'] + } + mention: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['mention'] + } + poll: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['poll'] + } + } + keys: { + auth?: string + public?: string // legacy + private?: string // legacy + } + } + timelinesLookback?: { + [key: string]: { + queryKey: QueryKeyTimeline + ids: Mastodon.Status['id'][] + } + } + mePage: { + lists: { shown: boolean } + announcements: { shown: boolean; unread: number } + } + drafts: ComposeStateDraft[] + frequentEmojis: { + emoji: Pick + score: number + count: number + lastUsed: number + }[] +} diff --git a/src/utils/push/useConnect.ts b/src/utils/push/useConnect.ts index 84174ea4..6096f4a9 100644 --- a/src/utils/push/useConnect.ts +++ b/src/utils/push/useConnect.ts @@ -4,7 +4,8 @@ import { displayMessage } from '@components/Message' import navigationRef from '@helpers/navigationRef' import { useAppDispatch } from '@root/store' import { isDevelopment } from '@utils/checkEnvironment' -import { disableAllPushes, Instance } from '@utils/slices/instancesSlice' +import { InstanceLatest } from '@utils/migrations/instances/migration' +import { disableAllPushes } from '@utils/slices/instancesSlice' import { useTheme } from '@utils/styles/ThemeManager' import * as Notifications from 'expo-notifications' import { useEffect } from 'react' @@ -12,7 +13,7 @@ import { TFunction } from 'react-i18next' export interface Params { t: TFunction<'screens'> - instances: Instance[] + instances: InstanceLatest[] } const pushUseConnect = ({ t, instances }: Params) => { diff --git a/src/utils/push/useReceive.ts b/src/utils/push/useReceive.ts index b5997966..692b9231 100644 --- a/src/utils/push/useReceive.ts +++ b/src/utils/push/useReceive.ts @@ -1,14 +1,14 @@ import { displayMessage } from '@components/Message' import queryClient from '@helpers/queryClient' import initQuery from '@utils/initQuery' +import { InstanceLatest } from '@utils/migrations/instances/migration' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' -import { Instance } from '@utils/slices/instancesSlice' import * as Notifications from 'expo-notifications' import { useEffect } from 'react' import pushUseNavigate from './useNavigate' export interface Params { - instances: Instance[] + instances: InstanceLatest[] } const pushUseReceive = ({ instances }: Params) => { diff --git a/src/utils/push/useRespond.ts b/src/utils/push/useRespond.ts index 8121029a..325ee4b2 100644 --- a/src/utils/push/useRespond.ts +++ b/src/utils/push/useRespond.ts @@ -1,13 +1,13 @@ import queryClient from '@helpers/queryClient' import initQuery from '@utils/initQuery' +import { InstanceLatest } from '@utils/migrations/instances/migration' import { QueryKeyTimeline } from '@utils/queryHooks/timeline' -import { Instance } from '@utils/slices/instancesSlice' import * as Notifications from 'expo-notifications' import { useEffect } from 'react' import pushUseNavigate from './useNavigate' export interface Params { - instances: Instance[] + instances: InstanceLatest[] } const pushUseRespond = ({ instances }: Params) => { diff --git a/src/utils/queryHooks/timeline.ts b/src/utils/queryHooks/timeline.ts index b2956faa..1c4b28bb 100644 --- a/src/utils/queryHooks/timeline.ts +++ b/src/utils/queryHooks/timeline.ts @@ -2,7 +2,10 @@ import apiInstance, { InstanceResponse } from '@api/instance' import haptics from '@components/haptics' import queryClient from '@helpers/queryClient' import { store } from '@root/store' -import { getInstanceNotificationsFilter } from '@utils/slices/instancesSlice' +import { + checkInstanceFeature, + getInstanceNotificationsFilter +} from '@utils/slices/instancesSlice' import { AxiosError } from 'axios' import { uniqBy } from 'lodash' import { @@ -62,16 +65,26 @@ const queryFunction = async ({ case 'Notifications': const rootStore = store.getState() const notificationsFilter = getInstanceNotificationsFilter(rootStore) + const usePositiveFilter = checkInstanceFeature( + 'notification_types_positive_filter' + )(rootStore) return apiInstance({ method: 'get', url: 'notifications', params: { ...params, - ...(notificationsFilter && { - exclude_types: Object.keys(notificationsFilter) - // @ts-ignore - .filter(filter => notificationsFilter[filter] === false) - }) + ...(notificationsFilter && + (usePositiveFilter + ? { + types: Object.keys(notificationsFilter) + // @ts-ignore + .filter(filter => notificationsFilter[filter] === true) + } + : { + exclude_types: Object.keys(notificationsFilter) + // @ts-ignore + .filter(filter => notificationsFilter[filter] === false) + })) } }) diff --git a/src/utils/slices/instances/add.ts b/src/utils/slices/instances/add.ts index 5b5b95e0..1f19bd34 100644 --- a/src/utils/slices/instances/add.ts +++ b/src/utils/slices/instances/add.ts @@ -1,7 +1,7 @@ import apiGeneral from '@api/general' import { createAsyncThunk } from '@reduxjs/toolkit' import { RootState } from '@root/store' -import { Instance } from '../instancesSlice' +import { InstanceLatest } from '@utils/migrations/instances/migration' const addInstance = createAsyncThunk( 'instances/add', @@ -11,11 +11,11 @@ const addInstance = createAsyncThunk( instance, appData }: { - domain: Instance['url'] - token: Instance['token'] + domain: InstanceLatest['url'] + token: InstanceLatest['token'] instance: Mastodon.Instance - appData: Instance['appData'] - }): Promise<{ type: 'add' | 'overwrite'; data: Instance }> => { + appData: InstanceLatest['appData'] + }): Promise<{ type: 'add' | 'overwrite'; data: InstanceLatest }> => { const { store } = require('@root/store') const instances = (store.getState() as RootState).instances.instances @@ -81,11 +81,13 @@ const addInstance = createAsyncThunk( filters, notifications_filter: { follow: true, + follow_request: true, favourite: true, reblog: true, mention: true, poll: true, - follow_request: true + status: true, + update: true }, push: { global: { loading: false, value: false }, diff --git a/src/utils/slices/instances/push/register.ts b/src/utils/slices/instances/push/register.ts index 0db6ef44..ff43c968 100644 --- a/src/utils/slices/instances/push/register.ts +++ b/src/utils/slices/instances/push/register.ts @@ -2,7 +2,8 @@ import apiInstance from '@api/instance' import apiTooot, { TOOOT_API_DOMAIN } from '@api/tooot' import i18n from '@root/i18n/i18n' import { RootState } from '@root/store' -import { getInstance, Instance } from '@utils/slices/instancesSlice' +import { InstanceLatest } from '@utils/migrations/instances/migration' +import { getInstance } from '@utils/slices/instancesSlice' import * as Notifications from 'expo-notifications' import * as Random from 'expo-random' import { Platform } from 'react-native' @@ -34,7 +35,7 @@ const subscribe = async ({ const pushRegister = async ( state: RootState, expoToken: string -): Promise => { +): Promise => { const instance = getInstance(state) const instanceUrl = instance?.url const instanceUri = instance?.uri diff --git a/src/utils/slices/instances/remove.ts b/src/utils/slices/instances/remove.ts index 1794b1c9..053971c7 100644 --- a/src/utils/slices/instances/remove.ts +++ b/src/utils/slices/instances/remove.ts @@ -1,11 +1,11 @@ import { createAsyncThunk } from '@reduxjs/toolkit' +import { InstanceLatest } from '@utils/migrations/instances/migration' import * as AuthSession from 'expo-auth-session' -import { Instance } from '../instancesSlice' import { updateInstancePush } from './updatePush' const removeInstance = createAsyncThunk( 'instances/remove', - async (instance: Instance, { dispatch }): Promise => { + async (instance: InstanceLatest, { dispatch }): Promise => { if (instance.push.global.value) { dispatch(updateInstancePush(false)) } diff --git a/src/utils/slices/instances/updatePush.ts b/src/utils/slices/instances/updatePush.ts index a477a100..9d11c546 100644 --- a/src/utils/slices/instances/updatePush.ts +++ b/src/utils/slices/instances/updatePush.ts @@ -1,8 +1,8 @@ import { createAsyncThunk } from '@reduxjs/toolkit' import { RootState } from '@root/store' import { isDevelopment } from '@utils/checkEnvironment' +import { InstanceLatest } from '@utils/migrations/instances/migration' import * as Notifications from 'expo-notifications' -import { Instance } from '../instancesSlice' import pushRegister from './push/register' import pushUnregister from './push/unregister' @@ -11,7 +11,7 @@ export const updateInstancePush = createAsyncThunk( async ( disable: boolean, { getState } - ): Promise => { + ): Promise => { const state = getState() as RootState const expoToken = isDevelopment ? 'DEVELOPMENT_TOKEN_1' diff --git a/src/utils/slices/instances/updatePushAlert.ts b/src/utils/slices/instances/updatePushAlert.ts index 7d583448..1bbe3b49 100644 --- a/src/utils/slices/instances/updatePushAlert.ts +++ b/src/utils/slices/instances/updatePushAlert.ts @@ -1,15 +1,15 @@ import apiInstance from '@api/instance' import { createAsyncThunk } from '@reduxjs/toolkit' -import { Instance } from '../instancesSlice' +import { InstanceLatest } from '@utils/migrations/instances/migration' export const updateInstancePushAlert = createAsyncThunk( 'instances/updatePushAlert', async ({ alerts }: { - changed: keyof Instance['push']['alerts'] - alerts: Instance['push']['alerts'] - }): Promise => { + changed: keyof InstanceLatest['push']['alerts'] + alerts: InstanceLatest['push']['alerts'] + }): Promise => { const formData = new FormData() Object.keys(alerts).map(alert => // @ts-ignore diff --git a/src/utils/slices/instances/updatePushDecode.ts b/src/utils/slices/instances/updatePushDecode.ts index a0c5b898..3525d170 100644 --- a/src/utils/slices/instances/updatePushDecode.ts +++ b/src/utils/slices/instances/updatePushDecode.ts @@ -3,9 +3,10 @@ import { createAsyncThunk } from '@reduxjs/toolkit' import i18n from '@root/i18n/i18n' import { RootState } from '@root/store' import { isDevelopment } from '@utils/checkEnvironment' +import { InstanceLatest } from '@utils/migrations/instances/migration' import * as Notifications from 'expo-notifications' import { Platform } from 'react-native' -import { getInstance, Instance } from '../instancesSlice' +import { getInstance } from '../instancesSlice' import androidDefaults from './push/androidDefaults' export const updateInstancePushDecode = createAsyncThunk( @@ -13,7 +14,7 @@ export const updateInstancePushDecode = createAsyncThunk( async ( disable: boolean, { getState } - ): Promise<{ disable: Instance['push']['decode']['value'] }> => { + ): Promise<{ disable: InstanceLatest['push']['decode']['value'] }> => { const state = getState() as RootState const instance = getInstance(state) if (!instance?.url || !instance.account.id || !instance.push.keys) { diff --git a/src/utils/slices/instancesSlice.ts b/src/utils/slices/instancesSlice.ts index 85210dff..fd9d845e 100644 --- a/src/utils/slices/instancesSlice.ts +++ b/src/utils/slices/instancesSlice.ts @@ -3,7 +3,7 @@ import features from '@helpers/features' import { createSlice, PayloadAction } from '@reduxjs/toolkit' import { RootState } from '@root/store' import { ComposeStateDraft } from '@screens/Compose/utils/types' -import { InstanceV9 } from '@utils/migrations/instances/v9' +import { InstanceLatest } from '@utils/migrations/instances/migration' import addInstance from './instances/add' import { checkEmojis } from './instances/checkEmojis' import removeInstance from './instances/remove' @@ -14,24 +14,25 @@ import { updateInstancePush } from './instances/updatePush' import { updateInstancePushAlert } from './instances/updatePushAlert' import { updateInstancePushDecode } from './instances/updatePushDecode' -export type Instance = InstanceV9 - export type InstancesState = { - instances: Instance[] + instances: InstanceLatest[] } export const instancesInitialState: InstancesState = { instances: [] } -const findInstanceActive = (instances: Instance[]) => +const findInstanceActive = (instances: InstanceLatest[]) => instances.findIndex(instance => instance.active) const instancesSlice = createSlice({ name: 'instances', initialState: instancesInitialState, reducers: { - updateInstanceActive: ({ instances }, action: PayloadAction) => { + updateInstanceActive: ( + { instances }, + action: PayloadAction + ) => { instances = instances.map(instance => { instance.active = instance.url === action.payload.url && @@ -42,7 +43,9 @@ const instancesSlice = createSlice({ }, updateInstanceAccount: ( { instances }, - action: PayloadAction> + action: PayloadAction< + Pick + > ) => { const activeIndex = findInstanceActive(instances) instances[activeIndex].account = { @@ -52,7 +55,7 @@ const instancesSlice = createSlice({ }, updateInstanceNotificationsFilter: ( { instances }, - action: PayloadAction + action: PayloadAction ) => { const activeIndex = findInstanceActive(instances) instances[activeIndex].notifications_filter = action.payload @@ -99,7 +102,7 @@ const instancesSlice = createSlice({ }, updateInstanceTimelineLookback: ( { instances }, - action: PayloadAction + action: PayloadAction ) => { const activeIndex = findInstanceActive(instances) instances[activeIndex] && @@ -110,7 +113,7 @@ const instancesSlice = createSlice({ }, updateInstanceMePage: ( { instances }, - action: PayloadAction> + action: PayloadAction> ) => { const activeIndex = findInstanceActive(instances) instances[activeIndex].mePage = { @@ -120,10 +123,12 @@ const instancesSlice = createSlice({ }, countInstanceEmoji: ( { instances }, - action: PayloadAction + action: PayloadAction ) => { const HALF_LIFE = 60 * 60 * 24 * 7 // 1 week - const calculateScore = (emoji: Instance['frequentEmojis'][0]): number => { + const calculateScore = ( + emoji: InstanceLatest['frequentEmojis'][0] + ): number => { var seconds = (new Date().getTime() - emoji.lastUsed) / 1000 var score = emoji.count + 1 var order = Math.log(Math.max(score, 1)) / Math.LN10 @@ -136,7 +141,7 @@ const instancesSlice = createSlice({ e.emoji.shortcode === action.payload.shortcode && e.emoji.url === action.payload.url ) - let newEmojisSort: Instance['frequentEmojis'] + let newEmojisSort: InstanceLatest['frequentEmojis'] if (foundEmojiIndex > -1) { newEmojisSort = instances[activeIndex].frequentEmojis .map((e, i) => From de82ab7f3248829533c5bfe140233b51671676ea Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:05 +0200 Subject: [PATCH 036/112] New translations timeline.json (German) --- src/i18n/de/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/de/components/timeline.json b/src/i18n/de/components/timeline.json index 78ce6de8..0945c559 100644 --- a/src/i18n/de/components/timeline.json +++ b/src/i18n/de/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} hat geboostet", "notification": "{{name}} hat deinen Tröt geboostet" - } + }, + "update": "" }, "actions": { "reply": { From 1a1fe5e190169b1d1219721d1b0a748bfc3d43a1 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:06 +0200 Subject: [PATCH 037/112] New translations actions.json (German) --- src/i18n/de/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/de/screens/actions.json b/src/i18n/de/screens/actions.json index 61dca26a..6cc3110b 100644 --- a/src/i18n/de/screens/actions.json +++ b/src/i18n/de/screens/actions.json @@ -8,11 +8,13 @@ "heading": "Benachrichtigungsart anzeigen", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "Followeranfrage", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "Followeranfrage" + "status": "", + "update": "" } } } From ae214e0960bbd433ade691b69cd59b67b8924181 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:07 +0200 Subject: [PATCH 038/112] New translations timeline.json (Korean) --- src/i18n/ko/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/ko/components/timeline.json b/src/i18n/ko/components/timeline.json index 8c4150d5..5b8f6e97 100644 --- a/src/i18n/ko/components/timeline.json +++ b/src/i18n/ko/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}}님이 부스트했어요", "notification": "{{name}}이 내 툿을 부스트했어요" - } + }, + "update": "" }, "actions": { "reply": { From 1b4e594ae2574faf6fcee202a345c91a1c486c68 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:08 +0200 Subject: [PATCH 039/112] New translations timeline.json (Chinese Simplified) --- src/i18n/zh-Hans/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/zh-Hans/components/timeline.json b/src/i18n/zh-Hans/components/timeline.json index 642bff69..55c1006b 100644 --- a/src/i18n/zh-Hans/components/timeline.json +++ b/src/i18n/zh-Hans/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} 转嘟了", "notification": "{{name}} 转嘟了你的嘟文" - } + }, + "update": "" }, "actions": { "reply": { From 18deaaaa0b917540b0c2f1df4ee5b66d56fbd955 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:08 +0200 Subject: [PATCH 040/112] New translations timeline.json (Vietnamese) --- src/i18n/vi/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/vi/components/timeline.json b/src/i18n/vi/components/timeline.json index 0e430bce..997818c2 100644 --- a/src/i18n/vi/components/timeline.json +++ b/src/i18n/vi/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} đăng lại", "notification": "{{name}} đăng lại tút của bạn" - } + }, + "update": "" }, "actions": { "reply": { From 6bf62d02ff408d3cbb533c03ebdec67c35a539a6 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:09 +0200 Subject: [PATCH 041/112] New translations timeline.json (Chinese Traditional) --- src/i18n/zh-Hant/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/zh-Hant/components/timeline.json b/src/i18n/zh-Hant/components/timeline.json index 78c85fbc..620ecc99 100644 --- a/src/i18n/zh-Hant/components/timeline.json +++ b/src/i18n/zh-Hant/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} 轉嘟了", "notification": "{{name}} 轉嘟了您的嘟文" - } + }, + "update": "" }, "actions": { "reply": { From d9226192056b5f75647e812247fe60686ae14777 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:10 +0200 Subject: [PATCH 042/112] New translations actions.json (Korean) --- src/i18n/ko/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/ko/screens/actions.json b/src/i18n/ko/screens/actions.json index d516ac7d..dd011ed4 100644 --- a/src/i18n/ko/screens/actions.json +++ b/src/i18n/ko/screens/actions.json @@ -8,11 +8,13 @@ "heading": "알림 종류 표시", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "팔로우 요청", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "팔로우 요청" + "status": "", + "update": "" } } } From ddad0947cd6ac5c754ed590a2c8958867e6b5edb Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:11 +0200 Subject: [PATCH 043/112] New translations actions.json (Chinese Simplified) --- src/i18n/zh-Hans/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/zh-Hans/screens/actions.json b/src/i18n/zh-Hans/screens/actions.json index fe84d39d..4ea47160 100644 --- a/src/i18n/zh-Hans/screens/actions.json +++ b/src/i18n/zh-Hans/screens/actions.json @@ -8,11 +8,13 @@ "heading": "显示通知", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "关注请求", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "关注请求" + "status": "", + "update": "" } } } From 5ce0a8769568ff91dddeee5b8b8196f269bcb221 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:12 +0200 Subject: [PATCH 044/112] New translations actions.json (Chinese Traditional) --- src/i18n/zh-Hant/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/zh-Hant/screens/actions.json b/src/i18n/zh-Hant/screens/actions.json index d6d2c219..648864d7 100644 --- a/src/i18n/zh-Hant/screens/actions.json +++ b/src/i18n/zh-Hant/screens/actions.json @@ -8,11 +8,13 @@ "heading": "", "content": { "follow": "", + "follow_request": "", "favourite": "", "reblog": "", "mention": "", "poll": "", - "follow_request": "" + "status": "", + "update": "" } } } From 1885869f8a1add7f5e0982cdcc3f955b69ec6ddd Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:12 +0200 Subject: [PATCH 045/112] New translations actions.json (Vietnamese) --- src/i18n/vi/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/vi/screens/actions.json b/src/i18n/vi/screens/actions.json index e561ddb4..53097e46 100644 --- a/src/i18n/vi/screens/actions.json +++ b/src/i18n/vi/screens/actions.json @@ -8,11 +8,13 @@ "heading": "Những kiểu thông báo cho phép", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "Yêu cầu theo dõi", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "Yêu cầu theo dõi" + "status": "", + "update": "" } } } From c106b1899adfd1f8028e03714c6cc4796b609b9d Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:13 +0200 Subject: [PATCH 046/112] New translations timeline.json (Italian) --- src/i18n/it/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/it/components/timeline.json b/src/i18n/it/components/timeline.json index 271209b5..9455ea6f 100644 --- a/src/i18n/it/components/timeline.json +++ b/src/i18n/it/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} ha ricondiviso", "notification": "{{name}} ha ricondiviso il tuo toot" - } + }, + "update": "" }, "actions": { "reply": { From 538624eafb81611648e1db8c7c92517732831a86 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:14 +0200 Subject: [PATCH 047/112] New translations actions.json (Italian) --- src/i18n/it/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/it/screens/actions.json b/src/i18n/it/screens/actions.json index 36ee63af..723c1372 100644 --- a/src/i18n/it/screens/actions.json +++ b/src/i18n/it/screens/actions.json @@ -8,11 +8,13 @@ "heading": "Filtra notifiche per tipo", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "Richieste di seguirti", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "Richieste di seguirti" + "status": "", + "update": "" } } } From b5716b5425cf8cc3d2f4fc03a49df89ae0f70768 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:15 +0200 Subject: [PATCH 048/112] New translations timeline.json (Portuguese, Brazilian) --- src/i18n/pt_BR/components/timeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/i18n/pt_BR/components/timeline.json b/src/i18n/pt_BR/components/timeline.json index 4ef048d0..36d0f77a 100644 --- a/src/i18n/pt_BR/components/timeline.json +++ b/src/i18n/pt_BR/components/timeline.json @@ -29,7 +29,8 @@ "reblog": { "default": "{{name}} boostou", "notification": "{{name}} deu boost no teu toot" - } + }, + "update": "" }, "actions": { "reply": { From 903f53f61dd9c673eeb6792eadd853b0d11224c8 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 19:28:16 +0200 Subject: [PATCH 049/112] New translations actions.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/actions.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/pt_BR/screens/actions.json b/src/i18n/pt_BR/screens/actions.json index c4cff91b..2d486974 100644 --- a/src/i18n/pt_BR/screens/actions.json +++ b/src/i18n/pt_BR/screens/actions.json @@ -8,11 +8,13 @@ "heading": "Exibir notificações", "content": { "follow": "$t(screenTabs:me.push.follow.heading)", + "follow_request": "Seguidores pendentes", "favourite": "$t(screenTabs:me.push.favourite.heading)", "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "follow_request": "Seguidores pendentes" + "status": "", + "update": "" } } } From af6731f702cc842fab10a65ed83c9eef213b7f40 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sat, 28 May 2022 22:18:03 +0200 Subject: [PATCH 050/112] Added pt-BR https://github.com/tooot-app/app/issues/302 --- README.md | 10 ++- package.json | 2 +- src/App.tsx | 27 ------ src/components/Menu/Row.tsx | 2 +- src/i18n/en/screens/tabs.json | 5 +- src/i18n/i18n.ts | 35 +++++++- src/i18n/locales.ts | 1 + src/i18n/pt_BR/_all.ts | 17 ++++ src/screens/Tabs/Me.tsx | 14 ++++ src/screens/Tabs/Me/Settings/App.tsx | 100 +---------------------- src/screens/Tabs/Me/SettingsFontsize.tsx | 5 +- src/screens/Tabs/Me/SettingsLanguage.tsx | 97 ++++++++++++++++++++++ src/utils/navigation/navigators.ts | 1 + 13 files changed, 181 insertions(+), 135 deletions(-) create mode 100644 src/i18n/pt_BR/_all.ts create mode 100644 src/screens/Tabs/Me/SettingsLanguage.tsx diff --git a/README.md b/README.md index 2420f572..c4c48d1b 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,12 @@ ## Special thanks -@forenta for German translation +[@forenta](https://github.com/forenta) for German translation -@andrigamerita for Italian translation +[@andrigamerita](https://github.com/andrigamerita) for Italian translation -@hellojaccc for Korean translation +[@hellojaccc](https://github.com/hellojaccc) for Korean translation -@duy@mas.to for Vietnamese translation \ No newline at end of file +[@luizpicolo](https://github.com/luizpicolo) for Brazilian Portuguese + +[@duy@mas.to](https://mas.to/@duy) for Vietnamese translation diff --git a/package.json b/package.json index 067c070b..f966803b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "native": "220508", "major": 4, "minor": 0, - "patch": 3, + "patch": 4, "expo": "45.0.0" }, "description": "tooot app for Mastodon", diff --git a/src/App.tsx b/src/App.tsx index bdf6569a..d0344016 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,31 +1,4 @@ import { ActionSheetProvider } from '@expo/react-native-action-sheet' -import '@formatjs/intl-getcanonicallocales/polyfill' -import '@formatjs/intl-locale/polyfill' -import '@formatjs/intl-pluralrules/polyfill' -import '@formatjs/intl-pluralrules/locale-data/de' -import '@formatjs/intl-pluralrules/locale-data/en' -import '@formatjs/intl-pluralrules/locale-data/ko' -import '@formatjs/intl-pluralrules/locale-data/vi' -import '@formatjs/intl-pluralrules/locale-data/zh' -import '@formatjs/intl-numberformat/polyfill' -import '@formatjs/intl-numberformat/locale-data/de' -import '@formatjs/intl-numberformat/locale-data/en' -import '@formatjs/intl-numberformat/locale-data/ko' -import '@formatjs/intl-numberformat/locale-data/vi' -import '@formatjs/intl-numberformat/locale-data/zh' -import '@formatjs/intl-datetimeformat/polyfill' -import '@formatjs/intl-datetimeformat/locale-data/de' -import '@formatjs/intl-datetimeformat/locale-data/en' -import '@formatjs/intl-datetimeformat/locale-data/ko' -import '@formatjs/intl-datetimeformat/locale-data/vi' -import '@formatjs/intl-datetimeformat/locale-data/zh' -import '@formatjs/intl-datetimeformat/add-all-tz' -import '@formatjs/intl-relativetimeformat/polyfill' -import '@formatjs/intl-relativetimeformat/locale-data/de' -import '@formatjs/intl-relativetimeformat/locale-data/en' -import '@formatjs/intl-relativetimeformat/locale-data/ko' -import '@formatjs/intl-relativetimeformat/locale-data/vi' -import '@formatjs/intl-relativetimeformat/locale-data/zh' import queryClient from '@helpers/queryClient' import i18n from '@root/i18n/i18n' import Screens from '@root/Screens' diff --git a/src/components/Menu/Row.tsx b/src/components/Menu/Row.tsx index f53d562c..98c48d14 100644 --- a/src/components/Menu/Row.tsx +++ b/src/components/Menu/Row.tsx @@ -22,7 +22,7 @@ export interface Props { switchDisabled?: boolean switchOnValueChange?: () => void - iconBack?: 'ChevronRight' | 'ExternalLink' + iconBack?: 'ChevronRight' | 'ExternalLink' | 'Check' iconBackColor?: ColorDefinitions loading?: boolean diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index 2f240322..cb658c5d 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "Toot Font Size" }, + "language": { + "name": "Language" + }, "lists": { "name": "Lists" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "Language", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 220124af..4df213d7 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -5,9 +5,42 @@ import de from '@root/i18n/de/_all' import en from '@root/i18n/en/_all' import it from '@root/i18n/it/_all' import ko from '@root/i18n/ko/_all' +import pt_BR from '@root/i18n/pt_BR/_all' import vi from '@root/i18n/vi/_all' import zh_Hans from '@root/i18n/zh-Hans/_all' +import '@formatjs/intl-getcanonicallocales/polyfill' +import '@formatjs/intl-locale/polyfill' +import '@formatjs/intl-pluralrules/polyfill' +import '@formatjs/intl-pluralrules/locale-data/de' +import '@formatjs/intl-pluralrules/locale-data/en' +import '@formatjs/intl-pluralrules/locale-data/ko' +import '@formatjs/intl-pluralrules/locale-data/pt' +import '@formatjs/intl-pluralrules/locale-data/vi' +import '@formatjs/intl-pluralrules/locale-data/zh' +import '@formatjs/intl-numberformat/polyfill' +import '@formatjs/intl-numberformat/locale-data/de' +import '@formatjs/intl-numberformat/locale-data/en' +import '@formatjs/intl-numberformat/locale-data/ko' +import '@formatjs/intl-numberformat/locale-data/pt' +import '@formatjs/intl-numberformat/locale-data/vi' +import '@formatjs/intl-numberformat/locale-data/zh-Hans' +import '@formatjs/intl-datetimeformat/polyfill' +import '@formatjs/intl-datetimeformat/locale-data/de' +import '@formatjs/intl-datetimeformat/locale-data/en' +import '@formatjs/intl-datetimeformat/locale-data/ko' +import '@formatjs/intl-datetimeformat/locale-data/pt' +import '@formatjs/intl-datetimeformat/locale-data/vi' +import '@formatjs/intl-datetimeformat/locale-data/zh-Hans' +import '@formatjs/intl-datetimeformat/add-all-tz' +import '@formatjs/intl-relativetimeformat/polyfill' +import '@formatjs/intl-relativetimeformat/locale-data/de' +import '@formatjs/intl-relativetimeformat/locale-data/en' +import '@formatjs/intl-relativetimeformat/locale-data/ko' +import '@formatjs/intl-relativetimeformat/locale-data/pt' +import '@formatjs/intl-relativetimeformat/locale-data/vi' +import '@formatjs/intl-relativetimeformat/locale-data/zh-Hans' + i18n.use(initReactI18next).init({ lng: 'en', fallbackLng: 'en', @@ -15,7 +48,7 @@ i18n.use(initReactI18next).init({ ns: ['common'], defaultNS: 'common', - resources: { 'zh-Hans': zh_Hans, vi, ko, it, en, de }, + resources: { 'zh-Hans': zh_Hans, vi, 'pt-BR': pt_BR, ko, it, en, de }, returnEmptyString: false, saveMissing: true, diff --git a/src/i18n/locales.ts b/src/i18n/locales.ts index 37c27a79..d9d4f560 100644 --- a/src/i18n/locales.ts +++ b/src/i18n/locales.ts @@ -3,6 +3,7 @@ const LOCALES = { en: 'English', it: 'Italiano', ko: '한국어', + 'pt-BR': 'Português (Brasil)', vi: 'Tiếng Việt', 'zh-Hans': '简体中文' } diff --git a/src/i18n/pt_BR/_all.ts b/src/i18n/pt_BR/_all.ts new file mode 100644 index 00000000..fa81be2e --- /dev/null +++ b/src/i18n/pt_BR/_all.ts @@ -0,0 +1,17 @@ +export default { + common: require('./common'), + + screens: require('./screens'), + screenActions: require('./screens/actions'), + screenAnnouncements: require('./screens/announcements'), + screenCompose: require('./screens/compose'), + screenImageViewer: require('./screens/imageViewer'), + screenTabs: require('./screens/tabs'), + + componentEmojis: require('./components/emojis'), + componentInstance: require('./components/instance'), + componentMediaSelector: require('./components/mediaSelector'), + componentParse: require('./components/parse'), + componentRelationship: require('./components/relationship'), + componentTimeline: require('./components/timeline') +} diff --git a/src/screens/Tabs/Me.tsx b/src/screens/Tabs/Me.tsx index 17e1feb1..27ffcc1f 100644 --- a/src/screens/Tabs/Me.tsx +++ b/src/screens/Tabs/Me.tsx @@ -14,6 +14,7 @@ import TabMePush from './Me/Push' import TabMeRoot from './Me/Root' import TabMeSettings from './Me/Settings' import TabMeSettingsFontsize from './Me/SettingsFontsize' +import TabMeSettingsLanguage from './Me/SettingsLanguage' import TabMeSwitch from './Me/Switch' import TabSharedRoot from './Shared/Root' @@ -152,6 +153,19 @@ const TabMe = React.memo( headerLeft: () => navigation.pop(1)} /> })} /> + ({ + title: t('me.stacks.language.name'), + ...(Platform.OS === 'android' && { + headerCenter: () => ( + + ) + }), + headerLeft: () => navigation.pop(1)} /> + })} + /> { const navigation = useNavigation() const dispatch = useAppDispatch() const { showActionSheetWithOptions } = useActionSheet() - const { mode } = useTheme() const { t, i18n } = useTranslation('screenTabs') - const instances = useSelector(getInstances, () => true) const settingsFontsize = useSelector(getSettingsFontsize) const settingsTheme = useSelector(getSettingsTheme) const settingsDarkTheme = useSelector(getSettingsDarkTheme) @@ -49,102 +41,14 @@ const SettingsApp: React.FC = () => { `me.settings.fontsize.content.${mapFontsizeToName(settingsFontsize)}` )} iconBack='ChevronRight' - onPress={() => { - navigation.navigate('Tab-Me-Settings-Fontsize') - }} + onPress={() => navigation.navigate('Tab-Me-Settings-Fontsize')} /> { - const options = Object.keys(LOCALES) - // @ts-ignore - .map(locale => LOCALES[locale]) - .concat(t('me.settings.language.options.cancel')) - - showActionSheetWithOptions( - { - title: t('me.settings.language.heading'), - options, - cancelButtonIndex: options.length - 1, - userInterfaceStyle: mode - }, - buttonIndex => { - if (buttonIndex === undefined) return - if (buttonIndex < options.length - 1) { - analytics('settings_language_press', { - current: i18n.language, - new: options[buttonIndex] - }) - haptics('Success') - - // @ts-ignore - dispatch(changeLanguage(Object.keys(LOCALES)[buttonIndex])) - i18n.changeLanguage(Object.keys(LOCALES)[buttonIndex]) - - // Update Android notification channel language - if (Platform.OS === 'android') { - instances.forEach(instance => { - const accountFull = `@${instance.account.acct}@${instance.uri}` - if (instance.push.decode.value === false) { - Notifications.setNotificationChannelAsync( - `${accountFull}_default`, - { - groupId: accountFull, - name: t('me.push.default.heading'), - ...androidDefaults - } - ) - } else { - Notifications.setNotificationChannelAsync( - `${accountFull}_follow`, - { - groupId: accountFull, - name: t('me.push.follow.heading'), - ...androidDefaults - } - ) - Notifications.setNotificationChannelAsync( - `${accountFull}_favourite`, - { - groupId: accountFull, - name: t('me.push.favourite.heading'), - ...androidDefaults - } - ) - Notifications.setNotificationChannelAsync( - `${accountFull}_reblog`, - { - groupId: accountFull, - name: t('me.push.reblog.heading'), - ...androidDefaults - } - ) - Notifications.setNotificationChannelAsync( - `${accountFull}_mention`, - { - groupId: accountFull, - name: t('me.push.mention.heading'), - ...androidDefaults - } - ) - Notifications.setNotificationChannelAsync( - `${accountFull}_poll`, - { - groupId: accountFull, - name: t('me.push.poll.heading'), - ...androidDefaults - } - ) - } - }) - } - } - } - ) - }} + onPress={() => navigation.navigate('Tab-Me-Settings-Language')} /> + +> = () => { + const { i18n, t } = useTranslation('screenTabs') + const languages = Object.entries(LOCALES) + const instances = useSelector(getInstances) + const dispatch = useDispatch() + + const change = (lang: string) => { + analytics('settings_language_press', { + current: i18n.language, + new: lang + }) + haptics('Success') + + dispatch(changeLanguage(lang)) + i18n.changeLanguage(lang) + + // Update Android notification channel language + if (Platform.OS === 'android') { + instances.forEach(instance => { + const accountFull = `@${instance.account.acct}@${instance.uri}` + if (instance.push.decode.value === false) { + Notifications.setNotificationChannelAsync(`${accountFull}_default`, { + groupId: accountFull, + name: t('me.push.default.heading'), + ...androidDefaults + }) + } else { + Notifications.setNotificationChannelAsync(`${accountFull}_follow`, { + groupId: accountFull, + name: t('me.push.follow.heading'), + ...androidDefaults + }) + Notifications.setNotificationChannelAsync( + `${accountFull}_favourite`, + { + groupId: accountFull, + name: t('me.push.favourite.heading'), + ...androidDefaults + } + ) + Notifications.setNotificationChannelAsync(`${accountFull}_reblog`, { + groupId: accountFull, + name: t('me.push.reblog.heading'), + ...androidDefaults + }) + Notifications.setNotificationChannelAsync(`${accountFull}_mention`, { + groupId: accountFull, + name: t('me.push.mention.heading'), + ...androidDefaults + }) + Notifications.setNotificationChannelAsync(`${accountFull}_poll`, { + groupId: accountFull, + name: t('me.push.poll.heading'), + ...androidDefaults + }) + } + }) + } + } + + return ( + + { + return ( + item[0] !== i18n.language && change(item[0])} + /> + ) + }} + /> + + ) +} + +export default TabMeSettingsLanguage diff --git a/src/utils/navigation/navigators.ts b/src/utils/navigation/navigators.ts index aa940756..5e978256 100644 --- a/src/utils/navigation/navigators.ts +++ b/src/utils/navigation/navigators.ts @@ -146,6 +146,7 @@ export type TabMeStackParamList = { 'Tab-Me-Push': undefined 'Tab-Me-Settings': undefined 'Tab-Me-Settings-Fontsize': undefined + 'Tab-Me-Settings-Language': undefined 'Tab-Me-Switch': undefined } & TabSharedStackParamList export type TabMeStackScreenProps = From 748339732c924534166ed6cc8d0f18e165bc2adb Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:19:42 +0200 Subject: [PATCH 051/112] New translations tabs.json (Korean) --- src/i18n/ko/screens/tabs.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/ko/screens/tabs.json b/src/i18n/ko/screens/tabs.json index 2acaefcd..aea74256 100644 --- a/src/i18n/ko/screens/tabs.json +++ b/src/i18n/ko/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "툿 폰트 크기" }, + "language": { + "name": "" + }, "lists": { "name": "목록" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "언어", + "heading": "", "options": { "cancel": "$t(common:buttons.cancel)" } From 091b89d7120870f526b98690bf898dcc29d29557 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:19:46 +0200 Subject: [PATCH 052/112] New translations tabs.json (German) --- src/i18n/de/screens/tabs.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/de/screens/tabs.json b/src/i18n/de/screens/tabs.json index b98356f0..122edd73 100644 --- a/src/i18n/de/screens/tabs.json +++ b/src/i18n/de/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "Schriftgröße" }, + "language": { + "name": "" + }, "lists": { "name": "Listen" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "Sprache", + "heading": "", "options": { "cancel": "$t(common:buttons.cancel)" } From cc4726178824ecab77c0b11cc1ce8fd1e7c4f03c Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:19:51 +0200 Subject: [PATCH 053/112] New translations tabs.json (Chinese Simplified) --- src/i18n/zh-Hans/screens/tabs.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/zh-Hans/screens/tabs.json b/src/i18n/zh-Hans/screens/tabs.json index 0b52b33c..39c8cf0c 100644 --- a/src/i18n/zh-Hans/screens/tabs.json +++ b/src/i18n/zh-Hans/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "嘟文字号" }, + "language": { + "name": "" + }, "lists": { "name": "列表" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "切换语言", + "heading": "", "options": { "cancel": "$t(common:buttons.cancel)" } From d8a7b78c306e6ae66672aca2cf25b296d9fc5476 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:19:52 +0200 Subject: [PATCH 054/112] New translations tabs.json (Vietnamese) --- src/i18n/vi/screens/tabs.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index 49e52146..9ad774e2 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "Cỡ chữ" }, + "language": { + "name": "" + }, "lists": { "name": "Danh sách" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "Ngôn ngữ", + "heading": "", "options": { "cancel": "$t(common:buttons.cancel)" } From e864f5bcb1537537eceef3b9313d6cf664ab5aa2 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:19:59 +0200 Subject: [PATCH 055/112] New translations tabs.json (Italian) --- src/i18n/it/screens/tabs.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/it/screens/tabs.json b/src/i18n/it/screens/tabs.json index 083067f6..64b7c609 100644 --- a/src/i18n/it/screens/tabs.json +++ b/src/i18n/it/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "Grandezza del testo dei toot" }, + "language": { + "name": "" + }, "lists": { "name": "Liste" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "Lingua", + "heading": "", "options": { "cancel": "$t(common:buttons.cancel)" } From f7d3433b74a43c870a685cd87f309080e83e82fd Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:20:08 +0200 Subject: [PATCH 056/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index ffb256ca..913dccaf 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "Tamanho da fonte do Toot" }, + "language": { + "name": "" + }, "lists": { "name": "Listas" }, @@ -221,7 +224,7 @@ } }, "language": { - "heading": "Idioma", + "heading": "", "options": { "cancel": "$t(common:buttons.cancel)" } From b6cb4eb6f90bca307cf264204bd97d22273cfec6 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:20:15 +0200 Subject: [PATCH 057/112] New translations tabs.json (Chinese Traditional) --- src/i18n/zh-Hant/screens/tabs.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/i18n/zh-Hant/screens/tabs.json b/src/i18n/zh-Hant/screens/tabs.json index 4aa7b045..11c0d54c 100644 --- a/src/i18n/zh-Hant/screens/tabs.json +++ b/src/i18n/zh-Hant/screens/tabs.json @@ -43,6 +43,9 @@ "fontSize": { "name": "嘟文字體大小" }, + "language": { + "name": "" + }, "lists": { "name": "清單" }, From cda72a396ab7da394533f4b9220bdb043e995b57 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:22 +0200 Subject: [PATCH 058/112] New translations common.json (German) --- src/i18n/de/common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/de/common.json b/src/i18n/de/common.json index c9876900..88bf6d29 100644 --- a/src/i18n/de/common.json +++ b/src/i18n/de/common.json @@ -1,6 +1,6 @@ { "buttons": { - "OK": "", + "OK": "OK", "apply": "Übernehmen", "cancel": "Abbrechen" }, From 618620d443785ba53f21ef48730abe8ea0066ac3 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:30 +0200 Subject: [PATCH 059/112] New translations actions.json (Chinese Simplified) --- src/i18n/zh-Hans/screens/actions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/zh-Hans/screens/actions.json b/src/i18n/zh-Hans/screens/actions.json index 4ea47160..b7ed467e 100644 --- a/src/i18n/zh-Hans/screens/actions.json +++ b/src/i18n/zh-Hans/screens/actions.json @@ -13,8 +13,8 @@ "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "status": "", - "update": "" + "status": "订阅用户的嘟文", + "update": "转嘟被编辑" } } } From 27b995aa674ad4954ed96a978eade832cf54d67c Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:34 +0200 Subject: [PATCH 060/112] New translations tabs.json (Korean) --- src/i18n/ko/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/ko/screens/tabs.json b/src/i18n/ko/screens/tabs.json index aea74256..e423baaa 100644 --- a/src/i18n/ko/screens/tabs.json +++ b/src/i18n/ko/screens/tabs.json @@ -44,7 +44,7 @@ "name": "툿 폰트 크기" }, "language": { - "name": "" + "name": "언어" }, "lists": { "name": "목록" @@ -224,7 +224,7 @@ } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } From d0ddccffe8100c9cc1b5ece2c1f72b8037511475 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:36 +0200 Subject: [PATCH 061/112] New translations imageViewer.json (German) --- src/i18n/de/screens/imageViewer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/de/screens/imageViewer.json b/src/i18n/de/screens/imageViewer.json index 036bfa4f..765c5900 100644 --- a/src/i18n/de/screens/imageViewer.json +++ b/src/i18n/de/screens/imageViewer.json @@ -7,7 +7,7 @@ "options": { "save": "Bild speichern", "share": "Bild teilen", - "cancel": "" + "cancel": "$t(common:buttons.cancel)" }, "save": { "succeed": "Bild gespeichert", From ea6f4d3fbf0b431dadacb5056eba4c23b21241e7 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:38 +0200 Subject: [PATCH 062/112] New translations tabs.json (German) --- src/i18n/de/screens/tabs.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/de/screens/tabs.json b/src/i18n/de/screens/tabs.json index 122edd73..a11c78e7 100644 --- a/src/i18n/de/screens/tabs.json +++ b/src/i18n/de/screens/tabs.json @@ -44,7 +44,7 @@ "name": "Schriftgröße" }, "language": { - "name": "" + "name": "Sprache" }, "lists": { "name": "Listen" @@ -144,7 +144,7 @@ } }, "fields": { - "group": "", + "group": "Gruppe {{index}}", "label": "Kennzeichnung", "content": "Inhalt" } @@ -224,7 +224,7 @@ } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } From 82d767bfda244b58bf7cca7bdb73846052d74d3c Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:39 +0200 Subject: [PATCH 063/112] New translations mediaSelector.json (German) --- src/i18n/de/components/mediaSelector.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/i18n/de/components/mediaSelector.json b/src/i18n/de/components/mediaSelector.json index f4eab40b..d460f005 100644 --- a/src/i18n/de/components/mediaSelector.json +++ b/src/i18n/de/components/mediaSelector.json @@ -3,7 +3,7 @@ "options": { "library": "Hochladen", "photo": "Bild aufnehmen", - "cancel": "" + "cancel": "$t(common:buttons.cancel)" }, "library": { "alert": { @@ -11,7 +11,7 @@ "message": "Für den Upload ist eine Zugriffsgenehmigung erforderlich", "buttons": { "settings": "Einstellungen bestätigen", - "cancel": "" + "cancel": "$t(common:buttons.cancel)" } } }, @@ -21,7 +21,7 @@ "message": "Zugriff auf die Kamera erforderlich", "buttons": { "settings": "Einstellungen übernehmen", - "cancel": "" + "cancel": "$t(common:buttons.cancel)" } } } From 02b34370c0bafd5e113a01f18fa96bbb65a090a7 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:41 +0200 Subject: [PATCH 064/112] New translations timeline.json (Chinese Simplified) --- src/i18n/zh-Hans/components/timeline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/zh-Hans/components/timeline.json b/src/i18n/zh-Hans/components/timeline.json index 55c1006b..6347abaa 100644 --- a/src/i18n/zh-Hans/components/timeline.json +++ b/src/i18n/zh-Hans/components/timeline.json @@ -30,7 +30,7 @@ "default": "{{name}} 转嘟了", "notification": "{{name}} 转嘟了你的嘟文" }, - "update": "" + "update": "转嘟已被编辑" }, "actions": { "reply": { From a17e57eb458c91b864255a1686921ecb63dd7c6a Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:42 +0200 Subject: [PATCH 065/112] New translations tabs.json (Chinese Simplified) --- src/i18n/zh-Hans/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/zh-Hans/screens/tabs.json b/src/i18n/zh-Hans/screens/tabs.json index 39c8cf0c..dbb3dfeb 100644 --- a/src/i18n/zh-Hans/screens/tabs.json +++ b/src/i18n/zh-Hans/screens/tabs.json @@ -44,7 +44,7 @@ "name": "嘟文字号" }, "language": { - "name": "" + "name": "应用语言" }, "lists": { "name": "列表" @@ -224,7 +224,7 @@ } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } From 355fe966c8e4f1a31187d94baa9b77e59cef5e59 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:43 +0200 Subject: [PATCH 066/112] New translations tabs.json (Vietnamese) --- src/i18n/vi/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index 9ad774e2..b5e3a060 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -44,7 +44,7 @@ "name": "Cỡ chữ" }, "language": { - "name": "" + "name": "Ngôn ngữ" }, "lists": { "name": "Danh sách" @@ -224,7 +224,7 @@ } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } From 5df4e6c81be33855c951cf0c2f4dcb8d0c043d39 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:48 +0200 Subject: [PATCH 067/112] New translations tabs.json (Italian) --- src/i18n/it/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/it/screens/tabs.json b/src/i18n/it/screens/tabs.json index 64b7c609..18156158 100644 --- a/src/i18n/it/screens/tabs.json +++ b/src/i18n/it/screens/tabs.json @@ -44,7 +44,7 @@ "name": "Grandezza del testo dei toot" }, "language": { - "name": "" + "name": "Lingua" }, "lists": { "name": "Liste" @@ -224,7 +224,7 @@ } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } From 4c4bb3422e9b918f3895c8c30ab7a10757ea23d8 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:54 +0200 Subject: [PATCH 068/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 913dccaf..20fa8897 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -44,7 +44,7 @@ "name": "Tamanho da fonte do Toot" }, "language": { - "name": "" + "name": "Idioma" }, "lists": { "name": "Listas" @@ -224,7 +224,7 @@ } }, "language": { - "heading": "", + "heading": "$t(me.stacks.language.name)", "options": { "cancel": "$t(common:buttons.cancel)" } From 1b559c89f4fd40c35bd660a882a48a210e047a18 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sat, 28 May 2022 22:29:58 +0200 Subject: [PATCH 069/112] New translations common.json (Korean) --- src/i18n/ko/common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/ko/common.json b/src/i18n/ko/common.json index 0a972cc4..ecf14ded 100644 --- a/src/i18n/ko/common.json +++ b/src/i18n/ko/common.json @@ -1,6 +1,6 @@ { "buttons": { - "OK": "", + "OK": "확인", "apply": "적용", "cancel": "취소" }, From 6b4c2d18ec40d75e41e3faf7e4691dd62a679c96 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sun, 29 May 2022 01:57:15 +0200 Subject: [PATCH 070/112] Push add more types --- src/@types/mastodon.d.ts | 2 ++ src/i18n/en/screens/tabs.json | 6 ++++++ src/screens/Tabs/Me/Push.tsx | 14 ++++++++++++-- src/screens/Tabs/Me/SettingsLanguage.tsx | 4 +++- src/utils/migrations/instances/migration.ts | 14 ++++++++++++++ src/utils/migrations/instances/v10.ts | 8 ++++++++ src/utils/slices/instances/add.ts | 4 +++- 7 files changed, 48 insertions(+), 4 deletions(-) diff --git a/src/@types/mastodon.d.ts b/src/@types/mastodon.d.ts index 1a62f519..fd7ce0d7 100644 --- a/src/@types/mastodon.d.ts +++ b/src/@types/mastodon.d.ts @@ -376,10 +376,12 @@ declare namespace Mastodon { endpoint: string alerts: { follow: boolean + follow_request: boolean favourite: boolean reblog: boolean mention: boolean poll: boolean + status: boolean } server_key: string } diff --git a/src/i18n/en/screens/tabs.json b/src/i18n/en/screens/tabs.json index cb658c5d..8f652234 100644 --- a/src/i18n/en/screens/tabs.json +++ b/src/i18n/en/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "New follower" }, + "follow_request": { + "heading": "Follow request" + }, "favourite": { "heading": "Favourited" }, @@ -181,6 +184,9 @@ "poll": { "heading": "Poll updates" }, + "status": { + "heading": "Toot from subscribed users" + }, "howitworks": "Learn how routing works" }, "root": { diff --git a/src/screens/Tabs/Me/Push.tsx b/src/screens/Tabs/Me/Push.tsx index 7a172258..e49cb86e 100644 --- a/src/screens/Tabs/Me/Push.tsx +++ b/src/screens/Tabs/Me/Push.tsx @@ -73,12 +73,22 @@ const TabMePush: React.FC = () => { const alerts = useMemo(() => { return instancePush?.alerts ? ( - ['follow', 'favourite', 'reblog', 'mention', 'poll'] as [ + [ 'follow', + 'follow_request', 'favourite', 'reblog', 'mention', - 'poll' + 'poll', + 'status' + ] as [ + 'follow', + 'follow_request', + 'favourite', + 'reblog', + 'mention', + 'poll', + 'status' ] ).map(alert => ( -> = () => { +> = ({ navigation }) => { const { i18n, t } = useTranslation('screenTabs') const languages = Object.entries(LOCALES) const instances = useSelector(getInstances) @@ -72,6 +72,8 @@ const TabMeSettingsLanguage: React.FC< } }) } + + navigation.pop(1) } return ( diff --git a/src/utils/migrations/instances/migration.ts b/src/utils/migrations/instances/migration.ts index eadcf4d4..ac02bd1c 100644 --- a/src/utils/migrations/instances/migration.ts +++ b/src/utils/migrations/instances/migration.ts @@ -110,6 +110,20 @@ const instancesMigration = { ...instance.notifications_filter, status: true, update: true + }, + push: { + ...instance.push, + alerts: { + ...instance.push.alerts, + follow_request: { + loading: false, + value: true + }, + status: { + loading: false, + value: true + } + } } } }) diff --git a/src/utils/migrations/instances/v10.ts b/src/utils/migrations/instances/v10.ts index 6257a75f..db44a516 100644 --- a/src/utils/migrations/instances/v10.ts +++ b/src/utils/migrations/instances/v10.ts @@ -38,6 +38,10 @@ export type InstanceV10 = { loading: boolean value: Mastodon.PushSubscription['alerts']['follow'] } + follow_request: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['follow_request'] + } favourite: { loading: boolean value: Mastodon.PushSubscription['alerts']['favourite'] @@ -54,6 +58,10 @@ export type InstanceV10 = { loading: boolean value: Mastodon.PushSubscription['alerts']['poll'] } + status: { + loading: boolean + value: Mastodon.PushSubscription['alerts']['status'] + } } keys: { auth?: string diff --git a/src/utils/slices/instances/add.ts b/src/utils/slices/instances/add.ts index 1f19bd34..a8f322ac 100644 --- a/src/utils/slices/instances/add.ts +++ b/src/utils/slices/instances/add.ts @@ -94,10 +94,12 @@ const addInstance = createAsyncThunk( decode: { loading: false, value: false }, alerts: { follow: { loading: false, value: true }, + follow_request: { loading: false, value: true }, favourite: { loading: false, value: true }, reblog: { loading: false, value: true }, mention: { loading: false, value: true }, - poll: { loading: false, value: true } + poll: { loading: false, value: true }, + status: { loading: false, value: true } }, keys: { auth: undefined, public: undefined, private: undefined } }, From c94ef1882b846c728d525fab2e7383df32e5cd5a Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sun, 29 May 2022 17:28:27 +0200 Subject: [PATCH 071/112] Fix followed by text overflow https://github.com/tooot-app/app/issues/272 --- .github/workflows/codeql-analysis.yml | 10 ++-- .../Shared/Account/Information/Account.tsx | 52 +++++++------------ 2 files changed, 23 insertions(+), 39 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7b7f9a11..dda1c8c7 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -14,11 +14,11 @@ name: "CodeQL" on: push: branches: [ main ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] - schedule: - - cron: '35 4 * * 4' + # pull_request: + # # The branches below must be a subset of the branches above + # branches: [ main ] + # schedule: + # - cron: '35 4 * * 4' jobs: analyze: diff --git a/src/screens/Tabs/Shared/Account/Information/Account.tsx b/src/screens/Tabs/Shared/Account/Information/Account.tsx index 6e4a8cbd..31a3f1fb 100644 --- a/src/screens/Tabs/Shared/Account/Information/Account.tsx +++ b/src/screens/Tabs/Shared/Account/Information/Account.tsx @@ -7,7 +7,7 @@ import { } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' -import React, { useMemo } from 'react' +import React from 'react' import { useTranslation } from 'react-i18next' import { View } from 'react-native' import { useSelector } from 'react-redux' @@ -35,23 +35,6 @@ const AccountInformationAccount: React.FC = ({ options: { enabled: account !== undefined } }) - const movedContent = useMemo(() => { - if (account?.moved) { - return ( - - @{account.moved.acct} - - ) - } - }, [account?.moved]) - if (account || (localInstance && instanceAccount)) { return ( = ({ marginBottom: StyleConstants.Spacing.L }} > - - @{localInstance ? instanceAccount?.acct : account?.acct} - {localInstance ? `@${instanceUri}` : null} - - {relationship?.followed_by ? ( - - {t('shared.account.followed_by')} + + {account?.moved ? ( + <> + {' '} + @{account.moved.acct} + + ) : null} + + @{localInstance ? instanceAccount?.acct : account?.acct} + {localInstance ? `@${instanceUri}` : null} - ) : null} - {movedContent} + {relationship?.followed_by ? t('shared.account.followed_by') : null} + {account?.locked ? ( Date: Sun, 29 May 2022 17:37:15 +0200 Subject: [PATCH 072/112] New translations tabs.json (German) --- src/i18n/de/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/de/screens/tabs.json b/src/i18n/de/screens/tabs.json index a11c78e7..185cd5fd 100644 --- a/src/i18n/de/screens/tabs.json +++ b/src/i18n/de/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "Neue Follower" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "Favoriten" }, @@ -181,6 +184,9 @@ "poll": { "heading": "Umfrageupdate" }, + "status": { + "heading": "" + }, "howitworks": "Erfahre, wie das Routing funktioniert" }, "root": { From 29db4d0d46635554c47e356eb958a1be215f6faa Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 29 May 2022 17:37:16 +0200 Subject: [PATCH 073/112] New translations tabs.json (Korean) --- src/i18n/ko/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/ko/screens/tabs.json b/src/i18n/ko/screens/tabs.json index e423baaa..fdb34a76 100644 --- a/src/i18n/ko/screens/tabs.json +++ b/src/i18n/ko/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "새 팔로워" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "즐겨찾기됨" }, @@ -181,6 +184,9 @@ "poll": { "heading": "투표 업데이트" }, + "status": { + "heading": "" + }, "howitworks": "라우팅 방법 알아보기" }, "root": { From cec0ac4dff5e543f65025452d8d6021efd15dc11 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 29 May 2022 17:37:17 +0200 Subject: [PATCH 074/112] New translations tabs.json (Chinese Simplified) --- src/i18n/zh-Hans/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/zh-Hans/screens/tabs.json b/src/i18n/zh-Hans/screens/tabs.json index dbb3dfeb..f80978c2 100644 --- a/src/i18n/zh-Hans/screens/tabs.json +++ b/src/i18n/zh-Hans/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "新关注者" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "嘟文被喜欢" }, @@ -181,6 +184,9 @@ "poll": { "heading": "投票更新" }, + "status": { + "heading": "" + }, "howitworks": "了解通知消息转发如何工作" }, "root": { From 792a33a4973cfff6d2a9c8d6fcc14794611084ef Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 29 May 2022 17:37:18 +0200 Subject: [PATCH 075/112] New translations tabs.json (Vietnamese) --- src/i18n/vi/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index b5e3a060..c510e620 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "Người theo dõi mới" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "Lượt thích" }, @@ -181,6 +184,9 @@ "poll": { "heading": "Kết quả bình chọn" }, + "status": { + "heading": "" + }, "howitworks": "Tìm hiểu cách truyền" }, "root": { From 2416a90bb554493b235f38c9e1018d2978b0dd7f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 29 May 2022 17:37:18 +0200 Subject: [PATCH 076/112] New translations tabs.json (Chinese Traditional) --- src/i18n/zh-Hant/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/zh-Hant/screens/tabs.json b/src/i18n/zh-Hant/screens/tabs.json index 11c0d54c..bf70a873 100644 --- a/src/i18n/zh-Hant/screens/tabs.json +++ b/src/i18n/zh-Hant/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "" }, @@ -181,6 +184,9 @@ "poll": { "heading": "" }, + "status": { + "heading": "" + }, "howitworks": "" }, "root": { From acf845acc8b5cf55df8aa78e58d2a7bc9dfb4908 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 29 May 2022 17:37:19 +0200 Subject: [PATCH 077/112] New translations tabs.json (Italian) --- src/i18n/it/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/it/screens/tabs.json b/src/i18n/it/screens/tabs.json index 18156158..f706112e 100644 --- a/src/i18n/it/screens/tabs.json +++ b/src/i18n/it/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "Nuovi seguaci" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "Apprezzamenti" }, @@ -181,6 +184,9 @@ "poll": { "heading": "Novità sui sondaggi" }, + "status": { + "heading": "" + }, "howitworks": "Scopri come funziona il traversamento dei messaggi" }, "root": { From 98f5830ab6fa486fdc647852c7b15caa46145dc5 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Sun, 29 May 2022 17:37:20 +0200 Subject: [PATCH 078/112] New translations tabs.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/tabs.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/i18n/pt_BR/screens/tabs.json b/src/i18n/pt_BR/screens/tabs.json index 20fa8897..0d52e55b 100644 --- a/src/i18n/pt_BR/screens/tabs.json +++ b/src/i18n/pt_BR/screens/tabs.json @@ -169,6 +169,9 @@ "follow": { "heading": "Novo seguidor" }, + "follow_request": { + "heading": "" + }, "favourite": { "heading": "Favoritos" }, @@ -181,6 +184,9 @@ "poll": { "heading": "Pesquisa atualizada" }, + "status": { + "heading": "" + }, "howitworks": "Saiba como funciona o roteamento" }, "root": { From af0756cef21824d5660f926418ed03e09190b947 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Sun, 29 May 2022 17:45:53 +0200 Subject: [PATCH 079/112] Add drafts warning Fixed #259 --- src/i18n/en/screens/compose.json | 1 + src/screens/Compose/DraftsList/Root.tsx | 25 ++++++++++++++++++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/i18n/en/screens/compose.json b/src/i18n/en/screens/compose.json index 0006bed2..6290ee6a 100644 --- a/src/i18n/en/screens/compose.json +++ b/src/i18n/en/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "Draft" }, + "warning": "Drafts are only stored locally, and can be lost in unfortunate events. Advise not using drafts for long term storage.", "content": { "accessibilityHint": "Saved draft, tap to edit this draft", "textEmpty": "Content empty" diff --git a/src/screens/Compose/DraftsList/Root.tsx b/src/screens/Compose/DraftsList/Root.tsx index 08a202a8..3c1abed3 100644 --- a/src/screens/Compose/DraftsList/Root.tsx +++ b/src/screens/Compose/DraftsList/Root.tsx @@ -53,7 +53,6 @@ const ComposeDraftsListRoot: React.FC = ({ timestamp }) => { const renderItem = useCallback( ({ item }: { item: ComposeStateDraft }) => { - console.log('timestamp', item.timestamp) return ( = ({ timestamp }) => { return ( <> + + + + {t('content.draftsList.warning')} + + Date: Sun, 29 May 2022 17:56:35 +0200 Subject: [PATCH 080/112] Update Poll.tsx Fixed #256 --- src/components/Timeline/Shared/Poll.tsx | 72 +++++++++++-------------- 1 file changed, 32 insertions(+), 40 deletions(-) diff --git a/src/components/Timeline/Shared/Poll.tsx b/src/components/Timeline/Shared/Poll.tsx index b4c6a91f..bab34fa4 100644 --- a/src/components/Timeline/Shared/Poll.tsx +++ b/src/components/Timeline/Shared/Poll.tsx @@ -145,36 +145,6 @@ const TimelinePoll: React.FC = ({ mutation.isLoading ]) - const pollExpiration = useMemo(() => { - if (poll.expired) { - return ( - - {t('shared.poll.meta.expiration.expired')} - - ) - } else { - if (poll.expires_at) { - return ( - - - ]} - /> - - ) - } - } - }, [theme, i18n.language, poll.expired, poll.expires_at]) - const isSelected = useCallback( (index: number): string => allOptions[index] @@ -302,21 +272,38 @@ const TimelinePoll: React.FC = ({ const pollVoteCounts = useMemo(() => { if (poll.voters_count !== null) { return ( - - {t('shared.poll.meta.count.voters', { count: poll.voters_count })} - {' • '} - + t('shared.poll.meta.count.voters', { count: poll.voters_count }) + ' • ' ) } else if (poll.votes_count !== null) { return ( - - {t('shared.poll.meta.count.votes', { count: poll.votes_count })} - {' • '} - + t('shared.poll.meta.count.votes', { count: poll.votes_count }) + ' • ' ) } }, [poll.voters_count, poll.votes_count]) + const pollExpiration = useMemo(() => { + if (poll.expired) { + return t('shared.poll.meta.expiration.expired') + } else { + if (poll.expires_at) { + return ( + + ]} + /> + ) + } + } + }, [theme, i18n.language, poll.expired, poll.expires_at]) + return ( {poll.expired || poll.voted ? pollBodyDisallow : pollBodyAllow} @@ -329,8 +316,13 @@ const TimelinePoll: React.FC = ({ }} > {pollButton} - {pollVoteCounts} - {pollExpiration} + + {pollVoteCounts} + {pollExpiration} + ) From a9e36d4a9c3cffc13df72dcd0cf5c1aadcffd730 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 1 Jun 2022 00:33:59 +0200 Subject: [PATCH 081/112] Try without memo --- babel.config.js | 14 +- package.json | 1 + src/api/tooot.ts | 2 +- src/components/Timeline/Default.tsx | 239 +++++++++++++--------------- src/startup/dev.ts | 2 + src/utils/queryHooks/timeline.ts | 4 +- yarn.lock | 55 ++++++- 7 files changed, 188 insertions(+), 129 deletions(-) diff --git a/babel.config.js b/babel.config.js index 576c1c12..630526a3 100644 --- a/babel.config.js +++ b/babel.config.js @@ -29,7 +29,19 @@ module.exports = function (api) { } return { - presets: ['babel-preset-expo'], + presets: [ + 'babel-preset-expo', + [ + '@babel/preset-react', + { + importSource: '@welldone-software/why-did-you-render', + runtime: 'automatic', + development: + process.env.NODE_ENV === 'development' || + process.env.BABEL_ENV === 'development' + } + ] + ], plugins } } diff --git a/package.json b/package.json index f966803b..31e142ae 100644 --- a/package.json +++ b/package.json @@ -104,6 +104,7 @@ "devDependencies": { "@babel/core": "7.18.2", "@babel/plugin-proposal-optional-chaining": "7.17.12", + "@babel/preset-react": "^7.17.12", "@babel/preset-typescript": "7.17.12", "@expo/config": "6.0.24", "@types/lodash": "4.14.182", diff --git a/src/api/tooot.ts b/src/api/tooot.ts index db5c86af..b4264a76 100644 --- a/src/api/tooot.ts +++ b/src/api/tooot.ts @@ -19,7 +19,7 @@ export type Params = { export const TOOOT_API_DOMAIN = mapEnvironment({ release: 'api.tooot.app', - candidate: 'api.tooot.app', + candidate: 'api-candidate.tooot.app', development: 'api-development.tooot.app' }) diff --git a/src/components/Timeline/Default.tsx b/src/components/Timeline/Default.tsx index cba31325..9d863144 100644 --- a/src/components/Timeline/Default.tsx +++ b/src/components/Timeline/Default.tsx @@ -14,7 +14,7 @@ import { QueryKeyTimeline } from '@utils/queryHooks/timeline' import { getInstanceAccount } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' -import { isEqual, uniqBy } from 'lodash' +import { uniqBy } from 'lodash' import React, { useCallback } from 'react' import { Pressable, View } from 'react-native' import { useSelector } from 'react-redux' @@ -34,145 +34,136 @@ export interface Props { } // When the poll is long -const TimelineDefault = React.memo( - ({ - item, - queryKey, - rootQueryKey, - origin, - highlighted = false, - disableDetails = false, - disableOnPress = false - }: Props) => { - const { colors } = useTheme() - const instanceAccount = useSelector(getInstanceAccount, () => true) - const navigation = - useNavigation>() +const TimelineDefault: React.FC = ({ + item, + queryKey, + rootQueryKey, + origin, + highlighted = false, + disableDetails = false, + disableOnPress = false +}) => { + const { colors } = useTheme() + const instanceAccount = useSelector(getInstanceAccount, () => true) + const navigation = + useNavigation>() - const actualStatus = item.reblog ? item.reblog : item + const actualStatus = item.reblog ? item.reblog : item - const ownAccount = actualStatus.account?.id === instanceAccount?.id + const ownAccount = actualStatus.account?.id === instanceAccount?.id - if ( + if ( + !highlighted && + queryKey && + shouldFilter({ status: actualStatus, queryKey }) + ) { + return + } + + const onPress = useCallback(() => { + analytics('timeline_default_press', { + page: queryKey ? queryKey[1].page : origin + }) + !disableOnPress && !highlighted && - queryKey && - shouldFilter({ status: actualStatus, queryKey }) - ) { - return - } - - const onPress = useCallback(() => { - analytics('timeline_default_press', { - page: queryKey ? queryKey[1].page : origin + navigation.push('Tab-Shared-Toot', { + toot: actualStatus, + rootQueryKey: queryKey }) - !disableOnPress && - !highlighted && - navigation.push('Tab-Shared-Toot', { - toot: actualStatus, - rootQueryKey: queryKey - }) - }, []) + }, []) - return ( - + {item.reblog ? ( + + ) : item._pinned ? ( + + ) : null} + + + + + + + - {item.reblog ? ( - - ) : item._pinned ? ( - - ) : null} - - - - 0 ? ( + - - - - {typeof actualStatus.content === 'string' && - actualStatus.content.length > 0 ? ( - - ) : null} - {queryKey && actualStatus.poll ? ( - - ) : null} - {!disableDetails && - Array.isArray(actualStatus.media_attachments) && - actualStatus.media_attachments.length ? ( - - ) : null} - {!disableDetails && actualStatus.card ? ( - - ) : null} - {!disableDetails ? ( - - ) : null} - - - - - {queryKey && !disableDetails ? ( - d?.id !== instanceAccount?.id), - d => d?.id - ).map(d => d?.acct)} + statusId={actualStatus.id} + poll={actualStatus.poll} reblog={item.reblog ? true : false} + sameAccount={ownAccount} /> ) : null} - - ) - }, - (prev, next) => isEqual(prev.item, next.item) -) + {!disableDetails && + Array.isArray(actualStatus.media_attachments) && + actualStatus.media_attachments.length ? ( + + ) : null} + {!disableDetails && actualStatus.card ? ( + + ) : null} + {!disableDetails ? ( + + ) : null} + + + + + {queryKey && !disableDetails ? ( + d?.id !== instanceAccount?.id), + d => d?.id + ).map(d => d?.acct)} + reblog={item.reblog ? true : false} + /> + ) : null} + + ) +} export default TimelineDefault diff --git a/src/startup/dev.ts b/src/startup/dev.ts index c9d81e97..0c2d2df5 100644 --- a/src/startup/dev.ts +++ b/src/startup/dev.ts @@ -1,3 +1,5 @@ +/// + import React from 'react' import log from './log' diff --git a/src/utils/queryHooks/timeline.ts b/src/utils/queryHooks/timeline.ts index 1c4b28bb..cc30c82c 100644 --- a/src/utils/queryHooks/timeline.ts +++ b/src/utils/queryHooks/timeline.ts @@ -440,8 +440,8 @@ const useTimelineMutation = ({ ...(onMutate && { onMutate: params => { queryClient.cancelQueries(params.queryKey) - let oldData - params.queryKey && (oldData = queryClient.getQueryData(params.queryKey)) + const oldData = + params.queryKey && queryClient.getQueryData(params.queryKey) haptics('Light') switch (params.type) { diff --git a/yarn.lock b/yarn.lock index a229dda8..49a7062e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -693,6 +693,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-syntax-jsx@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz#834035b45061983a491f60096f61a2e7c5674a47" + integrity sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz#ca91ef46303530448b906652bac2e9fe9941f699" @@ -973,13 +980,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-transform-react-display-name@^7.0.0": +"@babel/plugin-transform-react-display-name@^7.0.0", "@babel/plugin-transform-react-display-name@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz#7b6d40d232f4c0f550ea348593db3b21e2404340" integrity sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg== dependencies: "@babel/helper-plugin-utils" "^7.16.7" +"@babel/plugin-transform-react-jsx-development@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz#43a00724a3ed2557ed3f276a01a929e6686ac7b8" + integrity sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.16.7" + "@babel/plugin-transform-react-jsx-self@^7.0.0": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.16.7.tgz#f432ad0cba14c4a1faf44f0076c69e42a4d4479e" @@ -1005,6 +1019,25 @@ "@babel/plugin-syntax-jsx" "^7.16.7" "@babel/types" "^7.17.0" +"@babel/plugin-transform-react-jsx@^7.16.7", "@babel/plugin-transform-react-jsx@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz#2aa20022709cd6a3f40b45d60603d5f269586dba" + integrity sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-syntax-jsx" "^7.17.12" + "@babel/types" "^7.17.12" + +"@babel/plugin-transform-react-pure-annotations@^7.16.7": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.0.tgz#ef82c8e310913f3522462c9ac967d395092f1954" + integrity sha512-6+0IK6ouvqDn9bmEG7mEyF/pwlJXVj5lwydybpyyH3D0A7Hftk+NCTdYjnLNZksn261xaOV5ksmp20pQEmc2RQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/plugin-transform-regenerator@^7.0.0", "@babel/plugin-transform-regenerator@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz#9e7576dc476cb89ccc5096fff7af659243b4adeb" @@ -1200,6 +1233,18 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" +"@babel/preset-react@^7.17.12": + version "7.17.12" + resolved "https://registry.yarnpkg.com/@babel/preset-react/-/preset-react-7.17.12.tgz#62adbd2d1870c0de3893095757ed5b00b492ab3d" + integrity sha512-h5U+rwreXtZaRBEQhW1hOJLMq8XNJBQ/9oymXiCXTuT/0uOwpbT0gUt+sXeOqoXBgNuUKI7TaObVwoEyWkpFgA== + dependencies: + "@babel/helper-plugin-utils" "^7.17.12" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-transform-react-display-name" "^7.16.7" + "@babel/plugin-transform-react-jsx" "^7.17.12" + "@babel/plugin-transform-react-jsx-development" "^7.16.7" + "@babel/plugin-transform-react-pure-annotations" "^7.16.7" + "@babel/preset-typescript@7.17.12": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz#40269e0a0084d56fc5731b6c40febe1c9a4a3e8c" @@ -1332,6 +1377,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.17.12": + version "7.18.4" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.4.tgz#27eae9b9fd18e9dccc3f9d6ad051336f307be354" + integrity sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@babel/types@^7.18.0", "@babel/types@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.2.tgz#191abfed79ebe6f4242f643a9a5cbaa36b10b091" From fe0a2532f1d00c4f7822d25356108a612f612eeb Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 1 Jun 2022 00:40:24 +0200 Subject: [PATCH 082/112] Fix Italian time format --- src/i18n/i18n.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/i18n/i18n.ts b/src/i18n/i18n.ts index 4df213d7..5e951716 100644 --- a/src/i18n/i18n.ts +++ b/src/i18n/i18n.ts @@ -11,31 +11,39 @@ import zh_Hans from '@root/i18n/zh-Hans/_all' import '@formatjs/intl-getcanonicallocales/polyfill' import '@formatjs/intl-locale/polyfill' + import '@formatjs/intl-pluralrules/polyfill' import '@formatjs/intl-pluralrules/locale-data/de' import '@formatjs/intl-pluralrules/locale-data/en' +import '@formatjs/intl-pluralrules/locale-data/it' import '@formatjs/intl-pluralrules/locale-data/ko' import '@formatjs/intl-pluralrules/locale-data/pt' import '@formatjs/intl-pluralrules/locale-data/vi' import '@formatjs/intl-pluralrules/locale-data/zh' + import '@formatjs/intl-numberformat/polyfill' import '@formatjs/intl-numberformat/locale-data/de' import '@formatjs/intl-numberformat/locale-data/en' +import '@formatjs/intl-numberformat/locale-data/it' import '@formatjs/intl-numberformat/locale-data/ko' import '@formatjs/intl-numberformat/locale-data/pt' import '@formatjs/intl-numberformat/locale-data/vi' import '@formatjs/intl-numberformat/locale-data/zh-Hans' + import '@formatjs/intl-datetimeformat/polyfill' import '@formatjs/intl-datetimeformat/locale-data/de' import '@formatjs/intl-datetimeformat/locale-data/en' +import '@formatjs/intl-datetimeformat/locale-data/it' import '@formatjs/intl-datetimeformat/locale-data/ko' import '@formatjs/intl-datetimeformat/locale-data/pt' import '@formatjs/intl-datetimeformat/locale-data/vi' import '@formatjs/intl-datetimeformat/locale-data/zh-Hans' import '@formatjs/intl-datetimeformat/add-all-tz' + import '@formatjs/intl-relativetimeformat/polyfill' import '@formatjs/intl-relativetimeformat/locale-data/de' import '@formatjs/intl-relativetimeformat/locale-data/en' +import '@formatjs/intl-relativetimeformat/locale-data/it' import '@formatjs/intl-relativetimeformat/locale-data/ko' import '@formatjs/intl-relativetimeformat/locale-data/pt' import '@formatjs/intl-relativetimeformat/locale-data/vi' From 7678857e5dc9cea3e6ba8847265ee17de43f9700 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:05 +0200 Subject: [PATCH 083/112] New translations compose.json (German) --- src/i18n/de/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/de/screens/compose.json b/src/i18n/de/screens/compose.json index caa8fc28..0da491bb 100644 --- a/src/i18n/de/screens/compose.json +++ b/src/i18n/de/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "Entwurf" }, + "warning": "", "content": { "accessibilityHint": "Gespeicherter Entwurf, tippe, um diesen zu bearbeiten", "textEmpty": "Kein Inhalt" From 213e343aa9c6a76e600267b61d842c39698d86d1 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:07 +0200 Subject: [PATCH 084/112] New translations compose.json (Korean) --- src/i18n/ko/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/ko/screens/compose.json b/src/i18n/ko/screens/compose.json index d9f0bc1c..1fd3de75 100644 --- a/src/i18n/ko/screens/compose.json +++ b/src/i18n/ko/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "초안" }, + "warning": "", "content": { "accessibilityHint": "저장된 초안, 수정하려면 탭하세요", "textEmpty": "콘텐츠 빔" From 2c2fc6efee7d175d55ab68492b6203043e5303b9 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:07 +0200 Subject: [PATCH 085/112] New translations compose.json (Chinese Simplified) --- src/i18n/zh-Hans/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/zh-Hans/screens/compose.json b/src/i18n/zh-Hans/screens/compose.json index 33c505a8..a9ae17b8 100644 --- a/src/i18n/zh-Hans/screens/compose.json +++ b/src/i18n/zh-Hans/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "草稿" }, + "warning": "", "content": { "accessibilityHint": "已保存的草稿,点击编辑此草稿", "textEmpty": "无正文内容" From b6efe3eba73a8e0fa6f31b143ded596215e2099f Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:08 +0200 Subject: [PATCH 086/112] New translations compose.json (Vietnamese) --- src/i18n/vi/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/vi/screens/compose.json b/src/i18n/vi/screens/compose.json index 67d48171..807121ed 100644 --- a/src/i18n/vi/screens/compose.json +++ b/src/i18n/vi/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "Nháp" }, + "warning": "", "content": { "accessibilityHint": "Đã lưu nháp, nhấn để tiếp tục viết", "textEmpty": "Chưa có nội dung" From f85606a4d5a7d30450769e10fceb09463888b35d Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:09 +0200 Subject: [PATCH 087/112] New translations compose.json (Chinese Traditional) --- src/i18n/zh-Hant/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/zh-Hant/screens/compose.json b/src/i18n/zh-Hant/screens/compose.json index dc1419b3..ceb1afd4 100644 --- a/src/i18n/zh-Hant/screens/compose.json +++ b/src/i18n/zh-Hant/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "" }, + "warning": "", "content": { "accessibilityHint": "", "textEmpty": "" From 56469d41edb815e764a22bbf43523e6de50b7ba8 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:11 +0200 Subject: [PATCH 088/112] New translations compose.json (Italian) --- src/i18n/it/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/it/screens/compose.json b/src/i18n/it/screens/compose.json index 4abf23cd..190db708 100644 --- a/src/i18n/it/screens/compose.json +++ b/src/i18n/it/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "Bozza" }, + "warning": "", "content": { "accessibilityHint": "Bozza salvata, premi per modificarla", "textEmpty": "Testo vuoto" From 4efd87861d94b8422421f0e0bb4dc751b7f25952 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 00:48:12 +0200 Subject: [PATCH 089/112] New translations compose.json (Portuguese, Brazilian) --- src/i18n/pt_BR/screens/compose.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i18n/pt_BR/screens/compose.json b/src/i18n/pt_BR/screens/compose.json index f59596b9..f226aa0f 100644 --- a/src/i18n/pt_BR/screens/compose.json +++ b/src/i18n/pt_BR/screens/compose.json @@ -168,6 +168,7 @@ "header": { "title": "Rascunho" }, + "warning": "", "content": { "accessibilityHint": "Toque para editar este rascunho", "textEmpty": "O conteúdo está vazio" From f81bd58d61e22db57cc2d84a4d2a5522c86b2395 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 12:21:27 +0200 Subject: [PATCH 090/112] New translations timeline.json (Vietnamese) --- src/i18n/vi/components/timeline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/vi/components/timeline.json b/src/i18n/vi/components/timeline.json index 997818c2..92224828 100644 --- a/src/i18n/vi/components/timeline.json +++ b/src/i18n/vi/components/timeline.json @@ -30,7 +30,7 @@ "default": "{{name}} đăng lại", "notification": "{{name}} đăng lại tút của bạn" }, - "update": "" + "update": "Đăng lại đã được sửa" }, "actions": { "reply": { From 62d014d2a81d151a079f5fe9b619764bfa3bc13d Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 12:21:29 +0200 Subject: [PATCH 091/112] New translations tabs.json (Vietnamese) --- src/i18n/vi/screens/tabs.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/vi/screens/tabs.json b/src/i18n/vi/screens/tabs.json index c510e620..166c2188 100644 --- a/src/i18n/vi/screens/tabs.json +++ b/src/i18n/vi/screens/tabs.json @@ -170,7 +170,7 @@ "heading": "Người theo dõi mới" }, "follow_request": { - "heading": "" + "heading": "Yêu cầu theo dõi" }, "favourite": { "heading": "Lượt thích" @@ -185,7 +185,7 @@ "heading": "Kết quả bình chọn" }, "status": { - "heading": "" + "heading": "Tút từ người đã theo dõi" }, "howitworks": "Tìm hiểu cách truyền" }, From 102bc31adddd76b62cdc21684365ea89ba996c72 Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 12:21:30 +0200 Subject: [PATCH 092/112] New translations compose.json (Vietnamese) --- src/i18n/vi/screens/compose.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/vi/screens/compose.json b/src/i18n/vi/screens/compose.json index 807121ed..36f7ac4a 100644 --- a/src/i18n/vi/screens/compose.json +++ b/src/i18n/vi/screens/compose.json @@ -168,7 +168,7 @@ "header": { "title": "Nháp" }, - "warning": "", + "warning": "Tút nháp chỉ được lưu trữ trên điện thoại và có thể bị mất nếu có sự cố. Hãy cẩn thận.", "content": { "accessibilityHint": "Đã lưu nháp, nhấn để tiếp tục viết", "textEmpty": "Chưa có nội dung" From 8b01ab0fd9a4878261931a6a14bb3ee23fea8dab Mon Sep 17 00:00:00 2001 From: xmflsct Date: Wed, 1 Jun 2022 12:21:31 +0200 Subject: [PATCH 093/112] New translations actions.json (Vietnamese) --- src/i18n/vi/screens/actions.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/vi/screens/actions.json b/src/i18n/vi/screens/actions.json index 53097e46..06cd1e50 100644 --- a/src/i18n/vi/screens/actions.json +++ b/src/i18n/vi/screens/actions.json @@ -13,8 +13,8 @@ "reblog": "$t(screenTabs:me.push.reblog.heading)", "mention": "$t(screenTabs:me.push.mention.heading)", "poll": "$t(screenTabs:me.push.poll.heading)", - "status": "", - "update": "" + "status": "Tút từ người đã theo dõi", + "update": "Đăng lại đã được sửa" } } } From 5ba32902547410e964314f4ba3087ee0e545ef28 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 1 Jun 2022 23:13:43 +0200 Subject: [PATCH 094/112] Fixed #299 --- src/components/Timeline.tsx | 120 ++++++----- src/components/Timeline/Refresh.tsx | 323 ++++++++++++++++++++++++++++ 2 files changed, 389 insertions(+), 54 deletions(-) create mode 100644 src/components/Timeline/Refresh.tsx diff --git a/src/components/Timeline.tsx b/src/components/Timeline.tsx index ec8d6b33..b18aec52 100644 --- a/src/components/Timeline.tsx +++ b/src/components/Timeline.tsx @@ -1,10 +1,6 @@ import ComponentSeparator from '@components/Separator' import { useScrollToTop } from '@react-navigation/native' -import { - QueryKeyTimeline, - TimelineData, - useTimelineQuery -} from '@utils/queryHooks/timeline' +import { QueryKeyTimeline, useTimelineQuery } from '@utils/queryHooks/timeline' import { getInstanceActive } from '@utils/slices/instancesSlice' import { StyleConstants } from '@utils/styles/constants' import { useTheme } from '@utils/styles/ThemeManager' @@ -16,10 +12,20 @@ import { RefreshControl, StyleSheet } from 'react-native' -import { InfiniteData, useQueryClient } from 'react-query' +import Animated, { + useAnimatedScrollHandler, + useSharedValue +} from 'react-native-reanimated' +import { useQueryClient } from 'react-query' import { useSelector } from 'react-redux' import TimelineEmpty from './Timeline/Empty' import TimelineFooter from './Timeline/Footer' +import TimelineRefresh, { + SEPARATION_Y_1, + SEPARATION_Y_2 +} from './Timeline/Refresh' + +const AnimatedFlatList = Animated.createAnimatedComponent(FlatList) export interface Props { flRef?: RefObject> @@ -40,15 +46,12 @@ const Timeline: React.FC = ({ }) => { const { colors } = useTheme() - const queryClient = useQueryClient() const { data, refetch, isFetching, isLoading, - fetchPreviousPage, fetchNextPage, - isFetchingPreviousPage, isFetchingNextPage } = useTimelineQuery({ ...queryKey[1], @@ -57,12 +60,6 @@ const Timeline: React.FC = ({ ios: ['dataUpdatedAt', 'isFetching'], android: ['dataUpdatedAt', 'isFetching', 'isLoading'] }), - getPreviousPageParam: firstPage => - firstPage?.links?.prev && { - min_id: firstPage.links.prev, - // https://github.com/facebook/react-native/issues/25239 - limit: '10' - }, getNextPageParam: lastPage => lastPage?.links?.next && { max_id: lastPage.links.next @@ -92,6 +89,27 @@ const Timeline: React.FC = ({ const flRef = useRef(null) + const scrollY = useSharedValue(0) + const fetchingType = useSharedValue<0 | 1 | 2>(0) + + const onScroll = useAnimatedScrollHandler( + { + onScroll: ({ contentOffset: { y } }) => { + scrollY.value = y + }, + onEndDrag: ({ contentOffset: { y } }) => { + if (!disableRefresh && !isFetching) { + if (y <= SEPARATION_Y_2) { + fetchingType.value = 2 + } else if (y <= SEPARATION_Y_1) { + fetchingType.value = 1 + } + } + } + }, + [isFetching] + ) + const androidRefreshControl = Platform.select({ android: { refreshControl: ( @@ -115,46 +133,40 @@ const Timeline: React.FC = ({ }) return ( - - } - ListEmptyComponent={} - ItemSeparatorComponent={ItemSeparatorComponent} - {...(isFetchingPreviousPage && { - maintainVisibleContentPosition: { minIndexForVisible: 0 } - })} - refreshing={isFetchingPreviousPage} - onRefresh={() => { - if (!disableRefresh && !isFetchingPreviousPage) { - queryClient.setQueryData | undefined>( - queryKey, - data => { - if (data?.pages[0] && data.pages[0].body.length === 0) { - return { - pages: data.pages.slice(1), - pageParams: data.pageParams.slice(1) - } - } else { - return data - } - } - ) - fetchPreviousPage() + <> + + } - }} - {...androidRefreshControl} - {...customProps} - /> + ListEmptyComponent={} + ItemSeparatorComponent={ItemSeparatorComponent} + maintainVisibleContentPosition={{ + minIndexForVisible: 0 + }} + {...androidRefreshControl} + {...customProps} + /> + ) } diff --git a/src/components/Timeline/Refresh.tsx b/src/components/Timeline/Refresh.tsx new file mode 100644 index 00000000..f5d5ad2a --- /dev/null +++ b/src/components/Timeline/Refresh.tsx @@ -0,0 +1,323 @@ +import haptics from '@components/haptics' +import Icon from '@components/Icon' +import { + QueryKeyTimeline, + TimelineData, + useTimelineQuery +} from '@utils/queryHooks/timeline' +import { StyleConstants } from '@utils/styles/constants' +import { useTheme } from '@utils/styles/ThemeManager' +import React, { RefObject, useCallback, useRef, useState } from 'react' +import { useTranslation } from 'react-i18next' +import { FlatList, Platform, StyleSheet, Text, View } from 'react-native' +import { Circle } from 'react-native-animated-spinkit' +import Animated, { + Extrapolate, + interpolate, + runOnJS, + useAnimatedReaction, + useAnimatedStyle, + useSharedValue, + withTiming +} from 'react-native-reanimated' +import { InfiniteData, useQueryClient } from 'react-query' + +export interface Props { + flRef: RefObject> + queryKey: QueryKeyTimeline + scrollY: Animated.SharedValue + fetchingType: Animated.SharedValue<0 | 1 | 2> + disableRefresh?: boolean +} + +const CONTAINER_HEIGHT = StyleConstants.Spacing.M * 2.5 +export const SEPARATION_Y_1 = -( + CONTAINER_HEIGHT / 2 + + StyleConstants.Font.Size.S / 2 +) +export const SEPARATION_Y_2 = -( + CONTAINER_HEIGHT * 1.5 + + StyleConstants.Font.Size.S / 2 +) + +const TimelineRefresh: React.FC = ({ + flRef, + queryKey, + scrollY, + fetchingType, + disableRefresh = false +}) => { + if (Platform.OS !== 'ios') { + return null + } + if (disableRefresh) { + return null + } + + const fetchingLatestIndex = useRef(0) + const refetchActive = useRef(false) + + const { + refetch, + isFetching, + isLoading, + fetchPreviousPage, + hasPreviousPage, + isFetchingNextPage + } = useTimelineQuery({ + ...queryKey[1], + options: { + getPreviousPageParam: firstPage => + firstPage?.links?.prev && { + min_id: firstPage.links.prev, + // https://github.com/facebook/react-native/issues/25239#issuecomment-731100372 + limit: '3' + }, + select: data => { + if (refetchActive.current) { + data.pageParams = [data.pageParams[0]] + data.pages = [data.pages[0]] + refetchActive.current = false + } + return data + }, + onSuccess: () => { + if (fetchingLatestIndex.current > 0) { + if (fetchingLatestIndex.current > 5) { + clearFirstPage() + fetchingLatestIndex.current = 0 + } else { + if (hasPreviousPage) { + fetchPreviousPage() + fetchingLatestIndex.current++ + } else { + clearFirstPage() + fetchingLatestIndex.current = 0 + } + } + } + } + } + }) + + const { t } = useTranslation('componentTimeline') + const { colors } = useTheme() + + const queryClient = useQueryClient() + const clearFirstPage = () => { + queryClient.setQueryData | undefined>( + queryKey, + data => { + if (data?.pages[0] && data.pages[0].body.length === 0) { + return { + pages: data.pages.slice(1), + pageParams: data.pageParams.slice(1) + } + } else { + return data + } + } + ) + } + const prepareRefetch = () => { + refetchActive.current = true + queryClient.setQueryData | undefined>( + queryKey, + data => { + if (data) { + data.pageParams = [undefined] + const newFirstPage: TimelineData = { body: [] } + for (let page of data.pages) { + // @ts-ignore + newFirstPage.body.push(...page.body) + if (newFirstPage.body.length > 10) break + } + data.pages = [newFirstPage] + } + + return data + } + ) + } + const callRefetch = async () => { + await refetch() + setTimeout(() => flRef.current?.scrollToOffset({ offset: 1 }), 50) + } + + const [textRight, setTextRight] = useState(0) + const arrowY = useAnimatedStyle(() => ({ + transform: [ + { + translateY: interpolate( + scrollY.value, + [0, SEPARATION_Y_1], + [ + -CONTAINER_HEIGHT / 2 - StyleConstants.Font.Size.M / 2, + CONTAINER_HEIGHT / 2 - StyleConstants.Font.Size.S / 2 + ], + Extrapolate.CLAMP + ) + } + ] + })) + const arrowTop = useAnimatedStyle(() => ({ + marginTop: + scrollY.value < SEPARATION_Y_2 + ? withTiming(CONTAINER_HEIGHT) + : withTiming(0) + })) + + const arrowStage = useSharedValue(0) + const onLayout = useCallback( + ({ nativeEvent }) => { + if (nativeEvent.layout.x + nativeEvent.layout.width > textRight) { + setTextRight(nativeEvent.layout.x + nativeEvent.layout.width) + } + }, + [textRight] + ) + useAnimatedReaction( + () => { + if (isFetching) { + return false + } + switch (arrowStage.value) { + case 0: + if (scrollY.value < SEPARATION_Y_1) { + arrowStage.value = 1 + return true + } + return false + case 1: + if (scrollY.value < SEPARATION_Y_2) { + arrowStage.value = 2 + return true + } + if (scrollY.value > SEPARATION_Y_1) { + arrowStage.value = 0 + return false + } + return false + case 2: + if (scrollY.value > SEPARATION_Y_2) { + arrowStage.value = 1 + return false + } + return false + } + }, + data => { + if (data) { + runOnJS(haptics)('Light') + } + }, + [isFetching] + ) + const wrapperStartLatest = () => { + fetchingLatestIndex.current = 1 + } + + useAnimatedReaction( + () => { + return fetchingType.value + }, + data => { + fetchingType.value = 0 + switch (data) { + case 1: + runOnJS(wrapperStartLatest)() + runOnJS(clearFirstPage)() + runOnJS(fetchPreviousPage)() + break + case 2: + runOnJS(prepareRefetch)() + runOnJS(callRefetch)() + break + } + }, + [] + ) + + const headerPadding = useAnimatedStyle( + () => ({ + paddingTop: + fetchingLatestIndex.current !== 0 || + (isFetching && !isLoading && !isFetchingNextPage) + ? withTiming(StyleConstants.Spacing.M * 2.5) + : withTiming(0) + }), + [fetchingLatestIndex.current, isFetching, isFetchingNextPage, isLoading] + ) + + return ( + + + {isFetching ? ( + + + + ) : ( + <> + + + + } + /> + + + + + + )} + + + ) +} + +const styles = StyleSheet.create({ + base: { + position: 'absolute', + top: 0, + left: 0, + right: 0, + height: CONTAINER_HEIGHT * 2, + alignItems: 'center' + }, + container1: { + flex: 1, + flexDirection: 'row', + height: CONTAINER_HEIGHT + }, + container2: { height: CONTAINER_HEIGHT, justifyContent: 'center' }, + explanation: { + fontSize: StyleConstants.Font.Size.S, + lineHeight: CONTAINER_HEIGHT + } +}) + +export default TimelineRefresh From 316096cf571de138c313affa9f34b37bb03a75cd Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 1 Jun 2022 23:39:48 +0200 Subject: [PATCH 095/112] Fixed #310 --- src/components/Timeline/Shared/Filtered.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Timeline/Shared/Filtered.tsx b/src/components/Timeline/Shared/Filtered.tsx index 661182fa..f6e10994 100644 --- a/src/components/Timeline/Shared/Filtered.tsx +++ b/src/components/Timeline/Shared/Filtered.tsx @@ -55,7 +55,7 @@ export const shouldFilter = ({ ) // $& means the whole matched string switch (filter.whole_word) { case true: - if (new RegExp('\\B' + escapedPhrase + '\\B').test(text)) { + if (new RegExp('\\b' + escapedPhrase + '\\b').test(text)) { shouldFilter = true } break @@ -100,6 +100,7 @@ export const shouldFilter = ({ }) } }) + status.spoiler_text && parser.write(status.spoiler_text) parser.write(status.content) parser.end() } From bc0ae827ad2d912c50a0c61df254785ab4ab8415 Mon Sep 17 00:00:00 2001 From: Zhiyuan Zheng Date: Wed, 1 Jun 2022 23:47:58 +0200 Subject: [PATCH 096/112] Fixed #311 --- src/screens/ImagesViewer.tsx | 202 ++++++++++++++++++----------------- 1 file changed, 106 insertions(+), 96 deletions(-) diff --git a/src/screens/ImagesViewer.tsx b/src/screens/ImagesViewer.tsx index 405a1aaa..23dfb816 100644 --- a/src/screens/ImagesViewer.tsx +++ b/src/screens/ImagesViewer.tsx @@ -19,94 +19,6 @@ import { import ImageViewer from './ImageViewer/Root' import saveImage from './ImageViewer/save' -const HeaderComponent = React.memo( - ({ - messageRef, - navigation, - currentIndex, - imageUrls - }: { - messageRef: RefObject - navigation: NativeStackNavigationProp< - RootStackParamList, - 'Screen-ImagesViewer' - > - currentIndex: number - imageUrls: RootStackParamList['Screen-ImagesViewer']['imageUrls'] - }) => { - const insets = useSafeAreaInsets() - const { mode, theme } = useTheme() - const { t } = useTranslation('screenImageViewer') - const { showActionSheetWithOptions } = useActionSheet() - - const onPress = useCallback(() => { - analytics('imageviewer_more_press') - showActionSheetWithOptions( - { - options: [ - t('content.options.save'), - t('content.options.share'), - t('content.options.cancel') - ], - cancelButtonIndex: 2, - userInterfaceStyle: mode - }, - async buttonIndex => { - switch (buttonIndex) { - case 0: - analytics('imageviewer_more_save_press') - saveImage({ messageRef, theme, image: imageUrls[currentIndex] }) - break - case 1: - analytics('imageviewer_more_share_press') - switch (Platform.OS) { - case 'ios': - await Share.share({ url: imageUrls[currentIndex].url }) - break - case 'android': - await Share.share({ message: imageUrls[currentIndex].url }) - break - } - break - } - } - ) - }, [currentIndex]) - - return ( - - navigation.goBack()} - /> - - - - ) - }, - (prev, next) => prev.currentIndex === next.currentIndex -) - const ScreenImagesViewer = ({ route: { params: { imageUrls, id } @@ -118,13 +30,51 @@ const ScreenImagesViewer = ({ return null } - const { theme } = useTheme() + const insets = useSafeAreaInsets() + + const { mode, theme } = useTheme() + const { t } = useTranslation('screenImageViewer') const initialIndex = imageUrls.findIndex(image => image.id === id) const [currentIndex, setCurrentIndex] = useState(initialIndex) const messageRef = useRef(null) + const { showActionSheetWithOptions } = useActionSheet() + const onPress = useCallback(() => { + analytics('imageviewer_more_press') + showActionSheetWithOptions( + { + options: [ + t('content.options.save'), + t('content.options.share'), + t('content.options.cancel') + ], + cancelButtonIndex: 2, + userInterfaceStyle: mode + }, + async buttonIndex => { + switch (buttonIndex) { + case 0: + analytics('imageviewer_more_save_press') + saveImage({ messageRef, theme, image: imageUrls[currentIndex] }) + break + case 1: + analytics('imageviewer_more_share_press') + switch (Platform.OS) { + case 'ios': + await Share.share({ url: imageUrls[currentIndex].url }) + break + case 'android': + await Share.share({ message: imageUrls[currentIndex].url }) + break + } + break + } + } + ) + }, [currentIndex]) + return (