-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useNotify function throws warning to console (React admin 3.0.0-beta.3) #3903
Comments
Maybe this can help you: |
Even if So I'm flagging it as a documentation issue. |
Fixed by #3930 |
I would personally update all the places where Was about to open a new issue until I saw this :) |
It wasn't clear to me from @WiXSL's answer how to turn this off. I didnt know where to put the code that he's supplied and how to integrate it into my app. I managed to piece it togther from his code and the ra-i18n-polyglot documentation. You need to add this to your top level component; the one where you have imported the import polyglotI18nProvider from "ra-i18n-polyglot";
import englishMessages from "ra-language-english";
const messages = {
en: englishMessages
};
const i18nProvider = polyglotI18nProvider(locale => messages[locale], "en", {
allowMissing: true
});
const App = () => (
<Admin
dataProvider={dataProvider}
dashboard={Dashboard}
authProvider={AuthProvider(authConfig)}
locale="en" // Add this...
i18nProvider={i18nProvider} // ... and this
> That was a fair bit of time to work out how to tame a feature that I never needed to be turned on in the first place. Still, once it's done, it's done. |
The following code produces a warning in console about missing notification key. Need to be able to suppress disable translation service for custom notifications
Console log will display a warning:
Warning: Missing translation for key: "Notification Text"
in Notification (created by Layout)
in Layout (created by WithStyles(Layout))
in WithStyles(Layout) (created by Router.Consumer)
in Router.Consumer (created by withRouter(WithStyles(Layout)))
in withRouter(WithStyles(Layout)) (created by Connect(withRouter(WithStyles(Layout))))
in Connect(withRouter(WithStyles(Layout))) (created by LayoutWithTheme)
in LayoutWithTheme (created by Router.Consumer)
in Router.Consumer (created by Route)
in Route (created by CoreAdminRouter)
in CoreAdminRouter (created by Router.Consumer)
in Router.Consumer (created by Route)
in Route (created by CoreAdmin)
in CoreAdmin (at App.js:26)
in App (at src/index.js:14)
The text was updated successfully, but these errors were encountered: