Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve localization marks #3285

Merged
merged 33 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
2bc6f54
Update Lightbox.tsx
quiple Mar 20, 2024
20d8053
Change strings for easier localization
quiple Mar 20, 2024
8af961d
Update DeleteAccount.tsx
quiple Mar 20, 2024
185a977
Update LabelsOnMeDialog.tsx
quiple Mar 20, 2024
f1ef05e
Update FeedCard.tsx
quiple Mar 20, 2024
3c67a49
Update index.tsx
quiple Mar 20, 2024
dd88754
Update LabelsOnMeDialog.tsx
quiple Mar 20, 2024
b0b8524
Update index.tsx
quiple Mar 20, 2024
6fed3a8
Update FeedCard.tsx
quiple Mar 20, 2024
5f5e332
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Mar 20, 2024
bc12c94
Update SelfLabel.tsx
quiple Mar 20, 2024
dd29218
Update Hashtag.tsx
quiple Mar 20, 2024
3aaa3b2
Merge branch 'bluesky-social:main' into patch-3
quiple Mar 21, 2024
7ffdc03
Update index.tsx
quiple Mar 21, 2024
4b83566
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Mar 22, 2024
3264ea7
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Apr 2, 2024
33bcef5
Merge branch 'main' into patch-3
quiple Apr 4, 2024
55e42c9
Update Hashtag.tsx
quiple Apr 4, 2024
4333d46
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Apr 5, 2024
fc9784e
Merge branch 'main' into patch-3
quiple Apr 9, 2024
77dfd66
Merge branch 'bluesky-social:main' into patch-3
quiple Apr 12, 2024
63dc768
Update ChangeHandle.tsx
quiple Apr 12, 2024
7a5a079
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Apr 14, 2024
399bede
Update index.web.tsx
quiple Apr 14, 2024
348897f
Update index.web.tsx
quiple Apr 14, 2024
267f247
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Apr 17, 2024
163c6e1
Merge remote-tracking branch 'upstream/main' into patch-3
quiple Apr 19, 2024
5f3680b
Merge remote-tracking branch 'upstream/main' into patch-3
quiple May 2, 2024
4992faa
Update index.tsx
quiple May 2, 2024
8285b55
Merge remote-tracking branch 'upstream/main' into patch-3
quiple May 3, 2024
f35d0ff
Merge remote-tracking branch 'upstream/main' into patch-3
quiple May 7, 2024
7d3b920
Remove unnecessary `<Trans>` tags
quiple May 7, 2024
bc53cb2
Update Drawer.tsx
quiple May 7, 2024
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
18 changes: 10 additions & 8 deletions src/components/ProfileHoverCard/index.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,9 @@ function Inner({
color={profileShadow.viewer?.following ? 'secondary' : 'primary'}
variant="solid"
label={
profileShadow.viewer?.following ? _('Following') : _('Follow')
profileShadow.viewer?.following
? _(msg`Following`)
: _(msg`Follow`)
}
style={[a.rounded_full]}
onPress={profileShadow.viewer?.following ? unfollow : follow}>
Expand All @@ -413,7 +415,9 @@ function Inner({
icon={profileShadow.viewer?.following ? Check : Plus}
/>
<ButtonText>
{profileShadow.viewer?.following ? _('Following') : _('Follow')}
{profileShadow.viewer?.following
? _(msg`Following`)
: _(msg`Follow`)}
</ButtonText>
</Button>
)}
Expand Down Expand Up @@ -452,12 +456,10 @@ function Inner({
label={_(msg`${following} following`)}
style={[t.atoms.text]}
onPress={hide}>
<Trans>
<Text style={[a.text_md, a.font_bold]}>{following} </Text>
<Text style={[t.atoms.text_contrast_medium]}>
{pluralizedFollowings}
</Text>
</Trans>
<Text style={[a.text_md, a.font_bold]}>{following} </Text>
<Text style={[t.atoms.text_contrast_medium]}>
{pluralizedFollowings}
</Text>
</InlineLinkText>
</View>

Expand Down
2 changes: 1 addition & 1 deletion src/components/moderation/LabelsOnMeDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function AppealForm({
},
reason: details,
})
Toast.show(_(msg`Appeal submitted.`))
Toast.show(_(msg`Appeal submitted`))
} finally {
control.close()
}
Expand Down
16 changes: 8 additions & 8 deletions src/components/moderation/ModerationDetailsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,20 @@ function ModerationDetailsDialogInner({
<>
<Divider />
<Text style={[t.atoms.text, a.text_md, a.leading_snug, a.mt_lg]}>
<Trans>
This label was applied by{' '}
{modcause.source.type === 'user' ? (
<Trans>the author</Trans>
) : (
{modcause.source.type === 'user' ? (
<Trans>This label was applied by the author.</Trans>
) : (
<Trans>
This label was applied by{' '}
<InlineLinkText
to={makeProfileLink({did: modcause.label.src, handle: ''})}
onPress={() => control.close()}
style={a.text_md}>
{desc.source}
</InlineLinkText>
)}
.
</Trans>
.
</Trans>
)}
</Text>
</>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/screens/Onboarding/StepAlgoFeeds/FeedCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react'
import {View} from 'react-native'
import {Image} from 'expo-image'
import {LinearGradient} from 'expo-linear-gradient'
import {msg} from '@lingui/macro'
import {Trans, msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'

import {FeedSourceInfo, useFeedSourceInfoQuery} from '#/state/queries/feed'
Expand Down Expand Up @@ -109,7 +109,7 @@ function PrimaryFeedCardInner({
a.py_xs,
ctx.selected && styles.textSelected,
]}>
by @{feed.creatorHandle}
<Trans>by @{feed.creatorHandle}</Trans>
</Text>
</View>

Expand Down
4 changes: 2 additions & 2 deletions src/screens/Onboarding/StepInterests/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ export function StepInterests() {
color: t.palette.negative_900,
},
]}>
Error:{' '}
<Trans>Error:</Trans>{' '}
</Text>
{error?.message || 'an unknown error occurred'}
{error?.message || _(msg`an unknown error occurred`)}
</Text>
</View>
) : (
Expand Down
21 changes: 8 additions & 13 deletions src/screens/Profile/Header/Metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,16 @@ export function ProfileHeaderMetrics({
style={[a.flex_row, t.atoms.text]}
to={makeProfileLink(profile, 'follows')}
label={_(msg`${following} following`)}>
<Trans>
<Text style={[a.font_bold, a.text_md]}>{following} </Text>
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
{pluralizedFollowings}
</Text>
</Trans>
<Text style={[a.font_bold, a.text_md]}>{following} </Text>
<Text style={[t.atoms.text_contrast_medium, a.text_md]}>
{pluralizedFollowings}
</Text>
</InlineLinkText>
<Text style={[a.font_bold, t.atoms.text, a.text_md]}>
<Trans>
{formatCount(profile.postsCount || 0)}{' '}
<Text
style={[t.atoms.text_contrast_medium, a.font_normal, a.text_md]}>
{plural(profile.postsCount || 0, {one: 'post', other: 'posts'})}
</Text>
</Trans>
{formatCount(profile.postsCount || 0)}{' '}
<Text style={[t.atoms.text_contrast_medium, a.font_normal, a.text_md]}>
{plural(profile.postsCount || 0, {one: 'post', other: 'posts'})}
</Text>
</Text>
</View>
)
Expand Down
12 changes: 7 additions & 5 deletions src/screens/Signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ export function Signup({onPressBack}: {onPressBack: () => void}) {
]}>
<View style={[a.gap_sm, a.pb_3xl]}>
<Text style={[a.font_semibold, t.atoms.text_contrast_medium]}>
<Trans>Step</Trans> {state.activeStep + 1} <Trans>of</Trans>{' '}
{state.serviceDescription &&
!state.serviceDescription.phoneVerificationRequired
? '2'
: '3'}
<Trans>
Step {state.activeStep + 1} of{' '}
{state.serviceDescription &&
!state.serviceDescription.phoneVerificationRequired
? '2'
: '3'}
</Trans>
</Text>
<Text style={[a.text_3xl, a.font_bold]}>
{state.activeStep === SignupStep.INFO ? (
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/lightbox/Lightbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function LightboxFooter({imageIndex}: {imageIndex: number}) {

try {
await saveImageToMediaLibrary({uri})
Toast.show(_(msg`Saved to your camera roll.`))
Toast.show(_(msg`Saved to your camera roll`))
} catch (e: any) {
Toast.show(_(msg`Failed to save image: ${String(e)}`))
}
Expand Down
4 changes: 3 additions & 1 deletion src/view/com/modals/ChangeHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,9 @@ function CustomHandleForm({
<Text type="xl-medium" style={[s.white, s.textCenter]}>
{canSave
? _(msg`Update to ${handle}`)
: _(msg`Verify ${isDNSForm ? 'DNS Record' : 'Text File'}`)}
: isDNSForm
? _(msg`Verify DNS Record`)
: _(msg`Verify Text File`)}
</Text>
)}
</Button>
Expand Down
38 changes: 19 additions & 19 deletions src/view/com/modals/DeleteAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,26 +84,26 @@ export function Component({}: {}) {
<ScrollView style={[pal.view]} keyboardShouldPersistTaps="handled">
<View style={[styles.titleContainer, pal.view]}>
<Text type="title-xl" style={[s.textCenter, pal.text]}>
<Trans>Delete Account</Trans>
<Trans>
Delete Account{' '}
<Text type="title-xl" style={[pal.text, s.bold]}>
"
</Text>
<Text
type="title-xl"
numberOfLines={1}
style={[
isMobile ? styles.titleMobile : styles.titleDesktop,
pal.text,
s.bold,
]}>
{currentAccount?.handle}
</Text>
<Text type="title-xl" style={[pal.text, s.bold]}>
"
</Text>
</Trans>
</Text>
<View style={[pal.view, s.flexRow]}>
<Text type="title-xl" style={[pal.text, s.bold]}>
{' "'}
</Text>
<Text
type="title-xl"
numberOfLines={1}
style={[
isMobile ? styles.titleMobile : styles.titleDesktop,
pal.text,
s.bold,
]}>
{currentAccount?.handle}
</Text>
<Text type="title-xl" style={[pal.text, s.bold]}>
{'"'}
</Text>
</View>
</View>
{!isEmailSent ? (
<>
Expand Down
6 changes: 3 additions & 3 deletions src/view/com/modals/SelfLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ export function Component({
) : (
<View>
<Text style={[pal.textLight]}>
<Text type="md-bold" style={[pal.textLight, s.mr5]}>
<Trans>Not Applicable.</Trans>
</Text>
<Trans>
<Text type="md-bold" style={[pal.textLight]}>
Not Applicable.
</Text>{' '}
This warning is only available for posts with media attached.
</Trans>
</Text>
Expand Down
6 changes: 3 additions & 3 deletions src/view/shell/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ let DrawerProfileCard = ({
value={profile?.followersCount || 0}
one="follower"
other="followers"
/>{' '}
&middot;{' '}
</Trans>
/>
</Trans>{' '}
&middot;{' '}
<Trans>
<Text type="xl-medium" style={pal.text}>
{formatCountShortOnly(profile?.followsCount ?? 0)}
Expand Down
Loading