Skip to content

Commit e12db75

Browse files
flacoonbandi34
authored andcommitted
fix(csrf): i18n for session reload overlay; align error log
- Use getTranslation('csrf_session_reloading') instead of hardcoded English. - Log CSRF mismatch with ERROR prefix consistent with tools.js.
1 parent f451dc2 commit e12db75

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

assets/js/tools.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,8 @@ const photoboothTools = (function () {
165165
}
166166

167167
api.csrfReloadScheduled = true;
168-
const message = 'Session expired. Reloading...';
169-
api.console.log('CSRF mismatch detected.', context);
168+
const message = api.getTranslation('csrf_session_reloading');
169+
api.console.log('ERROR: CSRF token mismatch', context);
170170
api.overlay.showWarning(message);
171171
setTimeout(() => {
172172
api.reloadPage();

resources/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
"commands:take_picture_cmd": "Take picture command",
123123
"commands:take_video_cmd": "Command to take a video",
124124
"confirm": "confirm",
125+
"csrf_session_reloading": "Session expired. Reloading...",
125126
"current_version": "Installed:",
126127
"currentPhpVersion": "Current PHP version:",
127128
"custom": "Custom",

0 commit comments

Comments
 (0)