Skip to content

Commit

Permalink
Update i18next instance warnings (#1159)
Browse files Browse the repository at this point in the history
* Update i18next instance warning in Trans.js

* Update i18next warning in useTranslation.js

* Update i18next warning in react-i18next.js
  • Loading branch information
GoelBiju authored Aug 16, 2020
1 parent 9918c0c commit a24180f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions react-i18next.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@
var i18n = i18nFromProps || i18nFromContext || getI18n();

if (!i18n) {
warnOnce('You will need pass in an i18next instance by using i18nextReactModule');
warnOnce('You will need to pass in an i18next instance by using i18nextReactModule');
return children;
}

Expand Down Expand Up @@ -776,7 +776,7 @@
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();

if (!i18n) {
warnOnce('You will need pass in an i18next instance by using initReactI18next');
warnOnce('You will need to pass in an i18next instance by using initReactI18next');

var notReadyT = function notReadyT(k) {
return Array.isArray(k) ? k[k.length - 1] : k;
Expand Down
2 changes: 1 addition & 1 deletion src/Trans.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export function Trans({
const i18n = i18nFromProps || i18nFromContext || getI18n();

if (!i18n) {
warnOnce('You will need pass in an i18next instance by using i18nextReactModule');
warnOnce('You will need to pass in an i18next instance by using i18nextReactModule');
return children;
}

Expand Down
2 changes: 1 addition & 1 deletion src/useTranslation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function useTranslation(ns, props = {}) {
const i18n = i18nFromProps || i18nFromContext || getI18n();
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
if (!i18n) {
warnOnce('You will need pass in an i18next instance by using initReactI18next');
warnOnce('You will need to pass in an i18next instance by using initReactI18next');
const notReadyT = k => (Array.isArray(k) ? k[k.length - 1] : k);
const retNotReady = [notReadyT, {}, false];
retNotReady.t = notReadyT;
Expand Down

0 comments on commit a24180f

Please sign in to comment.