Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({

if (!identifier) {
if (privateUsername?.length > 0) {
application.alerts.alert(c('Error').t`Unable to compute private username.`).catch(console.error)
application.alerts.alert(c('B1.Account.SignIn.Error').t`Unable to compute private username.`).catch(console.error)
}
return
}
Expand Down Expand Up @@ -113,7 +113,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
onClick={toggleShowAdvanced}
>
<div className="flex items-center">
{c('Action').t`Advanced options`}
{c('B1.Account.SignIn.Action').t`Advanced options`}
<Icon type="chevron-down" className="ml-1 text-passive-1" />
</div>
</button>
Expand All @@ -125,7 +125,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
<div className="mb-1 flex items-center justify-between">
<Checkbox
name="private-workspace"
label={c('Option').t`Private username mode`}
label={c('B1.Account.SignIn.Option').t`Private username mode`}
checked={isPrivateUsername}
disabled={disabled || isRecoveryCodes}
onChange={handleIsPrivateUsernameChange}
Expand All @@ -134,7 +134,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
href="https://standardnotes.com/help/80"
target="_blank"
rel="noopener noreferrer"
title={c('Action').t`Learn more`}
title={c('B1.Account.SignIn.Action').t`Learn more`}
>
<Icon type="info" className="text-neutral" />
</a>
Expand All @@ -146,7 +146,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
className={{ container: 'mb-2' }}
left={[<Icon type="account-circle" className="text-neutral" />]}
type="text"
placeholder={c('Label').t`Username`}
placeholder={c('B1.Account.SignIn.Label').t`Username`}
value={privateUsername}
onChange={handlePrivateUsernameNameChange}
disabled={disabled || isRecoveryCodes}
Expand All @@ -160,7 +160,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
<div className="mb-1 flex items-center justify-between">
<Checkbox
name="use-strict-signin"
label={c('Option').t`Use strict sign-in`}
label={c('B1.Account.SignIn.Option').t`Use strict sign-in`}
checked={isStrictSignin}
disabled={disabled || isRecoveryCodes}
onChange={handleStrictSigninChange}
Expand All @@ -169,7 +169,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
href="https://standardnotes.com/help/security"
target="_blank"
rel="noopener noreferrer"
title={c('Action').t`Learn more`}
title={c('B1.Account.SignIn.Action').t`Learn more`}
>
<Icon type="info" className="text-neutral" />
</a>
Expand All @@ -180,7 +180,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
<div className="mb-1 flex items-center justify-between">
<Checkbox
name="recovery-codes"
label={c('Option').t`Use recovery code`}
label={c('B1.Account.SignIn.Option').t`Use recovery code`}
checked={isRecoveryCodes}
disabled={disabled}
onChange={handleIsRecoveryCodesChange}
Expand All @@ -194,7 +194,7 @@ const AdvancedOptions: FunctionComponent<Props> = ({
className={{ container: 'mb-2' }}
left={[<Icon type="security" className="text-neutral" />]}
type="text"
placeholder={c('Label').t`Recovery code`}
placeholder={c('B1.Account.SignIn.Label').t`Recovery code`}
value={recoveryCodes}
onChange={handleRecoveryCodesChange}
disabled={disabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ const ConfirmNoMergeDialog: FunctionComponent<Props> = ({ onClose, onConfirm })
return (
<AlertDialog closeDialog={onClose}>
<div className="flex items-center justify-between text-lg font-bold">
{c('Title').t`Delete local data?`}
{c('B1.Account.SignIn.Title').t`Delete local data?`}
<button className="rounded p-1 font-bold hover:bg-contrast" onClick={onClose}>
<Icon type="close" />
</button>
</div>
<div className="sk-panel-row">
<div>
<p className="text-base text-foreground lg:text-sm">
{c('Info')
{c('B1.Account.SignIn.Info')
.t`You have chosen not to merge your local data. If you proceed, your local notes and tags will be permanently deleted and replaced with data from your account. This action cannot be undone.`}
</p>
<p className="mt-2 text-base font-semibold text-danger lg:text-sm">
{c('Info').t`Are you sure you want to continue without merging?`}
{c('B1.Account.SignIn.Info').t`Are you sure you want to continue without merging?`}
</p>
</div>
</div>
<div className="mt-4 flex justify-end gap-2">
<Button onClick={onClose}>{c('Action').t`Cancel`}</Button>
<Button onClick={onClose}>{c('B1.Account.SignIn.Action').t`Cancel`}</Button>
<Button primary colorStyle="danger" onClick={onConfirm}>
{c('Action').t`Delete Local Data and Continue`}
{c('B1.Account.SignIn.Action').t`Delete Local Data and Continue`}
</Button>
</div>
</AlertDialog>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,25 +163,15 @@ const ConfirmPassword: FunctionComponent<Props> = ({ setMenuPane, email, passwor
checkIfCaptchaRequiredAndRegister()
}, [checkIfCaptchaRequiredAndRegister])

const noPasswordResetOption = (
<span className="text-danger">{c('B1.Account.SignIn.Info').t`Standard Notes does not have a password reset option`}</span>
)

const confirmPasswordForm = (
<>
<div className="mb-3 px-3 text-sm">
{
// translator: Full sentence: "Because your notes are encrypted using your password, Standard Notes does not have a password reset option. If you forget your password, you will permanently lose access to your data."
c('Info').t`Because your notes are encrypted using your password,`
}{' '}
{
<span className="text-danger">
{
// translator: Full sentence: "Because your notes are encrypted using your password, Standard Notes does not have a password reset option. If you forget your password, you will permanently lose access to your data."
c('Info').t`Standard Notes does not have a password reset option`
}
</span>
}
{
// translator: Full sentence: "Because your notes are encrypted using your password, Standard Notes does not have a password reset option. If you forget your password, you will permanently lose access to your data."
c('Info').t`. If you forget your password, you will permanently lose access to your data.`
}
{c('B1.Account.SignIn.Info')
.jt`Because your notes are encrypted using your password, ${noPasswordResetOption}. If you forget your password, you will permanently lose access to your data.`}
</div>
<form onSubmit={handleConfirmFormSubmit} className="mb-1 px-3">
{!isRegistering && (
Expand All @@ -191,7 +181,7 @@ const ConfirmPassword: FunctionComponent<Props> = ({ setMenuPane, email, passwor
left={[<Icon type="password" className="text-neutral" />]}
onChange={handlePasswordChange}
onKeyDown={handleKeyDown}
placeholder={c('Label').t`Confirm password`}
placeholder={c('B1.Account.SignIn.Label').t`Confirm password`}
ref={passwordInputRef}
value={confirmPassword}
/>
Expand All @@ -201,13 +191,13 @@ const ConfirmPassword: FunctionComponent<Props> = ({ setMenuPane, email, passwor
primary
fullWidth
className="mb-3 mt-1"
label={isRegistering ? c('Action').t`Creating account...` : c('Action').t`Create account & sign in`}
label={isRegistering ? c('B1.Account.SignIn.Action').t`Creating account...` : c('B1.Account.SignIn.Action').t`Create account & sign in`}
onClick={handleConfirmFormSubmit}
disabled={isRegistering}
/>
<Checkbox
name="is-ephemeral"
label={c('Option').t`Stay signed in`}
label={c('B1.Account.SignIn.Option').t`Stay signed in`}
checked={!isEphemeral}
onChange={handleEphemeralChange}
disabled={isRegistering}
Expand All @@ -229,14 +219,14 @@ const ConfirmPassword: FunctionComponent<Props> = ({ setMenuPane, email, passwor
<div className="mb-3 mt-1 flex items-center px-3">
<IconButton
icon="arrow-left"
title={c('Action').t`Go back`}
title={c('B1.Account.SignIn.Action').t`Go back`}
className="mr-2 flex p-0 text-neutral"
onClick={handleGoBack}
focusable={true}
disabled={isRegistering}
/>
<div className="text-base font-bold">
{captchaURL ? c('Title').t`Human verification` : c('Title').t`Confirm password`}
{captchaURL ? c('B1.Account.SignIn.Title').t`Human verification` : c('B1.Account.SignIn.Title').t`Confirm password`}
</div>
</div>
{captchaURL ? <div className="p-[10px]">{captchaIframe}</div> : confirmPasswordForm}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,12 @@ const CreateAccount: FunctionComponent<Props> = ({ setMenuPane, email, setEmail,
<div className="mb-3 mt-1 flex items-center px-3">
<IconButton
icon="arrow-left"
title={c('Action').t`Go back`}
title={c('B1.Account.SignIn.Action').t`Go back`}
className="mr-2 flex p-0 text-neutral"
onClick={handleClose}
focusable={true}
/>
<div className="text-base font-bold">{c('Title').t`Create account`}</div>
<div className="text-base font-bold">{c('B1.Account.SignIn.Title').t`Create account`}</div>
</div>
<form onSubmit={handleRegisterFormSubmit} className="mb-1 px-3">
<DecoratedInput
Expand All @@ -116,7 +116,7 @@ const CreateAccount: FunctionComponent<Props> = ({ setMenuPane, email, setEmail,
left={[<Icon type="email" className="text-neutral" />]}
onChange={handleEmailChange}
onKeyDown={handleKeyDown}
placeholder={c('Label').t`Email`}
placeholder={c('B1.Account.SignIn.Label').t`Email`}
ref={emailInputRef}
type="email"
value={email}
Expand All @@ -127,13 +127,13 @@ const CreateAccount: FunctionComponent<Props> = ({ setMenuPane, email, setEmail,
left={[<Icon type="password" className="text-neutral" />]}
onChange={handlePasswordChange}
onKeyDown={handleKeyDown}
placeholder={c('Label').t`Password`}
placeholder={c('B1.Account.SignIn.Label').t`Password`}
ref={passwordInputRef}
value={password}
/>
<Button
className="mt-1"
label={c('Action').t`Next`}
label={c('B1.Account.SignIn.Action').t`Next`}
primary
onClick={handleRegisterFormSubmit}
fullWidth={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
}, [application])

const openEmail = useCallback(() => {
const subject = c('MailtoSubject').t`Standard Notes Feedback`
const subject = c('B1.Account.Session.MailtoSubject').t`Standard Notes Feedback`

const body = c('MailtoBody').t`App Version: ${application.version}`
const body = c('B1.Account.Session.MailtoBody').t`App Version: ${application.version}`

application.device.openUrl(
`mailto:help@standardnotes.com?subject=${encodeURIComponent(subject)}&body=${encodeURIComponent(body)}`,
Expand Down Expand Up @@ -103,29 +103,29 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
return (
<>
<div className="mb-1 mt-1 hidden items-center justify-between px-4 md:flex md:px-3">
<div className="text-lg font-bold lg:text-base">{c('Title').t`Account`}</div>
<div className="text-lg font-bold lg:text-base">{c('B1.Account.Session.Title').t`Account`}</div>
<div className="flex cursor-pointer" onClick={closeMenu}>
<Icon type="close" className="text-neutral" />
</div>
</div>
{user ? (
<>
<div className="mb-3 px-4 text-lg text-foreground md:px-3 lg:text-sm">
<div>{c('Info').t`You're signed in as:`}</div>
<div>{c('B1.Account.Session.Info').t`You're signed in as:`}</div>
<div className="wrap my-0.5 font-bold">{user.email}</div>
<span className="text-neutral">{application.getHost.execute().getValue()}</span>
</div>
<div className="mb-2 flex items-start justify-between px-4 text-mobile-menu-item md:px-3 md:text-tablet-menu-item lg:text-menu-item">
{isSyncingInProgress ? (
<div className="flex items-center font-semibold text-info">
<Spinner className="mr-2 h-5 w-5" />
{c('Status').t`Syncing...`}
{c('B1.Account.Session.Status').t`Syncing...`}
</div>
) : (
<div className="flex items-start">
<Icon type="check-circle" className={`mr-2 text-success ${MenuItemIconSize}`} />
<div>
<div className="font-semibold text-success">{c('Label').t`Last synced:`}</div>
<div className="font-semibold text-success">{c('B1.Account.Session.Label').t`Last synced:`}</div>
<div className="text-text">{lastSyncDate}</div>
</div>
</div>
Expand All @@ -139,12 +139,12 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
<>
<div className="mb-1 px-4 md:px-3">
<div className="mb-3 text-base text-foreground lg:text-sm">
{c('Info')
{c('B1.Account.Session.Info')
.t`You’re offline. Sign in to sync your notes and preferences across all your devices and enable end-to-end encryption.`}
</div>
<div className="flex items-center text-passive-1">
<Icon type="cloud-off" className={`mr-2 ${MenuItemIconSize}`} />
<span className="text-lg font-semibold lg:text-sm">{c('Status').t`Offline`}</span>
<span className="text-lg font-semibold lg:text-sm">{c('B1.Account.Session.Status').t`Offline`}</span>
</div>
</div>
</>
Expand All @@ -161,17 +161,17 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
{user ? (
<MenuItem onClick={openPreferences}>
<Icon type="user" className={iconClassName} />
{c('Action').t`Account settings`}
{c('B1.Account.Session.Action').t`Account settings`}
</MenuItem>
) : (
<>
<MenuItem onClick={activateRegisterPane}>
<Icon type="user" className={iconClassName} />
{c('Action').t`Create free account`}
{c('B1.Account.Session.Action').t`Create free account`}
</MenuItem>
<MenuItem onClick={activateSignInPane}>
<Icon type="signIn" className={iconClassName} />
{c('Action').t`Sign in`}
{c('B1.Account.Session.Action').t`Sign in`}
</MenuItem>
</>
)}
Expand All @@ -182,18 +182,18 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
}}
>
<Icon type="archive" className={iconClassName} />
{c('Action').t`Import`}
{c('B1.Account.Session.Action').t`Import`}
</MenuItem>
{application.isNativeMobileWeb() && (
<MenuItem onClick={openEmail}>
<Icon type="email-filled" className={iconClassName} />
{c('Action').t`Email us`}
{c('B1.Account.Session.Action').t`Email us`}
</MenuItem>
)}
<MenuItem className="justify-between" onClick={openHelp}>
<div className="flex items-center">
<Icon type="help" className={iconClassName} />
{c('Action').t`Help & feedback`}
{c('B1.Account.Session.Action').t`Help & feedback`}
</div>
<span className="text-neutral">v{application.version}</span>
</MenuItem>
Expand All @@ -205,7 +205,7 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
}}
>
<Icon type="keyboard" className={iconClassName} />
{c('Action').t`Keyboard shortcuts`}
{c('B1.Account.Session.Action').t`Keyboard shortcuts`}
{keyboardShortcutsHelpShortcut && (
<KeyboardShortcutIndicator shortcut={keyboardShortcutsHelpShortcut} className="ml-auto" />
)}
Expand All @@ -216,7 +216,7 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
}}
>
<Icon type="info" className={iconClassName} />
{c('Action').t`Command palette`}
{c('B1.Account.Session.Action').t`Command palette`}
{commandPaletteShortcut && (
<KeyboardShortcutIndicator shortcut={commandPaletteShortcut} className="ml-auto" />
)}
Expand All @@ -228,7 +228,7 @@ const GeneralAccountMenu: FunctionComponent<Props> = ({ setMenuPane, closeMenu,
<MenuSection>
<MenuItem onClick={signOut}>
<Icon type="signOut" className={iconClassName} />
{c('Action').t`Sign out workspace`}
{c('B1.Account.Session.Action').t`Sign out workspace`}
</MenuItem>
</MenuSection>
) : null}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Icon from '@/Components/Icon/Icon'
import StyledTooltip from '@/Components/StyledTooltip/StyledTooltip'
import { ChangeEventHandler, FunctionComponent } from 'react'
import { c } from 'ttag'
import { c, msgid } from 'ttag'

type Props = {
checked: boolean
Expand All @@ -22,9 +22,15 @@ const MergeLocalDataCheckbox: FunctionComponent<Props> = ({ checked, onChange, d
onChange={onChange}
disabled={disabled}
/>
<span className="text-danger">{c('Option').t`Merge local data (${notesAndTagsCount} notes and tags)`}</span>
<span className="text-danger">
{c('B1.Account.SignIn.Option').ngettext(
msgid`Merge local data (${notesAndTagsCount} item)`,
`Merge local data (${notesAndTagsCount} items)`,
notesAndTagsCount,
)}
</span>
<StyledTooltip
label={c('Info')
label={c('B1.Account.SignIn.Info')
.t`If unchecked, your local notes and tags will be permanently deleted and replaced with data from your account.`}
showOnMobile
className="!z-modal !max-w-[30ch] whitespace-normal"
Expand Down
Loading
Loading