diff --git a/package-lock.json b/package-lock.json index 19995af76..318abc91b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21414,9 +21414,9 @@ "integrity": "sha512-1XgkCpwMnNQsuOIy938UCntz8Xzwt9ECwHaH3cCfIQK1SPpH+y7gCYtqEcb6Rm0hAUq7Lp9+Ljoti9zGMswYrQ==" }, "react-i18next": { - "version": "10.1.2", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-10.1.2.tgz", - "integrity": "sha512-0YGaZE7E9i+ZKsFXV8T1dSlUj3xim8Jn4dfn0fcpJxrkTlhLNZCPqc+zouroUku+CUKasupoek4rosUUq5VdeQ==", + "version": "10.11.4", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-10.11.4.tgz", + "integrity": "sha512-/CWXaf3a5BLNeVnBGxzWOIZLQgSNEc2LWHX4ZaJb7ww0xgY0S5K9HRAMzJIHeHGe7jfpSraprD66VDblWb4ZXA==", "requires": { "@babel/runtime": "^7.3.1", "html-parse-stringify2": "2.0.1" diff --git a/package.json b/package.json index bcc24fbe4..a26f3b6bb 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "react-dom": "^16.6.0", "react-emoji-render": "^0.5.0", "react-file-reader-input": "^2.0.0", - "react-i18next": "^10.1.2", + "react-i18next": "^10.11.4", "react-linkify": "^0.2.2", "react-native-webview-messaging": "^1.2.3", "react-qr-reader": "^2.1.1", diff --git a/src/components/Advanced.js b/src/components/Advanced.js index 0e844ce05..3cf821183 100644 --- a/src/components/Advanced.js +++ b/src/components/Advanced.js @@ -52,13 +52,8 @@ class Advanced extends React.Component { } render(){ -<<<<<<< HEAD - let {isVendor, balance, privateKey, changeAlert, changeView, setPossibleNewPrivateKey} = this.props - let { currency, expertMode } = this.state -======= let {isVendor, balance, privateKey, changeAlert, changeView, setPossibleNewPrivateKey, t} = this.props let { currency } = this.state ->>>>>>> Fix Use react-i18next instead of i18n #173 let url = window.location.protocol+"//"+window.location.hostname if(window.location.port&&window.location.port!==80&&window.location.port!==443){ diff --git a/src/components/Bity.js b/src/components/Bity.js index f96d6f763..e71becef7 100644 --- a/src/components/Bity.js +++ b/src/components/Bity.js @@ -359,7 +359,7 @@ class Bity extends Component { render() { const { fields } = this.state; - let { t } = this.props; + let { t, currencyDisplay } = this.props; return (
diff --git a/src/components/Exchange.js b/src/components/Exchange.js index 4c80547de..3652f1ecd 100644 --- a/src/components/Exchange.js +++ b/src/components/Exchange.js @@ -890,7 +890,7 @@ class Exchange extends React.Component { // NOTE: Technically we're not "depositing" but that was the // only way I was able to make the loading bar show up... daiToXdaiMode:"depositing", - loaderBarStatusText: i18n.t('exchange.fast_exit_swap'), + loaderBarStatusText: t('exchange.fast_exit_swap'), loaderBarColor:"#3efff8", loaderBarPercent:30, loaderBarStartTime: Date.now(), @@ -929,7 +929,7 @@ class Exchange extends React.Component { console.log(rsp); this.updatePendingExits(this.state.daiAddress, this.state.xdaiweb3); this.setState({ - loaderBarStatusText: i18n.t('exchange.fast_exit_patience'), + loaderBarStatusText: t('exchange.fast_exit_patience'), loaderBarPercent:75, loaderBarStartTime: Date.now(), loaderBarClick:()=>{ @@ -939,7 +939,7 @@ class Exchange extends React.Component { this.setState({ daiToXdaiAmount: "", daiToXdaiMode: false }); this.props.changeAlert({ type: "success", - message: i18n.t("exchange.fast_exit_patience") + message: t("exchange.fast_exit_patience") }); }).catch(err => { console.log(err); @@ -966,7 +966,7 @@ class Exchange extends React.Component { this.updatePendingExits(this.state.daiAddress, this.state.xdaiweb3); this.props.changeAlert({ type: "success", - message: i18n.t("exchange.fast_exit_patience") + message: t("exchange.fast_exit_patience") }); this.setState({ daiToXdaiAmount: "", diff --git a/src/components/MoreButtons.js b/src/components/MoreButtons.js index a337610a7..de1bc2ff0 100644 --- a/src/components/MoreButtons.js +++ b/src/components/MoreButtons.js @@ -6,6 +6,7 @@ import { withTranslation } from "react-i18next"; function MoreButtons ({ isVendor, changeView, + expertMode, t }) { let exchangeButton; diff --git a/src/components/SendToAddress.js b/src/components/SendToAddress.js index a13aac604..7b8275d36 100644 --- a/src/components/SendToAddress.js +++ b/src/components/SendToAddress.js @@ -32,6 +32,7 @@ class SendToAddress extends React.Component { convertCurrency, changeAlert, address, + t } = props; @@ -54,7 +55,7 @@ class SendToAddress extends React.Component { // NOTE: In this case, we scan the RequestFunds QR code and if "currency" // is missing, we display a warning. } else if (((toAddress && amount) || message) && !currency) { - changeAlert({type: "warning", message: i18n.t("send_to_address.currency_error")}); + changeAlert({type: "warning", message: t("send_to_address.currency_error")}); // NOTE: We're setting currency equal to displayCurrency here to not // trigger the next condition, as that would set currencyWarning to // true again.