Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit d4bf162

Browse files
committed
i18n: Add i18next-http-backend to library loader
1 parent d14cf7c commit d4bf162

File tree

4 files changed

+39
-1
lines changed

4 files changed

+39
-1
lines changed

package-lock.json

Lines changed: 33 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
"http-proxy-agent": "7.0.2",
6868
"https-proxy-agent": "7.0.4",
6969
"i18next": "^23.12.2",
70+
"i18next-http-backend": "^2.5.2",
7071
"image-type": "4.1.0",
7172
"ini": "3.0.1",
7273
"is-animated": "2.0.2",

src/public/app/services/library_loader.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ const MARKJS = {
7272
]
7373
};
7474

75-
const I18NEXT = { js: [ "node_modules/i18next/i18next.min.js" ] };
75+
const I18NEXT = { js: [
76+
"node_modules/i18next/i18next.min.js",
77+
"node_modules/i18next-http-backend/i18nextHttpBackend.min.js"
78+
] };
7679

7780
async function requireLibrary(library) {
7881
if (library.css) {

src/routes/assets.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ function register(app: express.Application) {
7272

7373
// i18n
7474
app.use(`/${assetPath}/node_modules/i18next/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next/')));
75+
app.use(`/${assetPath}/node_modules/i18next-http-backend/`, persistentCacheStatic(path.join(srcRoot, "..", 'node_modules/i18next-http-backend/')));
7576
app.use(`/${assetPath}/translations/`, persistentCacheStatic(path.join(srcRoot, "public", "translations/")));
7677
}
7778

0 commit comments

Comments
 (0)