Skip to content

Commit

Permalink
chore: update translation msg
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictb committed Jul 17, 2024
1 parent 13a3243 commit 4e43547
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
7 changes: 5 additions & 2 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2063,8 +2063,11 @@ export default {
appliedOnExport: 'Not imported into Expensify, applied on export',
shareNote: {
header: 'Easily share your workspace with other members.',
content:
'Share this QR code or copy the link below to make it easy for members to request access to your workspace. All requests to join the workspace will show up in the #admins room for your review.',
content: {
firstPart:
'Share this QR code or copy the link below to make it easy for members to request access to your workspace. All requests to join the workspace will show up in the',
secondPart: 'room for your review.',
},
},
createNewConnection: 'Create new connection',
reuseExistingConnection: 'Reuse existing connection',
Expand Down
7 changes: 5 additions & 2 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2098,8 +2098,11 @@ export default {
appliedOnExport: 'No se importa en Expensify, se aplica en la exportación',
shareNote: {
header: 'Comparte fácilmente tu espacio de trabajo con otros miembros.',
content:
'Comparte este código QR o copia el enlace de abajo para facilitar que los miembros soliciten acceso a tu espacio de trabajo. Todas las solicitudes para unirse al espacio de trabajo aparecerán en la sala #admins para tu revisión.',
content: {
firstPart:
'Comparte este código QR o copia el enlace de abajo para facilitar que los miembros soliciten acceso a tu espacio de trabajo. Todas las solicitudes para unirse al espacio de trabajo aparecerán en la sala',
secondPart: 'para tu revisión.',
},
},
createNewConnection: 'Crear una nueva conexión',
reuseExistingConnection: 'Reutilizar la conexión existente',
Expand Down
22 changes: 5 additions & 17 deletions src/pages/workspace/WorkspaceProfileSharePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ import AccessOrNotFoundWrapper from './AccessOrNotFoundWrapper';
import withPolicy from './withPolicy';
import type {WithPolicyProps} from './withPolicy';

const adminsRoomMentionText = '#admins';

function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
const themeStyles = useThemeStyles();
const {translate} = useLocalize();
Expand All @@ -49,16 +47,6 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
return ReportUtils.getRoom(CONST.REPORT.CHAT_TYPE.POLICY_ADMINS, policy?.id);
}, [policy?.id]);

const shareNote = useMemo(() => {
const header = translate('workspace.common.shareNote.header');
const content = translate('workspace.common.shareNote.content');
const adminRoomMentionIndex = content.indexOf(adminsRoomMentionText);
return {
header,
contentParts: [content.slice(0, adminRoomMentionIndex), content.slice(adminRoomMentionIndex + adminsRoomMentionText.length)],
};
}, [translate]);

return (
<AccessOrNotFoundWrapper
policyID={id}
Expand All @@ -75,11 +63,11 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
<ScrollView style={[themeStyles.flex1, themeStyles.pt3]}>
<View style={[themeStyles.flex1, isSmallScreenWidth ? themeStyles.workspaceSectionMobile : themeStyles.workspaceSection]}>
<View style={[themeStyles.mh5]}>
<Text style={[themeStyles.textHeadlineH1, themeStyles.mb2]}>{shareNote.header}</Text>
<Text style={[themeStyles.textHeadlineH1, themeStyles.mb2]}>{translate('workspace.common.shareNote.header')}</Text>
</View>
<View style={[themeStyles.mh5, themeStyles.mb9]}>
<Text style={[themeStyles.textNormal]}>
{shareNote.contentParts[0]}
{translate('workspace.common.shareNote.content.firstPart')}{' '}
<TextLink
style={themeStyles.link}
onPress={() => {
Expand All @@ -89,9 +77,9 @@ function WorkspaceProfileSharePage({policy}: WithPolicyProps) {
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(adminRoom.reportID));
}}
>
#admins
</TextLink>
{shareNote.contentParts[1]}
{CONST.REPORT.WORKSPACE_CHAT_ROOMS.ADMINS}
</TextLink>{' '}
{translate('workspace.common.shareNote.content.secondPart')}
</Text>
</View>

Expand Down

0 comments on commit 4e43547

Please sign in to comment.