Skip to content

Commit

Permalink
Update Korean localization and mark more text for localization
Browse files Browse the repository at this point in the history
  • Loading branch information
quiple committed Dec 28, 2023
1 parent de8c1da commit 30cf832
Show file tree
Hide file tree
Showing 22 changed files with 1,474 additions and 878 deletions.
321 changes: 202 additions & 119 deletions src/locale/locales/de/messages.po

Large diffs are not rendered by default.

321 changes: 202 additions & 119 deletions src/locale/locales/en/messages.po

Large diffs are not rendered by default.

321 changes: 202 additions & 119 deletions src/locale/locales/es/messages.po

Large diffs are not rendered by default.

321 changes: 202 additions & 119 deletions src/locale/locales/fr/messages.po

Large diffs are not rendered by default.

321 changes: 202 additions & 119 deletions src/locale/locales/hi/messages.po

Large diffs are not rendered by default.

321 changes: 202 additions & 119 deletions src/locale/locales/ja/messages.po

Large diffs are not rendered by default.

333 changes: 208 additions & 125 deletions src/locale/locales/ko/messages.po

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/view/com/auth/SplashScreen.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import {usePalette} from 'lib/hooks/usePalette'
import {CenteredView} from '../util/Views'
import {isWeb} from 'platform/detection'
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
import {Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {Trans, msg} from '@lingui/macro'
import {Logo} from '#/view/icons/Logo'
import {Logotype} from '#/view/icons/Logotype'

Expand Down Expand Up @@ -74,7 +75,7 @@ export const SplashScreen = ({
// TODO: web accessibility
accessibilityRole="button">
<Text style={[s.white, styles.btnLabel]}>
Create a new account
<Trans>Create a new account</Trans>
</Text>
</TouchableOpacity>
<TouchableOpacity
Expand All @@ -98,22 +99,23 @@ export const SplashScreen = ({

function Footer({styles}: {styles: ReturnType<typeof useStyles>}) {
const pal = usePalette('default')
const {_} = useLingui()

return (
<View style={[styles.footer, pal.view, pal.border]}>
<TextLink
href="https://blueskyweb.xyz"
text="Business"
text={_(msg`Business`)}
style={[styles.footerLink, pal.link]}
/>
<TextLink
href="https://blueskyweb.xyz/blog"
text="Blog"
text={_(msg`Blog`)}
style={[styles.footerLink, pal.link]}
/>
<TextLink
href="https://blueskyweb.xyz/join"
text="Jobs"
text={_(msg`Jobs`)}
style={[styles.footerLink, pal.link]}
/>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/auth/create/CreateAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export function CreateAccount({onPressBack}: {onPressBack: () => void}) {

return (
<LoggedOutLayout
leadin={`Step ${uiState.step}`}
leadin={_(msg`Step ${uiState.step}`)}
title={_(msg`Create Account`)}
description={_(msg`We're so excited to have you join us!`)}>
<ScrollView testID="createAccount" style={pal.view}>
Expand Down
4 changes: 2 additions & 2 deletions src/view/com/auth/create/Step1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ export function Step1({
testID="blueskyServerBtn"
isSelected={isDefaultSelected}
label="Bluesky"
help="&nbsp;(default)"
help={' (' + _(msg`default`) + ')'}
onPress={onPressDefault}
/>
<Option
testID="otherServerBtn"
isSelected={!isDefaultSelected}
label="Other"
label={_(msg`Other`)}
onPress={onPressOther}>
<View style={styles.otherForm}>
<Text nativeID="addressProvider" style={[pal.text, s.mb5]}>
Expand Down
4 changes: 2 additions & 2 deletions src/view/com/auth/create/Step2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function Step2({
{uiState.isInviteCodeRequired && (
<View style={s.pb20}>
<Text type="md-medium" style={[pal.text, s.mb2]}>
Invite code
<Trans>Invite code</Trans>
</Text>
<TextInput
testID="inviteCodeInput"
Expand All @@ -62,7 +62,7 @@ export function Step2({

{!uiState.inviteCode && uiState.isInviteCodeRequired ? (
<Text style={[s.alignBaseline, pal.text]}>
Don't have an invite code?{' '}
<Trans>Don't have an invite code?</Trans>{' '}
<TouchableWithoutFeedback
onPress={onPressWaitlist}
accessibilityLabel={_(msg`Join the waitlist.`)}
Expand Down
6 changes: 5 additions & 1 deletion src/view/com/auth/create/StepHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ import React from 'react'
import {StyleSheet, View} from 'react-native'
import {Text} from 'view/com/util/text/Text'
import {usePalette} from 'lib/hooks/usePalette'
import {useLingui} from '@lingui/react'
import {Trans, msg} from '@lingui/macro'

export function StepHeader({step, title}: {step: string; title: string}) {
const pal = usePalette('default')
const {_} = useLingui()

return (
<View style={styles.container}>
<Text type="lg" style={[pal.textLight]}>
{step === '3' ? 'Last step!' : <>Step {step} of 3</>}
{step === '3' ? _(msg`Last step!`) : <Trans>Step {step} of 3</Trans>}
</Text>
<Text style={[pal.text]} type="title-xl">
{title}
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/modals/ChangeHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export function Inner({
accessibilityHint="Exits handle change process"
onAccessibilityEscape={onPressCancel}>
<Text type="lg" style={pal.textLight}>
Cancel
<Trans>Cancel</Trans>
</Text>
</TouchableOpacity>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/modals/LinkWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export function Component({text, href}: {text: string; href: string}) {
}}
accessibilityLabel={_(msg`Cancel`)}
accessibilityHint=""
label="Cancel"
label={_(msg`Cancel`)}
labelContainerStyle={{justifyContent: 'center', padding: 4}}
labelStyle={[s.f18]}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/modals/ListAddRemoveUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function Component({
}}
accessibilityLabel={_(msg`Done`)}
accessibilityHint=""
label="Done"
label={_(msg`Done`)}
labelContainerStyle={{justifyContent: 'center', padding: 4}}
labelStyle={[s.f18]}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/modals/UserAddRemoveLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function Component({
accessibilityLabel={_(msg`Done`)}
accessibilityHint=""
onAccessibilityEscape={onPressDone}
label="Done"
label={_(msg`Done`)}
/>
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion src/view/com/modals/crop-image/CropImage.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export function Component({
accessibilityLabel={_(msg`Cancel image crop`)}
accessibilityHint="Exits image cropping process">
<Text type="xl" style={pal.link}>
Cancel
<Trans>Cancel</Trans>
</Text>
</TouchableOpacity>
<View style={s.flex1} />
Expand Down
30 changes: 17 additions & 13 deletions src/view/com/posts/FeedItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import {useComposerControls} from '#/state/shell/composer'
import {Shadow, usePostShadow, POST_TOMBSTONE} from '#/state/cache/post-shadow'
import {FeedNameText} from '../util/FeedInfoText'
import {useSession} from '#/state/session'
import {Trans, msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'

export function FeedItem({
post,
Expand Down Expand Up @@ -103,6 +105,7 @@ let FeedItemInner = ({
}): React.ReactNode => {
const {openComposer} = useComposerControls()
const pal = usePalette('default')
const {_} = useLingui()
const {currentAccount} = useSession()
const href = useMemo(() => {
const urip = new AtUri(post.uri)
Expand Down Expand Up @@ -196,9 +199,9 @@ let FeedItemInner = ({
<Link
style={styles.includeReason}
href={makeProfileLink(reason.by)}
title={`Reposted by ${sanitizeDisplayName(
title={_(msg`Reposted by ${sanitizeDisplayName(
reason.by.displayName || reason.by.handle,
)}`}>
)}`)}>
<FontAwesomeIcon
icon="retweet"
style={{
Expand All @@ -212,17 +215,18 @@ let FeedItemInner = ({
style={pal.textLight}
lineHeight={1.2}
numberOfLines={1}>
Reposted by{' '}
<TextLinkOnWebOnly
type="sm-bold"
style={pal.textLight}
lineHeight={1.2}
numberOfLines={1}
text={sanitizeDisplayName(
reason.by.displayName || sanitizeHandle(reason.by.handle),
)}
href={makeProfileLink(reason.by)}
/>
<Trans>Reposted by{' '}
<TextLinkOnWebOnly
type="sm-bold"
style={pal.textLight}
lineHeight={1.2}
numberOfLines={1}
text={sanitizeDisplayName(
reason.by.displayName || sanitizeHandle(reason.by.handle),
)}
href={makeProfileLink(reason.by)}
/>
</Trans>
</Text>
</Link>
) : null}
Expand Down
7 changes: 5 additions & 2 deletions src/view/com/profile/FollowButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import {Button, ButtonType} from '../util/forms/Button'
import * as Toast from '../util/Toast'
import {useProfileFollowMutationQueue} from '#/state/queries/profile'
import {Shadow} from '#/state/cache/types'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'

export function FollowButton({
unfollowedType = 'inverted',
Expand All @@ -18,6 +20,7 @@ export function FollowButton({
labelStyle?: StyleProp<TextStyle>
}) {
const [queueFollow, queueUnfollow] = useProfileFollowMutationQueue(profile)
const {_} = useLingui()

const onPressFollow = async () => {
try {
Expand Down Expand Up @@ -49,7 +52,7 @@ export function FollowButton({
type={followedType}
labelStyle={labelStyle}
onPress={onPressUnfollow}
label="Unfollow"
label={_(msg`Unfollow`)}
/>
)
} else {
Expand All @@ -58,7 +61,7 @@ export function FollowButton({
type={unfollowedType}
labelStyle={labelStyle}
onPress={onPressFollow}
label="Follow"
label={_(msg`Follow`)}
/>
)
}
Expand Down
4 changes: 2 additions & 2 deletions src/view/screens/ProfileFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,15 +341,15 @@ export function ProfileFeedScreenInner({
<Button
disabled={isSavePending || isRemovePending}
type="default"
label={isSaved ? 'Unsave' : 'Save'}
label={isSaved ? _(msg`Unsave`) : _(msg`Save`)}
onPress={onToggleSaved}
style={styles.btn}
/>
<Button
testID={isPinned ? 'unpinBtn' : 'pinBtn'}
disabled={isPinPending || isUnpinPending}
type={isPinned ? 'default' : 'inverted'}
label={isPinned ? 'Unpin' : 'Pin to home'}
label={isPinned ? _(msg`Unpin`) : _(msg`Pin to home`)}
onPress={onTogglePinned}
style={styles.btn}
/>
Expand Down
9 changes: 5 additions & 4 deletions src/view/screens/ProfileList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
<Button
testID={isPinned ? 'unpinBtn' : 'pinBtn'}
type={isPinned ? 'default' : 'inverted'}
label={isPinned ? 'Unpin' : 'Pin to home'}
label={isPinned ? _(msg`Unpin`) : _(msg`Pin to home`)}
onPress={onTogglePinned}
disabled={isPending}
/>
Expand All @@ -554,14 +554,14 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
<Button
testID="unblockBtn"
type="default"
label="Unblock"
label={_(msg`Unblock`)}
onPress={onUnsubscribeBlock}
/>
) : isMuting ? (
<Button
testID="unmuteBtn"
type="default"
label="Unmute"
label={_(msg`Unmute`)}
onPress={onUnsubscribeMute}
/>
) : (
Expand Down Expand Up @@ -603,6 +603,7 @@ const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>(
const [hasNew, setHasNew] = React.useState(false)
const [isScrolledDown, setIsScrolledDown] = React.useState(false)
const isScreenFocused = useIsFocused()
const {_} = useLingui()

const onScrollToTop = useCallback(() => {
scrollElRef.current?.scrollToOffset({
Expand All @@ -624,7 +625,7 @@ const FeedSection = React.forwardRef<SectionRef, FeedSectionProps>(
}, [onScrollToTop, isScreenFocused])

const renderPostsEmpty = useCallback(() => {
return <EmptyState icon="feed" message="This feed is empty!" />
return <EmptyState icon="feed" message={_(msg`This feed is empty!`)} />
}, [])

return (
Expand Down
5 changes: 3 additions & 2 deletions src/view/screens/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import {useCloseAllActiveElements} from '#/state/util'

function SettingsAccountCard({account}: {account: SessionAccount}) {
const pal = usePalette('default')
const {_} = useLingui()
const {isSwitchingAccounts, currentAccount} = useSession()
const {logout} = useSessionApi()
const {data: profile} = useProfileQuery({did: account.did})
Expand All @@ -98,10 +99,10 @@ function SettingsAccountCard({account}: {account: SessionAccount}) {
testID="signOutBtn"
onPress={logout}
accessibilityRole="button"
accessibilityLabel="Sign out"
accessibilityLabel={_(msg`Sign out`)}
accessibilityHint={`Signs ${profile?.displayName} out of Bluesky`}>
<Text type="lg" style={pal.link}>
Sign out
<Trans>Sign out</Trans>
</Text>
</TouchableOpacity>
) : (
Expand Down

0 comments on commit 30cf832

Please sign in to comment.