Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Translate some things on search (#1917)

authored by

Eric Bailey and committed by
GitHub
fe1a7183 22b76423

+9 -6
+8 -5
src/view/screens/Search/Search.tsx
··· 65 65 ) 66 66 } 67 67 68 - // TODO refactor how to translate? 69 68 function EmptyState({message, error}: {message: string; error?: string}) { 70 69 const pal = usePalette('default') 71 70 const {isMobile} = useWebMediaQueries() ··· 196 195 } 197 196 198 197 function SearchScreenPostResults({query}: {query: string}) { 198 + const {_} = useLingui() 199 199 const pal = usePalette('default') 200 200 const [isPTR, setIsPTR] = React.useState(false) 201 201 const { ··· 246 246 247 247 return error ? ( 248 248 <EmptyState 249 - message="We're sorry, but your search could not be completed. Please try again in a few minutes." 249 + message={_( 250 + msg`We're sorry, but your search could not be completed. Please try again in a few minutes.`, 251 + )} 250 252 error={error.toString()} 251 253 /> 252 254 ) : ( ··· 278 280 contentContainerStyle={{paddingBottom: 100}} 279 281 /> 280 282 ) : ( 281 - <EmptyState message={`No results found for ${query}`} /> 283 + <EmptyState message={_(msg`No results found for ${query}`)} /> 282 284 )} 283 285 </> 284 286 ) : ( ··· 289 291 } 290 292 291 293 function SearchScreenUserResults({query}: {query: string}) { 294 + const {_} = useLingui() 292 295 const [isFetched, setIsFetched] = React.useState(false) 293 296 const [dataUpdatedAt, setDataUpdatedAt] = React.useState(0) 294 297 const [results, setResults] = React.useState< ··· 335 338 contentContainerStyle={{paddingBottom: 100}} 336 339 /> 337 340 ) : ( 338 - <EmptyState message={`No results found for ${query}`} /> 341 + <EmptyState message={_(msg`No results found for ${query}`)} /> 339 342 )} 340 343 </> 341 344 ) : ( ··· 587 590 /> 588 591 )) 589 592 ) : ( 590 - <EmptyState message={`No results found for ${query}`} /> 593 + <EmptyState message={_(msg`No results found for ${query}`)} /> 591 594 )} 592 595 593 596 <View style={{height: 200}} />
+1 -1
src/view/shell/desktop/Search.tsx
··· 157 157 /> 158 158 <TextInput 159 159 testID="searchTextInput" 160 - placeholder="Search" 160 + placeholder={_(msg`Search`)} 161 161 placeholderTextColor={pal.colors.textLight} 162 162 selectTextOnFocus 163 163 returnKeyType="search"