You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
i18n: Replace the window's confirm() and alert(), whose OK and Cancel Electron draws in English #658
Five places still use the window's confirm() and alert(). The message is ours and is translated, but Electron draws the dialog and its buttons, "OK" and "Cancel", in English whatever the language:
confirmAnd (src/renderer/index.jsx): discarding all changes, discarding the edits on trunk before a switch, and discarding before a trunk update (src/renderer/hooks/use-trunk-update.jsx).
alert for a path that could not be copied (src/renderer/index.jsx).
alert for starting the dev server before a build (src/renderer/hooks/use-dev-server.jsx).
The note above confirmAnd already marks moving these to the app's own dialog as a change of its own.
To reproduce
Run npx electron . --lang=en-XA from the repository root, open a site with an uncommitted edit, and discard all changes. The question is bracketed, the buttons are not. Check this by hand, because the journeys answer these dialogs before they are drawn.
Fix
Ask the three questions in the app's own dialog, as a site deletion already does, and say the two failures in the app's own notices. Then nothing is left for confirm() or alert(), and the no-alert exceptions go. Add en-XA journey checks for the new dialog.
Activity
Ask and report in the app's own dialogs, not the window's confirm() a…