copy update

This commit is contained in:
vineyardbovines
2026-05-07 12:22:41 -04:00
parent be65426f6b
commit 094c39b7a2
@@ -32,6 +32,13 @@ import {
import {USRegionNameToRegionCode} from '#/geolocation/util'
import {device, useStorage} from '#/storage'
// DEBUG: remove before merging. Forces the card to render with a fake region
// so the RegionNotice copy can be previewed/screenshotted locally.
const DEBUG_FORCE_REGION_PREVIEW = true
// DEBUG: when previewing, set true to render the GPS copy variant instead of
// the network copy variant.
const DEBUG_FORCE_GPS = true
const USRegionCodeToRegionName: {[regionCode: string]: string} =
Object.fromEntries(
Object.entries(USRegionNameToRegionCode).map(([name, code]) => [
@@ -59,7 +66,8 @@ function formatRegion(
export function AgeAssuranceAccountCard({style}: ViewStyleProp & {}) {
const aa = useAgeAssurance()
if (aa.state.access === aa.Access.Full) return null
if (!DEBUG_FORCE_REGION_PREVIEW && aa.state.access === aa.Access.Full)
return null
if (aa.state.error === 'config') {
return (
<View style={style}>
@@ -99,7 +107,12 @@ function Inner({style}: ViewStyleProp & {}) {
<View style={style}>
<View
style={[a.p_lg, a.rounded_md, a.border, t.atoms.border_contrast_low]}>
style={[
a.p_lg,
a.rounded_md,
a.border,
t.atoms.border_contrast_low,
]}>
<View
style={[
a.flex_row,
@@ -115,14 +128,17 @@ function Inner({style}: ViewStyleProp & {}) {
</View>
<View style={[a.pb_md, a.gap_sm]}>
<Text style={[a.text_sm, a.leading_snug]}>{copy.notice}</Text>
<Text style={[a.text_sm, a.leading_snug]}>
{copy.notice}
</Text>
{hasCompletedFlow && (
<Text style={[a.text_sm, a.leading_snug]}>
<Trans>
If you are 18 years of age or older and want to try again,
click the button below and use a different verification method
if one is available in your region. If you have questions or
concerns,{' '}
If you are 18 years of age or older and want
to try again, click the button below and use
a different verification method if one is
available in your region. If you have
questions or concerns,{' '}
<InlineLinkText
label={l`Contact our support team`}
{...createStaticClick(() => {
@@ -140,13 +156,16 @@ function Inner({style}: ViewStyleProp & {}) {
{isBlocked ? (
<Admonition type="warning">
<Trans>
You are currently unable to access Bluesky's Age Assurance flow.
Please{' '}
You are currently unable to access Bluesky's Age
Assurance flow. Please{' '}
<InlineLinkText
label={l`Contact our moderation team`}
{...createStaticClick(() => {
appealControl.open()
ax.metric('ageAssurance:appealDialogOpen', {})
ax.metric(
'ageAssurance:appealDialogOpen',
{},
)
})}>
contact our moderation team
</InlineLinkText>{' '}
@@ -172,12 +191,18 @@ function Inner({style}: ViewStyleProp & {}) {
label={l`Verify now`}
size="small"
variant="solid"
color={hasInitiated ? 'secondary' : 'primary'}
color={
hasInitiated ? 'secondary' : 'primary'
}
onPress={() => {
control.open()
ax.metric('ageAssurance:initDialogOpen', {
hasInitiatedPreviously: hasInitiated,
})
ax.metric(
'ageAssurance:initDialogOpen',
{
hasInitiatedPreviously:
hasInitiated,
},
)
}}>
<ButtonText>
{hasInitiated ? (
@@ -190,21 +215,36 @@ function Inner({style}: ViewStyleProp & {}) {
{lastInitiatedAt && timeAgo && diff ? (
<Text
style={[a.text_sm, a.italic, t.atoms.text_contrast_medium]}
style={[
a.text_sm,
a.italic,
t.atoms.text_contrast_medium,
]}
title={i18n.date(lastInitiatedAt, {
dateStyle: 'medium',
timeStyle: 'medium',
})}>
{diff.value === 0 ? (
<Trans>Last initiated just now</Trans>
<Trans>
Last initiated just now
</Trans>
) : (
<Trans>Last initiated {timeAgo} ago</Trans>
<Trans>
Last initiated {timeAgo} ago
</Trans>
)}
</Text>
) : (
<Text
style={[a.text_sm, a.italic, t.atoms.text_contrast_medium]}>
<Trans>Age assurance only takes a few minutes</Trans>
style={[
a.text_sm,
a.italic,
t.atoms.text_contrast_medium,
]}>
<Trans>
Age assurance only takes a few
minutes
</Trans>
</Text>
)}
</View>
@@ -225,8 +265,12 @@ function RegionNotice() {
const computeAgeAssuranceRegionAccess = useComputeAgeAssuranceRegionAccess()
const locationControl = Dialog.useDialogControl()
const region = formatRegion(geolocation, i18n.locale)
const isGPS = !!deviceGeolocation?.countryCode
const region = DEBUG_FORCE_REGION_PREVIEW
? 'Switzerland'
: formatRegion(geolocation, i18n.locale)
const isGPS = DEBUG_FORCE_REGION_PREVIEW
? DEBUG_FORCE_GPS
: !!deviceGeolocation?.countryCode
return (
<>
@@ -234,7 +278,9 @@ function RegionNotice() {
<DeviceLocationRequestDialog
control={locationControl}
onLocationAcquired={props => {
const access = computeAgeAssuranceRegionAccess(props.geolocation)
const access = computeAgeAssuranceRegionAccess(
props.geolocation,
)
if (access !== aa.Access.Full) {
props.disableDialogAction()
props.setDialogError(
@@ -258,25 +304,25 @@ function RegionNotice() {
{isGPS ? (
<Trans>
Based on your device's location, we think you're in{' '}
<Text style={[a.text_sm, a.font_bold]}>{region}</Text>. Some
features are limited because of regional age laws.
<Text style={[a.text_sm, a.font_bold]}>
{region}
</Text>
. This estimate may be inaccurate if you're using a
VPN.
</Trans>
) : (
<Trans>
Based on your network, we think you're in{' '}
<Text style={[a.text_sm, a.font_bold]}>{region}</Text>. Some
features are limited because of regional age laws.
<Text style={[a.text_sm, a.font_bold]}>
{region}
</Text>
. This estimate may be inaccurate if you're using a
VPN.
</Trans>
)}
</Text>
)}
{region && !isGPS && (
<Text style={[a.text_sm, a.leading_snug]}>
<Trans>This estimate may be inaccurate if you're using a VPN.</Trans>
</Text>
)}
{IS_NATIVE && (
<Text style={[a.text_sm, a.leading_snug]}>
<Trans>