From 74ab2ecb93361cd84f6927bd04c60147fb9b2501 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Wed, 13 Nov 2019 22:55:30 +0100 Subject: [PATCH 01/10] i18n all the strings --- app-strings.json | 32 ++++++++ src/component/AppNavigator.js | 6 +- src/component/address/view.js | 4 +- src/component/categoryList/index.js | 4 - src/component/categoryList/view.js | 39 --------- src/component/channelIconItem/view.js | 2 +- src/component/channelRewardsDriver/view.js | 4 +- src/component/channelSelector/view.js | 22 ++--- src/component/claimList/view.js | 4 +- src/component/customRewardCard/view.js | 10 +-- src/component/drawerContent/view.js | 29 +++---- src/component/fileDownloadButton/view.js | 16 ++-- src/component/fileItem/view.js | 2 +- src/component/fileListItem/view.js | 2 +- src/component/filePrice/view.js | 13 ++- src/component/fileRewardsDriver/view.js | 2 +- .../modalSuggestedSubscriptions/view.js | 2 +- src/component/modalTagSelector/view.js | 5 +- src/component/nsfwOverlay/view.js | 2 +- src/component/publishRewardsDriver/view.js | 4 +- src/component/rewardCard/view.js | 6 +- src/component/rewardEnrolment/view.js | 16 ++-- src/component/rewardSummary/index.js | 20 ----- src/component/rewardSummary/view.js | 82 ------------------- src/component/searchInput/index.js | 19 ----- src/component/searchInput/view.js | 41 ---------- src/component/storageStatsCard/view.js | 14 ++-- src/component/suggestedSubscriptions/view.js | 2 +- src/component/tagSearch/view.js | 2 +- .../internal/transaction-list-item.js | 10 +-- src/component/transactionList/view.js | 2 +- src/component/transactionListRecent/view.js | 16 ++-- src/component/walletAddress/view.js | 11 +-- src/component/walletBalance/view.js | 4 +- src/component/walletSend/view.js | 18 ++-- src/component/walletSignIn/view.js | 15 +++- src/component/walletSyncDriver/view.js | 30 +++---- src/i18n.js | 66 +++++++++++++++ src/index.js | 6 +- src/page/discover/view.js | 3 +- src/page/downloads/view.js | 10 +-- src/page/publish/view.js | 2 +- src/page/publishes/view.js | 2 +- src/page/rewards/view.js | 1 - src/page/settings/view.js | 2 +- src/page/subscriptions/view.js | 2 +- 46 files changed, 260 insertions(+), 346 deletions(-) create mode 100644 app-strings.json delete mode 100644 src/component/categoryList/index.js delete mode 100644 src/component/categoryList/view.js delete mode 100644 src/component/rewardSummary/index.js delete mode 100644 src/component/rewardSummary/view.js delete mode 100644 src/component/searchInput/index.js delete mode 100644 src/component/searchInput/view.js create mode 100644 src/i18n.js diff --git a/app-strings.json b/app-strings.json new file mode 100644 index 0000000..fd416ef --- /dev/null +++ b/app-strings.json @@ -0,0 +1,32 @@ +{ + "Content Interests": "Content Interests", + "Suggested channels": "Suggested channels", + "You might also like": "You might also like", + "Follow": "Follow", + "About": "About", + "Sign In": "Sign In", + "SIGN IN": "SIGN IN", + "FREE": "FREE", + "Anonymous": "Anonymous", + "An account with LBRY Inc. allows you to earn rewards, backup your wallet, and keep everything synced.": "An account with LBRY Inc. allows you to earn rewards, backup your wallet, and keep everything synced.", + "Without an account, you assume all responsibility for securing your wallet and LBRY data.": "Without an account, you assume all responsibility for securing your wallet and LBRY data.", + "Skip Account": "Skip Account", + "Sign Up": "Sign Up", + "Balance": "Balance", + "You currently have": "You currently have", + "Receive Credits": "Receive Credits", + "Use this wallet address to receive credits sent by another user (or yourself).": "Use this wallet address to receive credits sent by another user (or yourself).", + "Get new address": "Get new address", + "You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.": "You can generate a new address at any time, and any previous addresses will continue to work. Using multiple addresses can be helpful for keeping track of incoming payments from multiple sources.", + "Send Credits": "Send Credits", + "Recipient address": "Recipient address", + "Amount": "Amount", + "View All": "View All", + "Looks like you don't have any recent transactions.": "Looks like you don't have any recent transactions.", + "Wallet Sync": "Wallet Sync", + "Sync status": "Sync status", + "Off": "Off", + "Manual backup": "Manual backup", + "Sync FAQ": "Sync FAQ", + "Fetching transactions...": "Fetching transactions..." +} \ No newline at end of file diff --git a/src/component/AppNavigator.js b/src/component/AppNavigator.js index e335cba..5148642 100644 --- a/src/component/AppNavigator.js +++ b/src/component/AppNavigator.js @@ -363,7 +363,7 @@ class AppWithNavigationState extends React.Component { this.setState({ verifyPending: false }); NativeModules.Firebase.track('email_verified', { email: user.primary_email }); - ToastAndroid.show('Your email address was successfully verified.', ToastAndroid.LONG); + ToastAndroid.show(__('Your email address was successfully verified.'), ToastAndroid.LONG); // get user settings after email verification this.getUserSettings(); @@ -400,7 +400,7 @@ class AppWithNavigationState extends React.Component { this.setState({ emailVerifyDone: true }); const message = emailVerifyErrorMessage ? String(emailVerifyErrorMessage) - : 'Your email address was successfully verified.'; + : __('Your email address was successfully verified.'); if (!emailVerifyErrorMessage) { AsyncStorage.removeItem(Constants.KEY_FIRST_RUN_EMAIL); } @@ -455,7 +455,7 @@ class AppWithNavigationState extends React.Component { try { dispatch(doUserEmailVerify(verification.token, verification.recaptcha)); } catch (error) { - const message = 'Invalid Verification Token'; + const message = __('Invalid Verification Token'); dispatch(doUserEmailVerifyFailure(message)); dispatch(doToast({ message })); } diff --git a/src/component/address/view.js b/src/component/address/view.js index 36fe8f0..0f66b77 100644 --- a/src/component/address/view.js +++ b/src/component/address/view.js @@ -15,7 +15,7 @@ export default class Address extends React.PureComponent { return ( - + {address || ''}