diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 46b2cde2f0..6ced6b0d1c 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -42,7 +42,7 @@ "Announcement": "Announcement", "announcement": "announcement", "App_users_are_not_allowed_to_log_in_directly": "App users are not allowed to log in directly.", - "Apply_Your_Certificate": "Apply your certificate", + "Apply_Certificate": "Apply certificate", "ARCHIVE": "ARCHIVE", "archive": "archive", "are_typing": "are typing", @@ -213,7 +213,7 @@ "Discussions": "Discussions", "Display": "Display", "Displays_action_text": "Displays action text", - "Do_you_have_a_certificate": "Do you have a certificate?", + "Do_you_have_a_certificate": "Do you have a certificate for this workspace?", "Do_you_have_an_account": "Do you have an account?", "Do_you_really_want_to_key_this_room_question_mark": "Do you really want to {{key}} this room?", "Documentation": "Documentation", @@ -243,6 +243,7 @@ "Edit_Invite": "Edit invite", "Edit_Status": "Edit status", "Email": "E-mail", + "email": "Email", "Email_Notification_Mode_All": "Every mention/DM", "Email_Notification_Mode_Disabled": "Disabled", "Empty": "Empty", @@ -264,7 +265,6 @@ "Enter_E2EE_Password": "Enter E2EE password", "Enter_E2EE_Password_description": "To access your encrypted channels and direct messages, enter your encryption password. This is not stored on the server, so you’ll need to use it on every device.", "Enter_the_code": "Enter the code we just emailed you.", - "Enter_workspace_URL": "Enter workspace URL", "Error_Download_file": "Error while downloading file", "Error_play_video": "There was an error while playing this video", "Error_uploading": "Error uploading", @@ -330,6 +330,7 @@ "Invalid_Email": "Invalid email", "Invalid_or_expired_invite_token": "Invalid or expired invite token", "Invalid_server_version": "The workspace you're trying to connect is using a version that's not supported by the app anymore: {{currentVersion}}.\n\nWe require version {{minVersion}}", + "Invalid_workspace_URL": "Invalid workspace URL", "Invisible": "Invisible", "Invite_Link": "Invite link", "Invite_user_to_join_channel": "Invite one user to join this channel", @@ -488,7 +489,7 @@ "no-videoconf-provider-app-body": "Conference call apps can be installed in the Rocket.Chat Marketplace by a workspace admin.", "no-videoconf-provider-app-header": "Conference call not available", "Not_in_channel": "Not in channel", - "Not_RC_Server": "This is not a Rocket.Chat workspace.\n{{contact}}", + "Not_RC_Server": "Contact your workspace admin or search your email inbox for a Rocket.Chat workspace invite.", "Nothing": "Nothing", "Nothing_to_save": "Nothing to save!", "Notification_delay": "Notification delay", @@ -819,8 +820,8 @@ "Without_Servers": "Without workspaces", "Workspace_consumption": "Workspace consumption", "Workspace_consumption_description": "There’s a set amount of push notifications per month", - "Workspace_URL_Example": "Ex. your-company.rocket.chat", - "Workspaces": "Workspaces", + "Workspace_URL": "Workspace URL", + "Workspace_URL_Example": "open.rocket.chat", "Would_like_to_place_on_hold": "Would you like to place this chat on hold?", "Would_you_like_to_return_the_inquiry": "Would you like to return the inquiry?", "Write_External_Permission": "Gallery permission", @@ -854,5 +855,4 @@ "Your_invite_link_will_never_expire": "Your invite link will never expire.", "Your_password_is": "Your password is", "Your_push_was_sent_to_s_devices": "Your push was sent to {{s}} devices", - "Your_workspace": "Your workspace" } \ No newline at end of file diff --git a/app/lib/methods/getServerInfo.ts b/app/lib/methods/getServerInfo.ts index 7b790c7f6d..6b7cc0f7d8 100644 --- a/app/lib/methods/getServerInfo.ts +++ b/app/lib/methods/getServerInfo.ts @@ -52,7 +52,7 @@ export async function getServerInfo(server: string): Promise if (!serverInfo?.success) { return { success: false, - message: I18n.t('Not_RC_Server', { contact: I18n.t('Contact_your_server_admin') }) + message: I18n.t('Not_RC_Server') }; } @@ -109,14 +109,14 @@ export async function getServerInfo(server: string): Promise } return { success: false, - message: e.message + message: I18n.t('Not_RC_Server') }; } } return { success: false, - message: I18n.t('Not_RC_Server', { contact: I18n.t('Contact_your_server_admin') }) + message: I18n.t('Not_RC_Server') }; } diff --git a/app/sagas/selectServer.ts b/app/sagas/selectServer.ts index 8433e72a64..fb5d49abdd 100644 --- a/app/sagas/selectServer.ts +++ b/app/sagas/selectServer.ts @@ -102,13 +102,13 @@ const getServerInfoSaga = function* getServerInfoSaga({ server, raiseError = tru const serverInfoResult = yield* call(getServerInfo, server); if (raiseError) { if (!serverInfoResult.success) { - Alert.alert(I18n.t('Oops'), serverInfoResult.message); + Alert.alert(I18n.t('Invalid_workspace_URL'), serverInfoResult.message); yield put(serverFailure()); return; } const websocketInfo = yield* call(Services.getWebsocketInfo, { server }); if (!websocketInfo.success) { - Alert.alert(I18n.t('Oops'), websocketInfo.message); + Alert.alert(I18n.t('Invalid_workspace_URL'), websocketInfo.message); yield put(serverFailure()); return; } diff --git a/app/static/images/logo_with_name.png b/app/static/images/logo_with_name.png new file mode 100644 index 0000000000..c799cd926d Binary files /dev/null and b/app/static/images/logo_with_name.png differ diff --git a/app/views/ForgotPasswordView.tsx b/app/views/ForgotPasswordView.tsx index 8acc69b849..4bbcb1c937 100644 --- a/app/views/ForgotPasswordView.tsx +++ b/app/views/ForgotPasswordView.tsx @@ -68,16 +68,19 @@ const ForgotPasswordView = (): React.ReactElement => { - {I18n.t('Forgot_password')} + {I18n.t('Reset_password')} + + + {I18n.t('email')} { isFetching, Accounts_RegistrationForm, Site_Name, + Site_Url, inviteLinkToken, error, failure @@ -65,6 +67,7 @@ const UserForm = () => { Accounts_PasswordPlaceholder: state.settings.Accounts_PasswordPlaceholder as string, Accounts_PasswordReset: state.settings.Accounts_PasswordReset as boolean, Site_Name: state.settings.Site_Name as string, + Site_Url: state.settings.Site_Url as string, inviteLinkToken: state.inviteLinks.token, failure: state.login.failure, error: state.login.error && state.login.error.data @@ -89,7 +92,7 @@ const UserForm = () => { }; const forgotPassword = () => { - navigation.navigate('ForgotPasswordView', { title: Site_Name }); + navigation.navigate('ForgotPasswordView', { title: new parse(Site_Url).hostname }); }; const submit = ({ password, user }: ISubmit) => { diff --git a/app/views/NewServerView/ServerInput/index.tsx b/app/views/NewServerView/ServerInput/index.tsx index 101447b02e..cd5e9acf57 100644 --- a/app/views/NewServerView/ServerInput/index.tsx +++ b/app/views/NewServerView/ServerInput/index.tsx @@ -51,7 +51,7 @@ const ServerInput = ({ return ( !connecting ? ( @@ -293,13 +280,13 @@ class NewServerView extends React.Component { const { certificate } = this.state; - const { theme, width, height, previousServer } = this.props; + const { theme, width, height, previousServer, connecting } = this.props; return ( @@ -311,16 +298,14 @@ class NewServerView extends React.Component {certificate ? I18n.t('Your_certificate') : I18n.t('Do_you_have_a_certificate')} - - - {certificate ?? I18n.t('Apply_Your_Certificate')} - - + title={certificate ?? I18n.t('Apply_Certificate')} + type='secondary' + disabled={connecting} + style={{ marginTop: verticalScale({ size: 16, height }), width: '100%' }} + /> ); }; @@ -328,7 +313,7 @@ class NewServerView extends React.Component @@ -337,38 +322,17 @@ class NewServerView extends React.Component - - Rocket.Chat - - - {I18n.t('Onboarding_subtitle')} + + {I18n.t('Add_server')} - {isIOS ? ( + {this.renderCertificatePicker()} + {isIOS && !previousServer ? ( <> ) : null} - {this.renderCertificatePicker()} ); } diff --git a/app/views/WorkspaceView/index.tsx b/app/views/WorkspaceView/index.tsx index 02cae0740e..483b690119 100644 --- a/app/views/WorkspaceView/index.tsx +++ b/app/views/WorkspaceView/index.tsx @@ -3,6 +3,7 @@ import { Text, View } from 'react-native'; import { useNavigation } from '@react-navigation/native'; import { StackNavigationProp } from '@react-navigation/stack'; import { CompositeNavigationProp } from '@react-navigation/core'; +import parse from 'url-parse'; import { OutsideModalParamList, OutsideParamList } from '../../stacks/types'; import I18n from '../../i18n'; @@ -51,9 +52,9 @@ const WorkspaceView = () => { useLayoutEffect(() => { navigation.setOptions({ - title: I18n.t('Your_workspace') + title: new parse(Site_Url).hostname }); - }, [navigation]); + }, [navigation, Site_Url]); const showRegistrationButton = !!( !Accounts_iframe_enabled &&