Skip to content

Commit 261341c

Browse files
committed
UserStatusScreen: Translate status-text suggestions
1 parent cf1a32c commit 261341c

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

src/user-statuses/UserStatusScreen.js

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,17 +94,19 @@ export default function UserStatusScreen(props: Props): Node {
9494
data={statusSuggestions}
9595
keyboardShouldPersistTaps="always"
9696
keyExtractor={item => item}
97-
renderItem={({ item, index }) => (
98-
<SelectableOptionRow
99-
key={item}
100-
itemKey={item}
101-
title={item}
102-
selected={item === statusTextFromInputValue(textInputValue)}
103-
onRequestSelectionChange={itemKey => {
104-
setTextInputValue(_(itemKey));
105-
}}
106-
/>
107-
)}
97+
renderItem={({ item: text, index }) => {
98+
const translatedText = _(text);
99+
return (
100+
<SelectableOptionRow
101+
itemKey={text}
102+
title={translatedText}
103+
selected={translatedText === statusTextFromInputValue(textInputValue)}
104+
onRequestSelectionChange={() => {
105+
setTextInputValue(translatedText);
106+
}}
107+
/>
108+
);
109+
}}
108110
/>
109111
<View style={styles.buttonsWrapper}>
110112
<ZulipButton

0 commit comments

Comments
 (0)