2024-10-07 07:06:57 +00:00
|
|
|
import path from 'path'
|
|
|
|
|
|
|
|
import { routes } from './routes'
|
|
|
|
import en from './locales/en.json'
|
|
|
|
import nl from './locales/nl.json'
|
|
|
|
import fr from './locales/fr.json'
|
|
|
|
import de from './locales/de.json'
|
|
|
|
import es from './locales/es.json'
|
|
|
|
import it from './locales/it.json'
|
|
|
|
import pl from './locales/pl.json'
|
2024-11-26 17:53:07 +01:00
|
|
|
import ko from './locales/ko.json'
|
2024-10-07 07:06:57 +00:00
|
|
|
|
|
|
|
export default function DashboardModule(options) {
|
|
|
|
this.addPlugin({ src: path.resolve(__dirname, 'middleware.js') })
|
|
|
|
|
|
|
|
// Add the plugin to register the dashboard application.
|
|
|
|
this.appendPlugin({
|
|
|
|
src: path.resolve(__dirname, 'plugin.js'),
|
|
|
|
})
|
|
|
|
|
|
|
|
// Add all the related routes.
|
|
|
|
this.extendRoutes((configRoutes) => {
|
|
|
|
configRoutes.push(...routes)
|
|
|
|
})
|
|
|
|
|
|
|
|
this.nuxt.hook('i18n:extend-messages', function (additionalMessages) {
|
|
|
|
additionalMessages.push({ en })
|
|
|
|
additionalMessages.push({ nl })
|
|
|
|
additionalMessages.push({ fr })
|
|
|
|
additionalMessages.push({ de })
|
|
|
|
additionalMessages.push({ es })
|
|
|
|
additionalMessages.push({ it })
|
|
|
|
additionalMessages.push({ pl })
|
2024-11-26 17:53:07 +01:00
|
|
|
additionalMessages.push({ ko })
|
2024-10-07 07:06:57 +00:00
|
|
|
})
|
|
|
|
}
|