Skip to content

Commit

Permalink
ui: Remove "?" from confirmation-dialog titles
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe authored and gnprice committed Aug 31, 2022
1 parent 8724759 commit f5e8fc0
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/account-info/ProfileScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function LogoutButton(props: {||}) {
onPress={() => {
showConfirmationDialog({
destructive: true,
title: 'Log out?',
title: 'Log out',
message: {
text: 'This will log out {email} on {realmUrl} from the mobile app on this device.',
values: { email: identity.email, realmUrl: identity.realm.toString() },
Expand Down
2 changes: 1 addition & 1 deletion src/account/AccountPickScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function AccountPickScreen(props: Props): Node {
const { realm, email } = accounts[index];
showConfirmationDialog({
destructive: true,
title: 'Remove account?',
title: 'Remove account',
message: {
text: 'This will make the mobile app on this device forget {email} on {realmUrl}.',
values: { realmUrl: realm.toString(), email },
Expand Down
2 changes: 1 addition & 1 deletion src/streams/EditStreamCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export default function EditStreamCard(props: Props): Node {

showConfirmationDialog({
destructive: true,
title: 'Discard changes?',
title: 'Discard changes',
message: 'You have unsaved changes. Leave without saving?',
onPressConfirm: () => navigation.dispatch(e.data.action),
_,
Expand Down
7 changes: 7 additions & 0 deletions src/utils/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ export const showErrorAlert = (

export const showConfirmationDialog = (args: {|
+destructive?: true,

/**
* As in the web app, very brief, sentence case, no question mark
*
* E.g., "Delete topic".
*/
+title: LocalizableText,

+message: LocalizableText,
+learnMoreButton?: LearnMoreButton,
+onPressConfirm: () => void,
Expand Down
5 changes: 2 additions & 3 deletions static/translations/messages_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Confirm": "Confirm",
"Configure permissions": "Configure permissions",
"You": "You",
"Discard changes?": "Discard changes?",
"Discard changes": "Discard changes",
"You have unsaved changes. Leave without saving?": "You have unsaved changes. Leave without saving?",
"Who can access the stream?": "Who can access the stream?",
"Cannot apply requested settings": "Cannot apply requested settings",
Expand Down Expand Up @@ -84,7 +84,6 @@
"Enter": "Enter",
"Switch account": "Switch account",
"Log out": "Log out",
"Log out?": "Log out?",
"This will log out {email} on {realmUrl} from the mobile app on this device.": "This will log out {email} on {realmUrl} from the mobile app on this device.",
"Add new account": "Add new account",
"Search messages": "Search messages",
Expand Down Expand Up @@ -318,7 +317,7 @@
"Working remotely": "Working remotely",
"This message was hidden because it is from a user you have muted. Long-press to view.": "This message was hidden because it is from a user you have muted. Long-press to view.",
"Signed out": "Signed out",
"Remove account?": "Remove account?",
"Remove account": "Remove account",
"This will make the mobile app on this device forget {email} on {realmUrl}.": "This will make the mobile app on this device forget {email} on {realmUrl}.",
"Oops! Something went wrong.": "Oops! Something went wrong.",
"Uploading {fileName}...": "Uploading {fileName}...",
Expand Down

0 comments on commit f5e8fc0

Please sign in to comment.