catberry / catberry-l10n

Localization module for catberry framework
https://catberry.github.io/
Other
3 stars 1 forks source link

localizationProvider" not registered #12

Closed wormen closed 9 years ago

wormen commented 9 years ago

прописал везде все как написано в инструкции, для использования на сервере, в итоге получил ошибку

Error: Type "localizationProvider" not registered
    at throwIfNoType (http://localhost:3000/bundle.js:7882:9)
    at ServiceLocator.resolve (http://localhost:3000/bundle.js:7816:2)
    at ServiceLocator.<anonymous> (http://localhost:3000/bundle.js:7943:9)
    at Array.map (native)
    at getParameters (http://localhost:3000/bundle.js:7939:37)
    at createInstance (http://localhost:3000/bundle.js:7921:27)
    at ServiceLocator.resolveInstance (http://localhost:3000/bundle.js:7846:9)
    at StoreDispatcher.getStore (http://localhost:3000/bundle.js:4892:4)
    at DocumentRenderer._getComponentContext (http://localhost:3000/bundle.js:3037:25)
    at http://localhost:3000/bundle.js:2991:42

ошибка появляется, как только я вписываю

function Component($localizationProvider)

юзаю последнюю версию catberry

rdner commented 9 years ago

Please post issues in English. Otherwise it won't be answered again.

You should register the plugin in both server.js and browser.js files like it's described in readme.

var l10n = require('catberry-l10n')
// register localization components as singletons
l10n.register(cat.locator);