From a9dc4ec90fc4fc6af8c103e30946f308c6ef5cf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Espino=20Garc=C3=ADa?= Date: Fri, 27 Jan 2023 18:26:13 +0100 Subject: [PATCH] Use more verbose message on archive and don't make help link lowercase (#6952) * Use more verbose message on archive and don't make help link lowercase * Fix lint --- .../destructive_options/archive/archive.tsx | 10 +++++++--- app/screens/settings/settings.tsx | 6 ++---- assets/base/i18n/en.json | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/screens/channel_info/destructive_options/archive/archive.tsx b/app/screens/channel_info/destructive_options/archive/archive.tsx index 55706f0fb8..c40e5a2adb 100644 --- a/app/screens/channel_info/destructive_options/archive/archive.tsx +++ b/app/screens/channel_info/destructive_options/archive/archive.tsx @@ -63,10 +63,14 @@ const Archive = ({ const onArchive = preventDoubleTap(() => { const title = {id: t('channel_info.archive_title'), defaultMessage: 'Archive {term}'}; - const message = { - id: t('channel_info.archive_description'), - defaultMessage: 'Are you sure you want to archive the {term} {name}?', + const message = canViewArchivedChannels ? { + id: t('channel_info.archive_description.can_view_archived'), + defaultMessage: 'This will archive the channel from the team. Channel contents will still be accessible by channel members.\n\nAre you sure you wish to archive the {term} {name}?', + } : { + id: t('channel_info.archive_description.cannot_view_archived'), + defaultMessage: 'This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again.\n\nAre you sure you wish to archive the {term} {name}?', }; + const onPressAction = async () => { const result = await archiveChannel(serverUrl, channelId); if (result.error) { diff --git a/app/screens/settings/settings.tsx b/app/screens/settings/settings.tsx index 5abbd1ed4a..e11938faf2 100644 --- a/app/screens/settings/settings.tsx +++ b/app/screens/settings/settings.tsx @@ -108,9 +108,7 @@ const Settings = ({componentId, helpLink, showHelp, siteName}: SettingsProps) => }); const openHelp = preventDoubleTap(() => { - const link = helpLink ? helpLink.toLowerCase() : ''; - - if (link) { + if (helpLink) { const onError = () => { Alert.alert( intl.formatMessage({id: 'mobile.link.error.title', defaultMessage: 'Error'}), @@ -118,7 +116,7 @@ const Settings = ({componentId, helpLink, showHelp, siteName}: SettingsProps) => ); }; - tryOpenURL(link, onError); + tryOpenURL(helpLink, onError); } }); diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index 6e0a16d089..d20b87a3b5 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -102,7 +102,8 @@ "channel_info.alertNo": "No", "channel_info.alertYes": "Yes", "channel_info.archive": "Archive Channel", - "channel_info.archive_description": "Are you sure you want to archive the {term} {name}?", + "channel_info.archive_description.can_view_archived": "This will archive the channel from the team. Channel contents will still be accessible by channel members.\n\nAre you sure you wish to archive the {term} {name}?", + "channel_info.archive_description.cannot_view_archived": "This will archive the channel from the team and remove it from the user interface. Archived channels can be unarchived if needed again.\n\nAre you sure you wish to archive the {term} {name}?", "channel_info.archive_failed": "An error occurred trying to archive the channel {displayName}", "channel_info.archive_title": "Archive {term}", "channel_info.close": "Close",