Skip to content

Commit 3b254e7

Browse files
iketwIDubuque
authored andcommitted
[RN] i18n more strings and fix fontFamily (#1818)
1 parent 10d7980 commit 3b254e7

File tree

11 files changed

+25
-23
lines changed

11 files changed

+25
-23
lines changed

packages/react-native/src/evm/components/ConnectWalletDetails/ConnectAppField.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ import { WalletIcon } from "../base/WalletIcon";
1313
import WalletConnectIcon from "../../assets/wallet-connect";
1414
import QrCodeIcon from "../../assets/qr-code";
1515
import { QRCodeScan } from "./QRCodeScan";
16+
import { useLocale } from "../../providers/ui-context-provider";
1617

1718
const ConnectAppField = () => {
1819
const theme = useTheme();
20+
const l = useLocale();
1921
const [showWCInput, setShowWCInput] = useState(false);
2022
const [wcUri, setWCUri] = useState<string | undefined>();
2123
const [appMeta, setAppMeta] = useState<{ name: string; iconUrl: string }>();
@@ -132,7 +134,7 @@ const ConnectAppField = () => {
132134
numberOfLines: 1,
133135
style: {
134136
color: theme.colors.textPrimary,
135-
fontFamily: theme.textVariants.defaults.fontFamily,
137+
// fontFamily: theme.textVariants.defaults.fontFamily,
136138
},
137139
}}
138140
containerProps={{
@@ -181,7 +183,7 @@ const ConnectAppField = () => {
181183
)}
182184
<View style={styles.exportWalletInfo}>
183185
<Text variant="bodySmall" numberOfLines={1}>
184-
{appMeta ? appMeta.name : "Connect app"}
186+
{appMeta ? appMeta.name : l.common.connect_app}
185187
</Text>
186188
</View>
187189
</>

packages/react-native/src/evm/components/ConnectWalletFlow/ChooseWallet/ChooseWallet.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export function ChooseWallet({
188188
>
189189
<Box height={1} flex={1} backgroundColor="border" />
190190
<Text variant="subHeader" textAlign="center" marginHorizontal="xxs">
191-
OR
191+
{l.common.or}
192192
</Text>
193193
<Box height={1} flex={1} backgroundColor="border" />
194194
</Box>

packages/react-native/src/evm/components/ConnectWalletFlow/LocalWalletImportModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export const LocalWalletImportModal = ({
211211
onChangeText: onPrivateKeyEntered,
212212
style: {
213213
color: theme.colors.textPrimary,
214-
fontFamily: theme.textVariants.defaults.fontFamily,
214+
// fontFamily: theme.textVariants.defaults.fontFamily,
215215
},
216216
}}
217217
containerProps={{ pl: "xxs" }}

packages/react-native/src/evm/components/PasswordInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const PasswordInput = ({
3131
style={{
3232
...styles.textInput,
3333
color: theme.colors.textPrimary,
34-
fontFamily: theme.textVariants.defaults.fontFamily,
34+
// fontFamily: theme.textVariants.defaults.fontFamily,
3535
}}
3636
secureTextEntry={!showPassword}
3737
textContentType="none"

packages/react-native/src/evm/components/SendFunds/SendButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ const SendFundsForm = ({
289289
onChangeText={setReceiverAddress}
290290
style={{
291291
color: theme.colors.textPrimary,
292-
fontFamily: theme.textVariants.defaults.fontFamily,
292+
// fontFamily: theme.textVariants.defaults.fontFamily,
293293
textAlign: "left",
294294
flex: 1,
295295
height: 40,
@@ -323,7 +323,7 @@ const SendFundsForm = ({
323323
clearTextOnFocus={false}
324324
style={{
325325
color: theme.colors.textPrimary,
326-
fontFamily: theme.textVariants.defaults.fontFamily,
326+
// fontFamily: theme.textVariants.defaults.fontFamily,
327327
textAlign: "left",
328328
flex: 1,
329329
height: 40,

packages/react-native/src/evm/components/SendFunds/TokenSelector.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export function TokenSelector(props: {
141141
onChangeText={setInput}
142142
style={{
143143
color: theme.colors.textPrimary,
144-
fontFamily: theme.textVariants.defaults.fontFamily,
144+
// fontFamily: theme.textVariants.defaults.fontFamily,
145145
textAlign: "left",
146146
flex: 1,
147147
height: 40,

packages/react-native/src/evm/i18n/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,14 @@ export const _en = {
7777
request_new_code: "Request new code",
7878
sign_in: "Sign In",
7979
sign_in_google: "Sign in with Google",
80+
enter_your_email: "Enter your email address",
8081
},
8182
wallet_connect: {
8283
no_results_found: "No results found",
8384
search_wallets: "Search Wallets",
8485
},
8586
common: {
87+
connect_app: "Connect app",
8688
unknown_network: "Unknown Network",
8789
fetching: "Fetching...",
8890
password: "Password",

packages/react-native/src/evm/styles/textVariants.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { Platform } from "react-native";
2-
31
export const textVariants = {
4-
defaults: {
5-
fontFamily: Platform.OS === "ios" ? "san Francisco" : "Roboto",
6-
fontSize: 24,
7-
fontWeight: "700",
8-
lineHeight: 32,
9-
color: "textPrimary",
10-
},
2+
// defaults: {
3+
// fontFamily: "ShopifySans", //Platform.OS === "ios" ? "San Francisco" : "Roboto",
4+
// fontSize: 24,
5+
// fontWeight: "700",
6+
// lineHeight: 32,
7+
// color: "textPrimary",
8+
// },
119
header: {
1210
fontSize: 24,
1311
fontWeight: "600",

packages/react-native/src/evm/wallets/wallets/embedded/EmbeddedSelectionUI.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const EmailSelectionUI: React.FC<
120120
textAlign="center"
121121
marginHorizontal="xxs"
122122
>
123-
OR
123+
{l.common.or}
124124
</Text>
125125
<Box height={1} flex={1} backgroundColor="border" />
126126
</Box>
@@ -131,13 +131,13 @@ export const EmailSelectionUI: React.FC<
131131
<>
132132
<TextInput
133133
textInputProps={{
134-
placeholder: "Enter your email address",
134+
placeholder: l.embedded_wallet.enter_your_email,
135135
placeholderTextColor: theme.colors.textSecondary,
136136
onChangeText: setEmailInput,
137137
style: {
138138
fontSize: 14,
139139
color: theme.colors.textPrimary,
140-
fontFamily: theme.textVariants.defaults.fontFamily,
140+
// fontFamily: theme.textVariants.defaults.fontFamily,
141141
lineHeight: 16,
142142
padding: 0,
143143
flex: 1,

packages/react-native/src/evm/wallets/wallets/magic-link.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,15 @@ const MagicSelectionUI: React.FC<SelectUIProps<MagicLink>> = (props) => {
6969
<Box paddingHorizontal="xl" mt="lg">
7070
<TextInput
7171
textInputProps={{
72-
placeholder: "Enter your email address",
72+
placeholder: l.embedded_wallet.enter_your_email,
7373
placeholderTextColor: theme.colors.textSecondary,
7474
onChangeText: (text: string) => {
7575
setEmail(text);
7676
},
7777
style: {
7878
fontSize: 14,
7979
color: theme.colors.textPrimary,
80-
fontFamily: theme.textVariants.defaults.fontFamily,
80+
// fontFamily: theme.textVariants.defaults.fontFamily,
8181
lineHeight: 16,
8282
padding: 0,
8383
},

packages/react-native/src/evm/wallets/wallets/wallet-connect/WalletConnectUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export function WalletConnectUI({
198198
style={{
199199
...styles.textInput,
200200
color: theme.colors.textSecondary,
201-
fontFamily: theme.textVariants.defaults.fontFamily,
201+
// fontFamily: theme.textVariants.defaults.fontFamily,
202202
}}
203203
/>
204204
</Box>

0 commit comments

Comments
 (0)