2019-10-09 16:52:18 +02:00
|
|
|
import i18n from "i18next";
|
|
|
|
|
import { reactI18nextModule } from "react-i18next";
|
|
|
|
|
import { addDecorator, configure } from "@storybook/react";
|
|
|
|
|
import { withI18next } from "storybook-addon-i18next";
|
|
|
|
|
|
2019-10-10 10:46:09 +02:00
|
|
|
import "!style-loader!css-loader!sass-loader!../../ui-styles/src/scm.scss";
|
2019-10-09 16:52:18 +02:00
|
|
|
|
|
|
|
|
i18n.use(reactI18nextModule).init({
|
|
|
|
|
whitelist: ["en", "de", "es"],
|
|
|
|
|
lng: "en",
|
|
|
|
|
fallbackLng: "en",
|
|
|
|
|
interpolation: {
|
|
|
|
|
escapeValue: false
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
addDecorator(
|
|
|
|
|
withI18next({
|
|
|
|
|
i18n,
|
|
|
|
|
languages: {
|
|
|
|
|
en: "English",
|
|
|
|
|
de: "Deutsch",
|
|
|
|
|
es: "Spanisch"
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
);
|
|
|
|
|
|
2019-10-19 16:38:07 +02:00
|
|
|
configure(require.context("../src", true, /\.stories\.tsx?$/), module);
|