Merge remote-tracking branch 'origin/main' into samuel/alf-login

This commit is contained in:
Samuel Newman 2024-03-19 19:51:35 +00:00
commit 4794ab6b9a
83 changed files with 4447 additions and 4712 deletions

View file

@ -52,7 +52,9 @@ export function HomeLoggedOutCTA() {
onPress={showCreateAccount}
accessibilityRole="button"
accessibilityLabel={_(msg`Create new account`)}
accessibilityHint="Opens flow to create a new Bluesky account">
accessibilityHint={_(
msg`Opens flow to create a new Bluesky account`,
)}>
<Text
style={[
s.white,
@ -68,7 +70,9 @@ export function HomeLoggedOutCTA() {
onPress={showSignIn}
accessibilityRole="button"
accessibilityLabel={_(msg`Sign in`)}
accessibilityHint="Opens flow to sign into your existing Bluesky account">
accessibilityHint={_(
msg`Opens flow to sign into your existing Bluesky account`,
)}>
<Text
style={[
pal.text,

View file

@ -66,7 +66,9 @@ export const SplashScreen = ({
onPress={onPressCreateAccount}
accessibilityRole="button"
accessibilityLabel={_(msg`Create new account`)}
accessibilityHint="Opens flow to create a new Bluesky account">
accessibilityHint={_(
msg`Opens flow to create a new Bluesky account`,
)}>
<Text style={[s.white, styles.btnLabel]}>
<Trans>Create a new account</Trans>
</Text>
@ -77,7 +79,9 @@ export const SplashScreen = ({
onPress={onPressSignin}
accessibilityRole="button"
accessibilityLabel={_(msg`Sign in`)}
accessibilityHint="Opens flow to sign into your existing Bluesky account">
accessibilityHint={_(
msg`Opens flow to sign into your existing Bluesky account`,
)}>
<Text style={[pal.text, styles.btnLabel]}>
<Trans>Sign In</Trans>
</Text>

View file

@ -9,6 +9,8 @@ import {TextLink} from '../../util/Link'
import {Text} from '../../util/text/Text'
import {s, colors} from 'lib/styles'
import {usePalette} from 'lib/hooks/usePalette'
import {Trans, msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
type ServiceDescription = ComAtprotoServerDescribeServer.OutputSchema
@ -22,6 +24,7 @@ export const Policies = ({
under13: boolean
}) => {
const pal = usePalette('default')
const {_} = useLingui()
if (!serviceDescription) {
return <View />
}
@ -42,7 +45,9 @@ export const Policies = ({
/>
</View>
<Text style={[pal.textLight, s.pl5, s.flex1]}>
This service has not provided terms of service or a privacy policy.
<Trans>
This service has not provided terms of service or a privacy policy.
</Trans>
</Text>
</View>
)
@ -53,7 +58,7 @@ export const Policies = ({
<TextLink
key="tos"
href={tos}
text="Terms of Service"
text={_(msg`Terms of Service`)}
style={[pal.link, s.underline]}
onPress={() => Linking.openURL(tos)}
/>,
@ -64,7 +69,7 @@ export const Policies = ({
<TextLink
key="pp"
href={pp}
text="Privacy Policy"
text={_(msg`Privacy Policy`)}
style={[pal.link, s.underline]}
onPress={() => Linking.openURL(pp)}
/>,
@ -83,7 +88,7 @@ export const Policies = ({
return (
<View style={styles.policies}>
<Text style={pal.textLight}>
By creating an account you agree to the {els}.
<Trans>By creating an account you agree to the {els}.</Trans>
</Text>
{under13 ? (
<Text style={[pal.textLight, s.bold]}>
@ -91,8 +96,10 @@ export const Policies = ({
</Text>
) : needsGuardian ? (
<Text style={[pal.textLight, s.bold]}>
If you are not yet an adult according to the laws of your country,
your parent or legal guardian must read these Terms on your behalf.
<Trans>
If you are not yet an adult according to the laws of your country,
your parent or legal guardian must read these Terms on your behalf.
</Trans>
</Text>
) : undefined}
</View>

View file

@ -11,7 +11,8 @@ import {Text} from 'view/com/util/text/Text'
import Animated, {FadeInRight} from 'react-native-reanimated'
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
import {useAnalytics} from 'lib/analytics/analytics'
import {Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {Trans, msg} from '@lingui/macro'
import {Shadow, useProfileShadow} from '#/state/cache/profile-shadow'
import {useProfileFollowMutationQueue} from '#/state/queries/profile'
import {logger} from '#/logger'
@ -70,6 +71,7 @@ function ProfileCard({
}) {
const {track} = useAnalytics()
const pal = usePalette('default')
const {_} = useLingui()
const [addingMoreSuggestions, setAddingMoreSuggestions] =
React.useState(false)
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(
@ -136,7 +138,7 @@ function ProfileCard({
type={profile.viewer?.following ? 'default' : 'inverted'}
labelStyle={styles.followButton}
onPress={onToggleFollow}
label={profile.viewer?.following ? 'Unfollow' : 'Follow'}
label={profile.viewer?.following ? _(msg`Unfollow`) : _(msg`Follow`)}
/>
</View>
{profile.description ? (

View file

@ -6,7 +6,8 @@ import {usePalette} from 'lib/hooks/usePalette'
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
import {Button} from 'view/com/util/forms/Button'
import {ViewHeader} from 'view/com/util/ViewHeader'
import {Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {Trans, msg} from '@lingui/macro'
type Props = {
next: () => void
@ -15,6 +16,7 @@ type Props = {
export function WelcomeMobile({next, skip}: Props) {
const pal = usePalette('default')
const {_} = useLingui()
return (
<View style={[styles.container]} testID="welcomeOnboarding">
@ -91,7 +93,7 @@ export function WelcomeMobile({next, skip}: Props) {
<Button
onPress={next}
label="Continue"
label={_(msg`Continue`)}
testID="continueBtn"
style={[styles.buttonContainer]}
labelStyle={styles.buttonText}

View file

@ -115,7 +115,7 @@ export function ServerInputDialog({
testID="customServerTextInput"
value={customAddress}
onChangeText={setCustomAddress}
label={_(msg`my-server.com`)}
label="my-server.com"
accessibilityLabelledBy="address-input-label"
autoCapitalize="none"
keyboardType="url"