diff --git a/app/components/post_draft/send_handler/send_handler.tsx b/app/components/post_draft/send_handler/send_handler.tsx index 97cf500f06..d8d84ace4f 100644 --- a/app/components/post_draft/send_handler/send_handler.tsx +++ b/app/components/post_draft/send_handler/send_handler.tsx @@ -141,7 +141,7 @@ export default function SendHandler({ }), intl.formatMessage({ id: 'mobile.calls_end_permission_msg', - defaultMessage: 'You do not have permission to end the call. Please ask the call owner to end the call.', + defaultMessage: 'You don\'t have permission to end the call. Please ask the call owner to end the call.', })); return; } diff --git a/app/products/calls/components/calls_custom_message/calls_custom_message.tsx b/app/products/calls/components/calls_custom_message/calls_custom_message.tsx index e6232fa5cc..70916472d0 100644 --- a/app/products/calls/components/calls_custom_message/calls_custom_message.tsx +++ b/app/products/calls/components/calls_custom_message/calls_custom_message.tsx @@ -9,6 +9,7 @@ import {Text, TouchableOpacity, View} from 'react-native'; import leaveAndJoinWithAlert from '@calls/components/leave_and_join_alert'; import CompassIcon from '@components/compass_icon'; import FormattedRelativeTime from '@components/formatted_relative_time'; +import FormattedText from '@components/formatted_text'; import FormattedTime from '@components/formatted_time'; import {useServerUrl} from '@context/server'; import {useTheme} from '@context/theme'; @@ -123,20 +124,33 @@ export const CallsCustomMessage = ({ style={style.phoneHangupIcon} /> - {'Call ended'} + - {'Ended at '} + + {' '} { } {'•'} - - {`Lasted ${moment.duration(post.props.end_at - post.props.start_at).humanize(false)}`} - + @@ -151,9 +165,12 @@ export const CallsCustomMessage = ({ style={style.joinCallIcon} /> - - {`${displayUsername(author, intl.locale, teammateNameDisplay)} started a call`} - + { alreadyInTheCall && - {'Current call'} + } { !alreadyInTheCall && - {'Join call'} + } diff --git a/app/products/calls/components/channel_info_enable_calls/index.tsx b/app/products/calls/components/channel_info_enable_calls/index.tsx index 0b9063dbd9..8827e000ae 100644 --- a/app/products/calls/components/channel_info_enable_calls/index.tsx +++ b/app/products/calls/components/channel_info_enable_calls/index.tsx @@ -25,8 +25,8 @@ const ChannelInfoEnableCalls = ({channelId, enabled}: Props) => { const [tryOnPress, msgPostfix] = useTryCallsFunction(toggleCalls); - const disableText = formatMessage({id: 'mobile.calls_disable', defaultMessage: 'Disable Calls'}); - const enableText = formatMessage({id: 'mobile.calls_enable', defaultMessage: 'Enable Calls'}); + const disableText = formatMessage({id: 'mobile.calls_disable', defaultMessage: 'Disable calls'}); + const enableText = formatMessage({id: 'mobile.calls_enable', defaultMessage: 'Enable calls'}); return ( (null); + const [talkingMessage, setTalkingMessage] = useState(''); const isCurrentCall = Boolean(currentCall); const handleVoiceOn = (data: VoiceEventData) => { @@ -113,6 +114,20 @@ const CurrentCallBar = ({ }; }, [isCurrentCall]); + useEffect(() => { + if (speaker) { + setTalkingMessage(formatMessage({ + id: 'mobile.calls_name_is_talking', + defaultMessage: '{name} is talking', + }, {name: displayUsername(userModelsDict[speaker], teammateNameDisplay)})); + } else { + setTalkingMessage(formatMessage({ + id: 'mobile.calls_noone_talking', + defaultMessage: 'No one is talking', + })); + } + }, [speaker, setTalkingMessage]); + const goToCallScreen = useCallback(() => { const options: Options = { layout: { @@ -142,6 +157,7 @@ const CurrentCallBar = ({ }; const style = getStyleSheet(theme); + return ( @@ -151,13 +167,8 @@ const CurrentCallBar = ({ serverUrl={currentCall?.serverUrl || ''} /> - - {speaker && `${displayUsername(userModelsDict[speaker], teammateNameDisplay)} is talking`} - {!speaker && 'No one is talking'} - - - {`~${displayName}`} - + {talkingMessage} + {`~${displayName}`} - {'Join Call'} + void) => { }); const message = intl.formatMessage({ id: 'mobile.calls_not_available_msg', - defaultMessage: 'Please contact your system administrator to enable the feature.', + defaultMessage: 'Please contact your System Admin to enable the feature.', }); const ok = intl.formatMessage({ id: 'mobile.calls_ok', diff --git a/app/products/calls/screens/call_screen/call_screen.tsx b/app/products/calls/screens/call_screen/call_screen.tsx index 4cb854cbdf..f14816abdc 100644 --- a/app/products/calls/screens/call_screen/call_screen.tsx +++ b/app/products/calls/screens/call_screen/call_screen.tsx @@ -33,6 +33,7 @@ import UnraisedHandIcon from '@calls/icons/unraised_hand_icon'; import {CallParticipant, CurrentCall, VoiceEventData} from '@calls/types/calls'; import {sortParticipants} from '@calls/utils'; import CompassIcon from '@components/compass_icon'; +import FormattedText from '@components/formatted_text'; import SlideUpPanelItem, {ITEM_HEIGHT} from '@components/slide_up_panel_item'; import {WebsocketEvents, Screens} from '@constants'; import {useTheme} from '@context/theme'; @@ -343,7 +344,7 @@ const CallScreen = ({componentId, currentCall, participantsDict, teammateNameDis ); @@ -391,9 +392,12 @@ const CallScreen = ({componentId, currentCall, participantsDict, teammateNameDis streamURL={currentCall.screenShareURL} style={style.screenShareImage} /> - - {`You are viewing ${displayUsername(participantsDict[currentCall.screenOn].userModel, teammateNameDisplay)}'s screen`} - + ); } @@ -429,7 +433,9 @@ const CallScreen = ({componentId, currentCall, participantsDict, teammateNameDis /> {displayUsername(user.userModel, teammateNameDisplay)} - {user.id === myParticipant.id && ' (you)'} + {user.id === myParticipant.id && + ` ${intl.formatMessage({id: 'mobile.calls_you', defaultMessage: '(you)'})}` + } ); @@ -440,6 +446,30 @@ const CallScreen = ({componentId, currentCall, participantsDict, teammateNameDis } const HandIcon = myParticipant.raisedHand ? UnraisedHandIcon : RaisedHandIcon; + const LowerHandText = ( + ); + const RaiseHandText = ( + ); + const MuteText = ( + ); + const UnmuteText = ( + ); return ( @@ -476,10 +506,7 @@ const CallScreen = ({componentId, currentCall, participantsDict, teammateNameDis size={24} style={style.muteIcon} /> - {myParticipant.muted && - {'Unmute'}} - {!myParticipant.muted && - {'Mute'}} + {myParticipant.muted ? UnmuteText : MuteText} } - {'Leave'} + - {'Speaker'} + - - {myParticipant.raisedHand ? 'Lower hand' : 'Raise hand'} - + {myParticipant.raisedHand ? LowerHandText : RaiseHandText} - {'More'} + /> {isLandscape && - {myParticipant.muted && - {'Unmute'}} - {!myParticipant.muted && - {'Mute'}} + {myParticipant.muted ? UnmuteText : MuteText} } diff --git a/app/utils/file/file_picker/index.ts b/app/utils/file/file_picker/index.ts index 692dbef1b3..dc424017e7 100644 --- a/app/utils/file/file_picker/index.ts +++ b/app/utils/file/file_picker/index.ts @@ -45,7 +45,7 @@ export default class FilePickerUtil { text: formatMessage({ id: 'mobile.camera_photo_permission_denied_description', defaultMessage: - 'Take photos and upload them to your server or save them to your device. Open Settings to grant {applicationName} Read and Write access to your camera.', + 'Take photos and upload them to your server or save them to your device. Open Settings to grant {applicationName} read and write access to your camera.', }), }, storage: { diff --git a/assets/base/i18n/en.json b/assets/base/i18n/en.json index 6610349a48..2251c57a4e 100644 --- a/assets/base/i18n/en.json +++ b/assets/base/i18n/en.json @@ -46,7 +46,6 @@ "apps.error.form.submit.pretext": "There has been an error submitting the modal. Contact the app developer. Details: {details}", "apps.error.lookup.error_preparing_request": "Error preparing lookup request: {errorMessage}", "apps.error.malformed_binding": "This binding is not properly formed. Contact the App developer.", - "apps.error.network.no_server": "Can’t find this server. Check spelling and URL format.", "apps.error.parser": "Parsing error: {error}", "apps.error.parser.empty_value": "Empty values are not allowed.", "apps.error.parser.execute_non_leaf": "You must select a subcommand.", @@ -348,8 +347,6 @@ "mentions.empty.paragraph": "You'll see messages here when someone mentions you or uses terms you're monitoring.", "mentions.empty.title": "No Mentions yet", "mobile.about.appVersion": "App Version: {version} (Build {number})", - "mobile.about.serverVersion": "Server Version: {version} (Build {number})", - "mobile.about.serverVersionNoBuild": "Server Version: {version}", "mobile.account.settings.save": "Save", "mobile.action_menu.select": "Select an option", "mobile.add_team.create_team": "Create a new team", @@ -357,26 +354,44 @@ "mobile.android.back_handler_exit": "Press back again to exit", "mobile.android.photos_permission_denied_description": "Upload photos to your server or save them to your device. Open Settings to grant {applicationName} Read and Write access to your photo library.", "mobile.android.photos_permission_denied_title": "{applicationName} would like to access your photos", + "mobile.calls_call_ended": "Call ended", "mobile.calls_call_screen": "Call", - "mobile.calls_disable": "Disable Calls", - "mobile.calls_enable": "Enable Calls", + "mobile.calls_chat_thread": "Chat thread", + "mobile.calls_current_call": "Current call", + "mobile.calls_disable": "Disable calls", + "mobile.calls_enable": "Enable calls", "mobile.calls_end_call_title": "End call", "mobile.calls_end_msg_channel": "Are you sure you want to end a call with {numParticipants} participants in {displayName}?", + "mobile.calls_end_msg_channel_default": "Are you sure you want to end the call?", "mobile.calls_end_msg_dm": "Are you sure you want to end a call with {displayName}?", - "mobile.calls_end_permission_msg": "You do not have permission to end the call. Please ask the call creator to end the call.", + "mobile.calls_end_permission_msg": "You don't have permission to end the call. Please ask the call creator to end the call.", "mobile.calls_end_permission_title": "Error", + "mobile.calls_ended_at": "Ended at", "mobile.calls_error_message": "Error: {error}", - "mobile.calls_error_permissions": "no permissions to microphone, unable to start call", + "mobile.calls_error_permissions": "No permissions to microphone, unable to start call", "mobile.calls_error_title": "Error", - "mobile.calls_join_call": "Join Call", - "mobile.calls_leave_call": "Leave Call", - "mobile.calls_not_available_msg": "Please contact your system administrator to enable the feature.", + "mobile.calls_join_call": "Join call", + "mobile.calls_lasted": "Lasted {duration}", + "mobile.calls_leave": "Leave", + "mobile.calls_leave_call": "Leave call", + "mobile.calls_lower_hand": "Lower hand", + "mobile.calls_more": "More", + "mobile.calls_mute": "Mute", + "mobile.calls_name_is_talking": "{name} is talking", + "mobile.calls_name_started_call": "{name} started a call", + "mobile.calls_noone_talking": "No one is talking", + "mobile.calls_not_available_msg": "Please contact your System Admin to enable the feature.", "mobile.calls_not_available_option": "(Not Available)", "mobile.calls_not_available_title": "Calls is not enabled", "mobile.calls_ok": "OK", + "mobile.calls_raise_hand": "Raise hand", "mobile.calls_see_logs": "see server logs", + "mobile.calls_speaker": "Speaker", "mobile.calls_start_call": "Start Call", - "mobile.camera_photo_permission_denied_description": "Take photos and upload them to your server or save them to your device. Open Settings to grant {applicationName} Read and Write access to your camera.", + "mobile.calls_unmute": "Unmute", + "mobile.calls_viewing_screen": "You are viewing {name}'s screen", + "mobile.calls_you": "(you)", + "mobile.camera_photo_permission_denied_description": "Take photos and upload them to your server or save them to your device. Open Settings to grant {applicationName} read and write access to your camera.", "mobile.camera_photo_permission_denied_title": "{applicationName} would like to access your camera", "mobile.channel_info.alertNo": "No", "mobile.channel_info.alertYes": "Yes",