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
This commit is contained in:
Daniel Espino García
2023-01-27 18:26:13 +01:00
committed by GitHub
parent 7ed2e73a91
commit a9dc4ec90f
3 changed files with 11 additions and 8 deletions

View File

@@ -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) {

View File

@@ -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);
}
});

View File

@@ -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",