1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Mobile: Share screen: Update headings and labels for consistency with desktop (#10395)

This commit is contained in:
Henry Heino 2024-05-07 02:54:31 -07:00 committed by GitHub
parent 4862c2e8ea
commit f764e76f01
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 6 deletions

View File

@ -64,7 +64,7 @@ const AcceptedShareItem: React.FC<Props> = props => {
} catch (error) {
logger.error('Failed to leave share', error);
await shim.showMessageBox(
_('Failed to leave share. Please verify that Joplin is connected to the internet and able to sync.\nError: %s', error),
_('Error: %s', error),
{ buttons: [_('OK')] },
);
} finally {
@ -87,7 +87,7 @@ const AcceptedShareItem: React.FC<Props> = props => {
onPress={onLeaveShare}
disabled={props.processing || leaving || hasLeft}
loading={leaving || !folderTitle}
>{_('Leave share')}</Button>
>{_('Leave notebook')}</Button>
</Card.Actions>
</Card>;
};

View File

@ -110,6 +110,6 @@ describe('ShareManager', () => {
render(<ShareManagerWrapper shareInvitations={shares} store={store}/>);
// Should now allow leaving
expect(await screen.findByRole('button', { name: 'Leave share' })).toBeVisible();
expect(await screen.findByRole('button', { name: 'Leave notebook' })).toBeVisible();
});
});

View File

@ -89,13 +89,13 @@ export const ShareManagerComponent: React.FC<Props> = props => {
const renderNoIncomingShares = () => {
if (incomingShareComponents.length > 0) return null;
return <Text key='no-shares' style={styles.noSharesText}>{_('No incoming shares')}</Text>;
return <Text key='no-shares' style={styles.noSharesText}>{_('No new invitations')}</Text>;
};
const renderAcceptedShares = () => {
if (acceptedShareComponents.length === 0) return null;
return <>
<Text style={styles.header}>{_('Accepted shares')}</Text>
<Text style={styles.header}>{_('Accepted invitations')}</Text>
<View style={styles.shareListContainer}>
{acceptedShareComponents}
</View>
@ -117,7 +117,7 @@ export const ShareManagerComponent: React.FC<Props> = props => {
}
testID='refreshControl'
>
<Text style={styles.header}>{_('Incoming shares')}</Text>
<Text style={styles.header}>{_('New invitations')}</Text>
<View style={styles.shareListContainer}>
{renderNoIncomingShares()}
{incomingShareComponents}