forked from thirdweb-dev/js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
en.ts
370 lines (366 loc) · 13.9 KB
/
en.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
import { ThirdwebLocale } from "./types";
import { DeepPartial, immutableOverride } from "../utils/applyOverrides";
// wallets that connect via extension and QR scan
function extensionAndQRScanScreens(walletName: string) {
return {
connectionScreen: {
inProgress: "Awaiting Confirmation",
failed: "Connection failed",
instruction: `Accept the connection request in ${walletName} wallet`,
retry: "Try Again",
},
getStartedScreen: {
instruction: `Scan the QR code to download ${walletName} app`,
},
scanScreen: {
instruction: `Scan the QR code with ${walletName} wallet app to connect`,
},
getStartedLink: `Don't have ${walletName} wallet?`,
};
}
export function enDefault(): ThirdwebLocale {
return {
connectWallet: {
signIn: "Sign in",
defaultButtonTitle: "Connect Wallet",
connecting: "Connecting",
switchNetwork: "Switch Network",
switchingNetwork: "Switching Network",
defaultModalTitle: "Connect",
recommended: "Recommended",
installed: "Installed",
continueAsGuest: "Continue as guest",
connectAWallet: "Connect a wallet",
newToWallets: "New to wallets?",
getStarted: "Get started",
guest: "Guest",
send: "Send",
receive: "Receive",
currentNetwork: "Current network",
switchAccount: "Switch Account",
requestTestnetFunds: "Request Testnet Funds",
transactionHistory: "Transaction History",
backupWallet: "Backup Wallet",
guestWalletWarning:
"This is a temporary guest wallet. Backup wallet if you don't want to lose access to it",
switchTo: "Switch to", // Used in "Switch to <Wallet-Name>"
connectedToSmartWallet: "Connected To Smart Account",
confirmInWallet: "Confirm in wallet",
disconnectWallet: "Disconnect Wallet",
copyAddress: "Copy Address",
personalWallet: "Personal Wallet",
smartWallet: "Smart Account",
or: "OR",
goBackButton: "Back",
download: {
chrome: "Download Chrome Extension",
android: "Download on Google Play",
iOS: "Download on App Store",
},
welcomeScreen: {
defaultTitle: "Your gateway to the decentralized world",
defaultSubtitle: "Connect a wallet to get started",
},
agreement: {
prefix: "By connecting, you agree to the",
termsOfService: "Terms of Service",
and: "&",
privacyPolicy: "Privacy Policy",
},
networkSelector: {
title: "Select Network",
mainnets: "Mainnets",
testnets: "Testnets",
allNetworks: "All",
addCustomNetwork: "Add Custom Network",
inputPlaceholder: "Search Network or Chain ID",
categoryLabel: {
recentlyUsed: "Recently Used",
popular: "Popular",
others: "All Networks",
},
loading: "Loading",
failedToSwitch: "Failed to switch network",
},
receiveFundsScreen: {
title: "Receive Funds",
instruction: "Copy the wallet address to send funds to this wallet",
},
sendFundsScreen: {
title: "Send Funds",
submitButton: "Send",
token: "Token",
sendTo: "Send to",
amount: "Amount",
successMessage: "Transaction Successful",
invalidAddress: "Invalid Address",
noTokensFound: "No Tokens Found",
searchToken: "Search or Paste token address",
transactionFailed: "Transaction Failed",
transactionRejected: "Transaction Rejected",
insufficientFunds: "Insufficient Funds",
selectTokenTitle: "Select a Token",
sending: "Sending",
},
signatureScreen: {
instructionScreen: {
title: "Sign in",
instruction:
"Please sign the message request in your wallet to continue",
signInButton: "Sign in",
disconnectWallet: "Disconnect Wallet",
},
signingScreen: {
title: "Signing In",
prompt: "Sign the signature request in your wallet",
promptForSafe:
"Sign signature request in your wallet & approve transaction in Safe",
approveTransactionInSafe: "Approve transaction in Safe",
tryAgain: "Try Again",
failedToSignIn: "Failed to Sign in",
inProgress: "Awaiting Confirmation",
},
},
},
wallets: {
walletConnect: {
scanInstruction: "Scan this with your wallet app to connect",
},
smartWallet: {
connecting: "Connecting to Smart Account",
failedToConnect: "Failed to connect to Smart Acount",
wrongNetworkScreen: {
title: "Wrong Network",
subtitle: "Your wallet is not connected to the required network",
failedToSwitch: "Failed to switch network",
},
},
safeWallet: {
connectWalletScreen: {
title: "Link personal wallet",
subtitle: "Connect your personal wallet to use Safe.",
learnMoreLink: "Learn more",
},
accountDetailsScreen: {
title: "Enter your safe details",
findSafeAddressIn: "You can find your safe address in", // You can find your safe address in + <dashboardLink>
dashboardLink: "Safe Dashboard", // <dashboardLink>
network: "Safe Network",
selectNetworkPlaceholder: "Network your safe is deployed to",
invalidChainConfig:
"Can not use Safe: No Safe supported chains are configured in App",
failedToConnect:
"Could not connect to Safe. Make sure safe address and network are correct.",
failedToSwitch: "Failed to switch network",
switchNetwork: "Switch Network",
switchingNetwork: "Switching Network",
connectToSafe: "Connect to Safe",
connecting: "Connecting",
mainnets: "Mainnets",
testnets: "Testnets",
safeAddress: "Safe Address",
},
},
coinbaseWallet: extensionAndQRScanScreens("Coinbase"),
magicEdenWallet: extensionAndQRScanScreens("Magic Eden"),
metamaskWallet: extensionAndQRScanScreens("MetaMask"),
okxWallet: extensionAndQRScanScreens("OKX"),
phantomWallet: extensionAndQRScanScreens("Phantom"),
xdefiWallet: extensionAndQRScanScreens("XDEFI"),
rainbowWallet: extensionAndQRScanScreens("Rainbow"),
trustWallet: extensionAndQRScanScreens("Trust"),
imTokenWallet: extensionAndQRScanScreens("imToken"),
zerionWallet: extensionAndQRScanScreens("Zerion"),
coreWallet: extensionAndQRScanScreens("Core"),
oneKeyWallet: extensionAndQRScanScreens("OneKey"),
cryptoDefiWallet: extensionAndQRScanScreens("Crypto Defi"),
rabbyWallet: extensionAndQRScanScreens("Rabby"),
coin98Wallet: extensionAndQRScanScreens("Coin98"),
paperWallet: {
signIn: "Sign in",
signInWithGoogle: "Sign in with Google",
emailPlaceholder: "Enter your email address",
submitEmail: "Continue",
invalidEmail: "Invalid email address",
emailRequired: "Email address is required",
googleLoginScreen: {
title: "Sign in",
instruction: "Select your Google account in the pop-up",
failed: "Failed to sign in",
retry: "Retry",
},
emailLoginScreen: {
title: "Sign in",
enterCodeSendTo: "Enter the verification code sent to", // Enter the verification code sent to + <email>
newDeviceDetected: "New device detected",
enterRecoveryCode:
"Enter the recovery code emailed to you when you first signed up",
invalidCode: "Invalid verification code",
invalidCodeOrRecoveryCode:
"Invalid verification code or Recovery code",
verify: "Verify",
failedToSendCode: "Failed to send verification code",
sendingCode: "Sending verification code",
resendCode: "Resend verification code",
},
},
embeddedWallet: {
signInWithGoogle: "Sign in with Google",
signInWithFacebook: "Sign in with Facebook",
signInWithApple: "Sign in with Apple",
emailPlaceholder: "Enter your email address",
submitEmail: "Continue",
signIn: "Sign in",
emailRequired: "Email address is required",
invalidEmail: "Invalid email address",
maxAccountsExceeded:
"Maximum number of accounts exceeded. Please notify the app developer.",
socialLoginScreen: {
title: "Sign in",
instruction: "Sign into your account in the pop-up",
failed: "Failed to sign in",
retry: "Retry",
},
emailLoginScreen: {
title: "Sign in",
enterCodeSendTo: "Enter the verification code sent to",
newDeviceDetected: "New device detected",
enterRecoveryCode:
"Enter the recovery code emailed to you when you first signed up",
invalidCode: "Invalid verification code",
invalidCodeOrRecoveryCode:
"Invalid verification code or Recovery code",
verify: "Verify",
failedToSendCode: "Failed to send verification code",
sendingCode: "Sending verification code",
resendCode: "Resend verification code",
},
createPassword: {
title: "Create Password",
instruction:
"Set a password for your account. You will need this password when connecting from a new device.",
saveInstruction: "Make sure to save it",
inputPlaceholder: "Enter your password",
confirmation: "I have saved my password",
submitButton: "Set Password",
failedToSetPassword: "Failed to set password",
},
enterPassword: {
title: "Enter Password",
instruction: "Enter the password for your account",
inputPlaceholder: "Enter your password",
submitButton: "Verify",
wrongPassword: "Wrong password",
},
},
magicLink: {
signIn: "Sign in",
loginWith: "Login with",
submitEmail: "Continue",
loginWithEmailOrPhone: "Login with email or phone number",
emailOrPhoneRequired: "email or phone number is required",
loginWithPhone: "Login with phone number",
phoneRequired: "phone number is required",
invalidEmail: "Invalid email address",
invalidPhone: "Invalid phone number",
invalidEmailOrPhone: "Invalid email address or phone number",
countryCodeMissing: "Phone number must start with a country code",
emailPlaceholder: "Enter your email address",
emailRequired: "Email address is required",
},
localWallet: {
passwordLabel: "Password",
confirmPasswordLabel: "Confirm Password",
enterYourPassword: "Enter your password",
warningScreen: {
title: "Warning",
warning:
"Your current wallet will be deleted if you create a new wallet. Backup wallet to your device before creating a new wallet",
backupWallet: "Backup Wallet",
},
reconnectScreen: {
title: "Connect to saved wallet",
savedWallet: "Saved Wallet",
continue: "Continue",
createNewWallet: "Create a new wallet",
},
createScreen: {
instruction:
"Choose a password for your wallet. You'll be able to access and export this wallet with the same password",
importWallet: "Import Wallet",
createNewWallet: "Create new wallet",
connecting: "Connecting",
},
exportScreen: {
description1:
"This will download a JSON file containing the wallet information onto your device encrypted with the password",
description2:
"You can use this JSON file to import the account in MetaMask using the same password",
walletAddress: "Wallet Address",
download: "Download",
title: "Backup Wallet",
},
importScreen: {
title: "Import Wallet",
description1:
"The application can authorize any transactions on behalf of the wallet without any approvals",
description2: "We recommend only connecting to trusted applications",
import: "Import",
uploadJSON: "Please upload a JSON file",
uploadedSuccessfully: "Uploaded successfully",
},
},
frameWallet: {
...extensionAndQRScanScreens("Frame"),
connectionFailedScreen: {
title: "Failed to connect to Frame",
description:
"Make sure the desktop app is installed and running. You can download Frame from the link below. Make sure to refresh this page once Frame is running.",
downloadFrame: "Download Frame",
supportLink: "Still having troubles connecting?",
},
},
},
};
}
/**
* Calling this function will return the default English locale object to be set on [`ThirdwebProvider`](https://portal.thirdweb.com/react/v4/ThirdwebProvider) to localize the thirdweb components.
*
* You can also overrides parts of the default locale object by passing an object with the same structure as the default locale object and only those parts will be overridden.
*
* @example
* ### Use default Locale
* ```tsx
* const english = en();
* ```
*
* ### Override Locale
* ```ts
* const english = en({
* connectWallet: {
* signIn: "Sign in!"
* }
* })
* ```
*
* Pass it to [`ThirdwebProvider`](https://portal.thirdweb.com/react/v4/ThirdwebProvider)'s `locale` prop to localize the thirdweb components.
*
* ```tsx
* function Example() {
* return (
* <ThirdwebProvider locale={english}>
* <App />
* </ThirdwebProvider>
* )
* }
* ```
*
* @locale
*/
export function en(overrides?: DeepPartial<ThirdwebLocale>) {
const defaultObj = enDefault();
if (!overrides) {
return defaultObj;
}
return immutableOverride(defaultObj, overrides);
}