Skip to content
Snippets Groups Projects
Commit e9f78e82 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

app-shell: add i18next-scanner support

parent cffb9d5f
No related branches found
No related tags found
1 merge request!67Create a new i18next instance for every web component
module.exports = {
input: [
'src/*.js',
],
output: './',
options: {
debug: false,
removeUnusedKeys: true,
func: {list: ['i18n.t', '_i18n.t']},
lngs: ['en','de'],
resource: {
loadPath: 'src/i18n/{{lng}}/{{ns}}.json',
savePath: 'src/i18n/{{lng}}/{{ns}}.json'
},
},
}
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
"rollup-plugin-copy": "^3.1.0", "rollup-plugin-copy": "^3.1.0",
"rollup-plugin-delete": "^2.0.0", "rollup-plugin-delete": "^2.0.0",
"rollup-plugin-emit-ejs": "^3.1.0", "rollup-plugin-emit-ejs": "^3.1.0",
"rollup-plugin-serve": "^1.0.1" "rollup-plugin-serve": "^1.0.1",
"i18next-scanner": "^3.0.0"
}, },
"dependencies": { "dependencies": {
"@dbp-toolkit/auth": "^0.2.2", "@dbp-toolkit/auth": "^0.2.2",
...@@ -47,6 +48,7 @@ ...@@ -47,6 +48,7 @@
"universal-router": "^9.0.1" "universal-router": "^9.0.1"
}, },
"scripts": { "scripts": {
"i18next": "i18next-scanner",
"build": "npm run build-local", "build": "npm run build-local",
"build-local": "rollup -c", "build-local": "rollup -c",
"build-test": "rollup -c --environment BUILD:test", "build-test": "rollup -c --environment BUILD:test",
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
"hello-world": "Hallo Welt" "hello-world": "Hallo Welt"
}, },
"welcome": { "welcome": {
"headline": "Willkommen bei der Applikation '{{appname}}'." "headline": "Willkommen bei der Applikation '{{appname}}'."
}, },
"login": "Einloggen", "login": "Einloggen",
"logout": "Ausloggen", "logout": "Ausloggen",
"page-not-found": "Die gewünschte Seite wurde nicht gefunden", "page-not-found": "Die gewünschte Seite wurde nicht gefunden",
"choose-from-menu": "Bitte wählen Sie eine Aktivität aus dem Menu." "choose-from-menu": "Bitte wählen Sie eine Aktivität aus dem Menu."
} }
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"hello-world": "Hello World" "hello-world": "Hello World"
}, },
"welcome": { "welcome": {
"headline": "Welcome to the '{{appname}}' application." "headline": "Welcome to the '{{appname}}' application."
}, },
"login": "Login", "login": "Login",
"logout": "Logout", "logout": "Logout",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment