Internationalize more strings (#2440)
Co-authored-by: Ansh <anshnanda10@gmail.com>
This commit is contained in:
parent
aeeacd10d3
commit
008893b911
108 changed files with 925 additions and 558 deletions
|
@ -4,6 +4,8 @@ import {Image} from 'expo-image'
|
|||
import {clamp} from 'lib/numbers'
|
||||
import {Dimensions} from 'lib/media/types'
|
||||
import * as imageSizes from 'lib/media/image-sizes'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
const MIN_ASPECT_RATIO = 0.33 // 1/3
|
||||
const MAX_ASPECT_RATIO = 10 // 10/1
|
||||
|
@ -29,6 +31,7 @@ export function AutoSizedImage({
|
|||
style,
|
||||
children = null,
|
||||
}: Props) {
|
||||
const {_} = useLingui()
|
||||
const [dim, setDim] = React.useState<Dimensions | undefined>(
|
||||
dimensionsHint || imageSizes.get(uri),
|
||||
)
|
||||
|
@ -64,7 +67,7 @@ export function AutoSizedImage({
|
|||
accessible={true} // Must set for `accessibilityLabel` to work
|
||||
accessibilityIgnoresInvertColors
|
||||
accessibilityLabel={alt}
|
||||
accessibilityHint="Tap to view fully"
|
||||
accessibilityHint={_(msg`Tap to view fully`)}
|
||||
/>
|
||||
{children}
|
||||
</Pressable>
|
||||
|
|
|
@ -2,6 +2,8 @@ import {AppBskyEmbedImages} from '@atproto/api'
|
|||
import React, {ComponentProps, FC} from 'react'
|
||||
import {StyleSheet, Text, Pressable, View} from 'react-native'
|
||||
import {Image} from 'expo-image'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
type EventFunction = (index: number) => void
|
||||
|
||||
|
@ -22,6 +24,7 @@ export const GalleryItem: FC<GalleryItemProps> = ({
|
|||
onPressIn,
|
||||
onLongPress,
|
||||
}) => {
|
||||
const {_} = useLingui()
|
||||
const image = images[index]
|
||||
return (
|
||||
<View style={styles.fullWidth}>
|
||||
|
@ -31,7 +34,7 @@ export const GalleryItem: FC<GalleryItemProps> = ({
|
|||
onLongPress={onLongPress ? () => onLongPress(index) : undefined}
|
||||
style={styles.fullWidth}
|
||||
accessibilityRole="button"
|
||||
accessibilityLabel={image.alt || 'Image'}
|
||||
accessibilityLabel={image.alt || _(msg`Image`)}
|
||||
accessibilityHint="">
|
||||
<Image
|
||||
source={{uri: image.thumb}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue