chore: localize
This commit is contained in:
parent
c16b300144
commit
d3e9b9c020
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { errorLogger } from '@strudel/core';
|
import { errorLogger } from '@strudel/core';
|
||||||
import { storePrebakeScript } from '../../../settings.mjs';
|
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) {
|
async function importScript(script, updateEditor) {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
|
|
@ -31,7 +31,7 @@ export async function exportScript(script) {
|
||||||
export function ImportPrebakeScriptButton({ updateEditor }) {
|
export function ImportPrebakeScriptButton({ updateEditor }) {
|
||||||
const handleChange = async (e) => {
|
const handleChange = async (e) => {
|
||||||
const file = e.target.files[0];
|
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) {
|
if (!confirmed) {
|
||||||
return;
|
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 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) {
|
export function confirmAndReloadPage(onSuccess) {
|
||||||
confirmDialog(SETTING_CHANGE_RELOAD_MSG).then((r) => {
|
confirmDialog(SETTING_CHANGE_RELOAD_MSG).then((r) => {
|
||||||
if (r == true) {
|
if (r == true) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue