Mark more texts for localization (#2436)
This commit is contained in:
parent
592133db58
commit
aeeacd10d3
5 changed files with 49 additions and 38 deletions
|
|
@ -18,7 +18,8 @@ import {ScrollView} from './util'
|
|||
import {usePalette} from 'lib/hooks/usePalette'
|
||||
import {isWeb} from 'platform/detection'
|
||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||
import {Trans} from '@lingui/macro'
|
||||
import {Trans, msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {cleanError} from 'lib/strings/errors'
|
||||
import {useModalControls} from '#/state/modals'
|
||||
import {useInvitesState, useInvitesAPI} from '#/state/invites'
|
||||
|
|
@ -49,6 +50,7 @@ export function Component() {
|
|||
|
||||
export function Inner({invites}: {invites: InviteCodesQueryResponse}) {
|
||||
const pal = usePalette('default')
|
||||
const {_} = useLingui()
|
||||
const {closeModal} = useModalControls()
|
||||
const {isTabletOrDesktop} = useWebMediaQueries()
|
||||
|
||||
|
|
@ -75,7 +77,7 @@ export function Inner({invites}: {invites: InviteCodesQueryResponse}) {
|
|||
]}>
|
||||
<Button
|
||||
type="primary"
|
||||
label="Done"
|
||||
label={_(msg`Done`)}
|
||||
style={styles.btn}
|
||||
labelStyle={styles.btnLabel}
|
||||
onPress={onClose}
|
||||
|
|
@ -118,7 +120,7 @@ export function Inner({invites}: {invites: InviteCodesQueryResponse}) {
|
|||
<Button
|
||||
testID="closeBtn"
|
||||
type="primary"
|
||||
label="Done"
|
||||
label={_(msg`Done`)}
|
||||
style={styles.btn}
|
||||
labelStyle={styles.btnLabel}
|
||||
onPress={onClose}
|
||||
|
|
@ -140,15 +142,16 @@ function InviteCode({
|
|||
invites: InviteCodesQueryResponse
|
||||
}) {
|
||||
const pal = usePalette('default')
|
||||
const {_} = useLingui()
|
||||
const invitesState = useInvitesState()
|
||||
const {setInviteCopied} = useInvitesAPI()
|
||||
const uses = invite.uses
|
||||
|
||||
const onPress = React.useCallback(() => {
|
||||
Clipboard.setString(invite.code)
|
||||
Toast.show('Copied to clipboard')
|
||||
Toast.show(_(msg`Copied to clipboard`))
|
||||
setInviteCopied(invite.code)
|
||||
}, [setInviteCopied, invite])
|
||||
}, [setInviteCopied, invite, _])
|
||||
|
||||
return (
|
||||
<View
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue