Skip to content

Commit

Permalink
Change: Replace i18next-xhr-backend with i18next-http-backend
Browse files Browse the repository at this point in the history
i18next-xhr-backend is deprecated and the i18next-http-backend is a drop
in replacement.
  • Loading branch information
bjoernricks committed May 8, 2024
1 parent 81d5db0 commit 21853b6
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 10 deletions.
59 changes: 52 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"history": "^4.10.1",
"hoist-non-react-statics": "^3.3.2",
"i18next": "^23.11.3",
"i18next-xhr-backend": "3.2.2",
"i18next-http-backend": "^2.5.1",
"ical.js": "^2.0.0",
"memoize-one": "^6.0.0",
"moment": "^2.30.1",
Expand Down
4 changes: 2 additions & 2 deletions src/gmp/locale/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/

import i18next from 'i18next';
import XHRBackend from 'i18next-xhr-backend';
import HttpBackend from 'i18next-http-backend';

import logger from 'gmp/log';

Expand Down Expand Up @@ -73,7 +73,7 @@ i18next.on('languageChanged', lang => {
});

export const initLocale = ({
backend = XHRBackend,
backend = HttpBackend,
detector = Detector,
options = I18N_OPTIONS,
} = {}) => i18next.use(backend).use(detector).init(options);
Expand Down

0 comments on commit 21853b6

Please sign in to comment.