Merge branch 'patch-3' of https://github.com/quiple/social-app into quiple-patch-3

This commit is contained in:
Paul Frazee 2024-03-19 12:29:22 -07:00
commit 14982b9393
30 changed files with 162 additions and 111 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
@ -20,6 +22,7 @@ export const Policies = ({
needsGuardian: boolean
}) => {
const pal = usePalette('default')
const {_} = useLingui()
if (!serviceDescription) {
return <View />
}
@ -40,7 +43,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>
)
@ -51,7 +56,7 @@ export const Policies = ({
<TextLink
key="tos"
href={tos}
text="Terms of Service"
text={_(msg`Terms of Service`)}
style={[pal.link, s.underline]}
/>,
)
@ -61,7 +66,7 @@ export const Policies = ({
<TextLink
key="pp"
href={pp}
text="Privacy Policy"
text={_(msg`Privacy Policy`)}
style={[pal.link, s.underline]}
/>,
)
@ -79,12 +84,14 @@ 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>
{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>
)}
</View>

View file

@ -207,7 +207,7 @@ export const LoginForm = ({
testID="loginPasswordInput"
ref={passwordInputRef}
style={[pal.text, styles.textInput]}
placeholder="Password"
placeholder={_(msg`Password`)}
placeholderTextColor={pal.colors.textLight}
autoCapitalize="none"
autoCorrect={false}

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"