mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 14:26:58 -04:00
chore: localize
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { errorLogger } from '@strudel/core';
|
||||
import { storePrebakeScript } from '../../../settings.mjs';
|
||||
import { confirmDialog, PREBAKE_CHANGE_MSG } from '@src/repl/util.mjs';
|
||||
import { confirmDialog } from '@src/repl/util.mjs';
|
||||
|
||||
async function importScript(script, updateEditor) {
|
||||
const reader = new FileReader();
|
||||
@@ -31,7 +31,7 @@ export async function exportScript(script) {
|
||||
export function ImportPrebakeScriptButton({ updateEditor }) {
|
||||
const handleChange = async (e) => {
|
||||
const file = e.target.files[0];
|
||||
const confirmed = await confirmDialog(PREBAKE_CHANGE_MSG);
|
||||
const confirmed = await confirmDialog('Warning: This will overwrite the current prebake.\nContinue?');
|
||||
if (!confirmed) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ export function confirmDialog(msg) {
|
||||
});
|
||||
}
|
||||
export const SETTING_CHANGE_RELOAD_MSG = 'Changing this setting requires the window to reload itself. OK?';
|
||||
export const PREBAKE_CHANGE_MSG = 'Warning: This will overwrite the current prebake.\nContinue?';
|
||||
|
||||
export function confirmAndReloadPage(onSuccess) {
|
||||
confirmDialog(SETTING_CHANGE_RELOAD_MSG).then((r) => {
|
||||
if (r == true) {
|
||||
|
||||
Reference in New Issue
Block a user