From 4e12577e620b474eeeb8a204f8d1dc9f8f054170 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 4 Feb 2021 13:30:14 -0600 Subject: [PATCH 01/22] FIX: Fix for nested `` tags. Resolves #98 . --- src/markup/parserlib.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/markup/parserlib.js b/src/markup/parserlib.js index 26873c8..db9f4ae 100644 --- a/src/markup/parserlib.js +++ b/src/markup/parserlib.js @@ -1504,18 +1504,24 @@ name : 'svgTag', profiles : ['core'], match : '<[Ss][Vv][Gg][^>]*>', - lookahead : /(<[Ss][Vv][Gg][^>]*>(?:.|\n)*?<\/[Ss][Vv][Gg]>)/gm, + lookahead : /<(\/?)[Ss][Vv][Gg][^>]*>/gm, namespace : 'http://www.w3.org/2000/svg', handler(w) { - this.lookahead.lastIndex = w.matchStart; + this.lookahead.lastIndex = w.nextMatch; - const match = this.lookahead.exec(w.source); + let depth = 1; + let match; - if (match && match.index === w.matchStart) { + while (depth > 0 && (match = this.lookahead.exec(w.source)) !== null) { + depth += match[1] === '/' ? -1 : 1; + } + + if (depth === 0) { w.nextMatch = this.lookahead.lastIndex; - const $frag = jQuery(document.createDocumentFragment()).append(match[1]); + const svgTag = w.source.slice(w.matchStart, this.lookahead.lastIndex); + const $frag = jQuery(document.createDocumentFragment()).append(svgTag); // Postprocess the relevant SVG element nodes. $frag.find('a[data-passage],image[data-passage]').each((_, el) => { From 8a63fb2a9e859e7aa83ecbc0b491216b2d570852 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 4 Feb 2021 13:30:54 -0600 Subject: [PATCH 02/22] UPDATE: Cleanup. --- src/lib/extensions.js | 4 ++-- src/state.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/extensions.js b/src/lib/extensions.js index 83c00b9..8c09bc4 100644 --- a/src/lib/extensions.js +++ b/src/lib/extensions.js @@ -1687,8 +1687,8 @@ configurable : true, writable : true, - value(text, replacer, space) { - return JSON._real_stringify(text, (key, val) => { + value(value, replacer, space) { + return JSON._real_stringify(value, (key, val) => { let value = val; /* diff --git a/src/state.js b/src/state.js index 96b6e3e..7e0a8c8 100644 --- a/src/state.js +++ b/src/state.js @@ -559,7 +559,7 @@ var State = (() => { // eslint-disable-line no-unused-vars, no-var scriptSection = 'the Story JavaScript'; } - throw new Error(`State.initPRNG must be called during initialization, within either ${scriptSection} or the StoryInit special passage`); + throw new Error(`State.prng.init must be called during initialization, within either ${scriptSection} or the StoryInit special passage`); } _prng = new PRNGWrapper(seed, useEntropy); From 8e7c829286f931cadca9ca2bddb0fc2917c71766 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 4 Feb 2021 13:34:58 -0600 Subject: [PATCH 03/22] UPDATE: Copyright mambo. --- LICENSE | 2 +- src/config.js | 2 +- src/css/core-display.css | 2 +- src/css/core-macro.css | 2 +- src/css/core-passage.css | 2 +- src/css/core.css | 2 +- src/css/font.css | 2 +- src/css/init-screen.css | 2 +- src/css/ui-bar.css | 2 +- src/css/ui-debug.css | 2 +- src/css/ui-dialog.css | 2 +- src/css/ui.css | 2 +- src/debugbar.js | 2 +- src/dialog.js | 2 +- src/engine.js | 2 +- src/l10n/l10n.js | 2 +- src/l10n/legacy.js | 2 +- src/l10n/strings.js | 2 +- src/lib/alert.js | 2 +- src/lib/browser.js | 2 +- src/lib/debugview.js | 2 +- src/lib/diff.js | 2 +- src/lib/extensions.js | 2 +- src/lib/fullscreen.js | 2 +- src/lib/has.js | 2 +- src/lib/helpers.js | 2 +- src/lib/jquery-plugins.js | 2 +- src/lib/nodetyper.js | 2 +- src/lib/patterns.js | 2 +- src/lib/prngwrapper.js | 2 +- src/lib/simplestore/adapters/cookie.js | 2 +- src/lib/simplestore/adapters/webstorage.js | 2 +- src/lib/simplestore/simplestore.js | 2 +- src/lib/stylewrapper.js | 2 +- src/lib/util.js | 2 +- src/lib/visibility.js | 2 +- src/loadscreen.js | 2 +- src/macros/macro.js | 2 +- src/macros/macrocontext.js | 2 +- src/macros/macrolib.js | 2 +- src/markup/lexer.js | 2 +- src/markup/parserlib.js | 2 +- src/markup/scripting.js | 2 +- src/markup/template.js | 2 +- src/markup/wikifier.js | 2 +- src/passage.js | 2 +- src/save.js | 2 +- src/setting.js | 2 +- src/simpleaudio.js | 2 +- src/state.js | 2 +- src/story.js | 2 +- src/sugarcube.js | 2 +- src/templates/twine1/html.tpl | 2 +- src/templates/twine1/sugarcube-2.py | 2 +- src/templates/twine2/html.tpl | 2 +- src/ui.js | 2 +- src/uibar.js | 2 +- 57 files changed, 57 insertions(+), 57 deletions(-) diff --git a/LICENSE b/LICENSE index 95e2dab..5af7f67 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2020, Thomas Michael Edwards . +Copyright (c) 2013-2021, Thomas Michael Edwards . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/config.js b/src/config.js index 1446273..b62d54d 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ config.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/core-display.css b/src/css/core-display.css index 9dc5534..c34807a 100644 --- a/src/css/core-display.css +++ b/src/css/core-display.css @@ -2,7 +2,7 @@ css/core-display.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/core-macro.css b/src/css/core-macro.css index 83ad262..eec79d1 100644 --- a/src/css/core-macro.css +++ b/src/css/core-macro.css @@ -2,7 +2,7 @@ css/core-macro.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/core-passage.css b/src/css/core-passage.css index 5fc98f3..eb07333 100644 --- a/src/css/core-passage.css +++ b/src/css/core-passage.css @@ -2,7 +2,7 @@ css/core-passage.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/core.css b/src/css/core.css index a2f1737..faae32f 100644 --- a/src/css/core.css +++ b/src/css/core.css @@ -2,7 +2,7 @@ css/core.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/font.css b/src/css/font.css index ceaacde..f90da68 100644 --- a/src/css/font.css +++ b/src/css/font.css @@ -2,7 +2,7 @@ css/font.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/init-screen.css b/src/css/init-screen.css index 47e6fce..2ce2112 100644 --- a/src/css/init-screen.css +++ b/src/css/init-screen.css @@ -2,7 +2,7 @@ css/init-screen.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/ui-bar.css b/src/css/ui-bar.css index 07c24c4..05f12cb 100644 --- a/src/css/ui-bar.css +++ b/src/css/ui-bar.css @@ -2,7 +2,7 @@ css/ui-bar.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/ui-debug.css b/src/css/ui-debug.css index 7fe3f30..1ea87e7 100644 --- a/src/css/ui-debug.css +++ b/src/css/ui-debug.css @@ -2,7 +2,7 @@ css/ui-debug.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/ui-dialog.css b/src/css/ui-dialog.css index fa767e7..f1b41ec 100644 --- a/src/css/ui-dialog.css +++ b/src/css/ui-dialog.css @@ -2,7 +2,7 @@ css/ui-dialog.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/css/ui.css b/src/css/ui.css index 00204c6..70a0853 100644 --- a/src/css/ui.css +++ b/src/css/ui.css @@ -2,7 +2,7 @@ css/ui.css - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/debugbar.js b/src/debugbar.js index 10bfb43..9856fc8 100644 --- a/src/debugbar.js +++ b/src/debugbar.js @@ -2,7 +2,7 @@ debugbar.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/dialog.js b/src/dialog.js index f5589fc..1e529de 100644 --- a/src/dialog.js +++ b/src/dialog.js @@ -2,7 +2,7 @@ dialog.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/engine.js b/src/engine.js index f21892b..4a88c05 100644 --- a/src/engine.js +++ b/src/engine.js @@ -2,7 +2,7 @@ engine.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/l10n/l10n.js b/src/l10n/l10n.js index 20227f0..6394014 100644 --- a/src/l10n/l10n.js +++ b/src/l10n/l10n.js @@ -2,7 +2,7 @@ l10n/l10n.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/l10n/legacy.js b/src/l10n/legacy.js index a1fa6cf..1c8a125 100644 --- a/src/l10n/legacy.js +++ b/src/l10n/legacy.js @@ -2,7 +2,7 @@ l10n/legacy.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/l10n/strings.js b/src/l10n/strings.js index 08e9112..5ae8f95 100644 --- a/src/l10n/strings.js +++ b/src/l10n/strings.js @@ -2,7 +2,7 @@ l10n/strings.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/alert.js b/src/lib/alert.js index 0dd53c5..345d81b 100644 --- a/src/lib/alert.js +++ b/src/lib/alert.js @@ -2,7 +2,7 @@ lib/alert.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/browser.js b/src/lib/browser.js index eaf1146..e2733c2 100644 --- a/src/lib/browser.js +++ b/src/lib/browser.js @@ -2,7 +2,7 @@ lib/browser.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/debugview.js b/src/lib/debugview.js index 416b924..16b1828 100644 --- a/src/lib/debugview.js +++ b/src/lib/debugview.js @@ -2,7 +2,7 @@ lib/debugview.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/diff.js b/src/lib/diff.js index 1732876..f77d597 100644 --- a/src/lib/diff.js +++ b/src/lib/diff.js @@ -2,7 +2,7 @@ lib/diff.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/extensions.js b/src/lib/extensions.js index 8c09bc4..3afe5b3 100644 --- a/src/lib/extensions.js +++ b/src/lib/extensions.js @@ -2,7 +2,7 @@ lib/extensions.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/fullscreen.js b/src/lib/fullscreen.js index 5f97a69..e132ebb 100644 --- a/src/lib/fullscreen.js +++ b/src/lib/fullscreen.js @@ -2,7 +2,7 @@ lib/fullscreen.js - Copyright © 2018–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2018–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/has.js b/src/lib/has.js index b41e5f0..5fb4695 100644 --- a/src/lib/has.js +++ b/src/lib/has.js @@ -2,7 +2,7 @@ lib/has.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/helpers.js b/src/lib/helpers.js index 3c37ad9..34a18ab 100644 --- a/src/lib/helpers.js +++ b/src/lib/helpers.js @@ -2,7 +2,7 @@ lib/helpers.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/jquery-plugins.js b/src/lib/jquery-plugins.js index 792b01f..225ed5c 100644 --- a/src/lib/jquery-plugins.js +++ b/src/lib/jquery-plugins.js @@ -2,7 +2,7 @@ lib/jquery-plugins.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/nodetyper.js b/src/lib/nodetyper.js index a753c4d..d4a3d46 100644 --- a/src/lib/nodetyper.js +++ b/src/lib/nodetyper.js @@ -2,7 +2,7 @@ lib/nodetyper.js - Copyright © 2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2020–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/patterns.js b/src/lib/patterns.js index 765395e..c916dc7 100644 --- a/src/lib/patterns.js +++ b/src/lib/patterns.js @@ -2,7 +2,7 @@ lib/patterns.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/prngwrapper.js b/src/lib/prngwrapper.js index 65317cb..742de65 100644 --- a/src/lib/prngwrapper.js +++ b/src/lib/prngwrapper.js @@ -2,7 +2,7 @@ lib/prngwrapper.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/simplestore/adapters/cookie.js b/src/lib/simplestore/adapters/cookie.js index 0bc5d16..326695c 100644 --- a/src/lib/simplestore/adapters/cookie.js +++ b/src/lib/simplestore/adapters/cookie.js @@ -2,7 +2,7 @@ lib/simplestore/adapters/cookie.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/simplestore/adapters/webstorage.js b/src/lib/simplestore/adapters/webstorage.js index 75408a3..27d3801 100644 --- a/src/lib/simplestore/adapters/webstorage.js +++ b/src/lib/simplestore/adapters/webstorage.js @@ -2,7 +2,7 @@ lib/simplestore/adapters/webstorage.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/simplestore/simplestore.js b/src/lib/simplestore/simplestore.js index 5a4df33..7359b1a 100644 --- a/src/lib/simplestore/simplestore.js +++ b/src/lib/simplestore/simplestore.js @@ -2,7 +2,7 @@ lib/simplestore/simplestore.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/stylewrapper.js b/src/lib/stylewrapper.js index e21bf79..4606389 100644 --- a/src/lib/stylewrapper.js +++ b/src/lib/stylewrapper.js @@ -2,7 +2,7 @@ lib/stylewrapper.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/util.js b/src/lib/util.js index 8320a80..74d0fc5 100644 --- a/src/lib/util.js +++ b/src/lib/util.js @@ -2,7 +2,7 @@ lib/util.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/lib/visibility.js b/src/lib/visibility.js index f3c6e91..382656d 100644 --- a/src/lib/visibility.js +++ b/src/lib/visibility.js @@ -2,7 +2,7 @@ lib/visibility.js - Copyright © 2018–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2018–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/loadscreen.js b/src/loadscreen.js index b3149b6..9b855bd 100644 --- a/src/loadscreen.js +++ b/src/loadscreen.js @@ -2,7 +2,7 @@ loadscreen.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/macros/macro.js b/src/macros/macro.js index 6afb9fc..73d46aa 100644 --- a/src/macros/macro.js +++ b/src/macros/macro.js @@ -2,7 +2,7 @@ macros/macro.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/macros/macrocontext.js b/src/macros/macrocontext.js index bd211cd..df25bb4 100644 --- a/src/macros/macrocontext.js +++ b/src/macros/macrocontext.js @@ -2,7 +2,7 @@ macros/macrocontext.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/macros/macrolib.js b/src/macros/macrolib.js index 6ca8832..2ce3b6d 100644 --- a/src/macros/macrolib.js +++ b/src/macros/macrolib.js @@ -2,7 +2,7 @@ macros/macrolib.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/markup/lexer.js b/src/markup/lexer.js index 40b096a..b3f7806 100644 --- a/src/markup/lexer.js +++ b/src/markup/lexer.js @@ -2,7 +2,7 @@ markup/lexer.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/markup/parserlib.js b/src/markup/parserlib.js index db9f4ae..38aa178 100644 --- a/src/markup/parserlib.js +++ b/src/markup/parserlib.js @@ -2,7 +2,7 @@ markup/parserlib.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/markup/scripting.js b/src/markup/scripting.js index 29c03d9..ba97481 100644 --- a/src/markup/scripting.js +++ b/src/markup/scripting.js @@ -2,7 +2,7 @@ markup/scripting.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/markup/template.js b/src/markup/template.js index d4a7a5a..de92f51 100644 --- a/src/markup/template.js +++ b/src/markup/template.js @@ -2,7 +2,7 @@ markup/template.js - Copyright © 2019–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2019–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/markup/wikifier.js b/src/markup/wikifier.js index bc8b018..2f3b07d 100644 --- a/src/markup/wikifier.js +++ b/src/markup/wikifier.js @@ -2,7 +2,7 @@ markup/wikifier.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/passage.js b/src/passage.js index e02078a..ad30823 100644 --- a/src/passage.js +++ b/src/passage.js @@ -2,7 +2,7 @@ passage.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/save.js b/src/save.js index b6cca52..a4931bf 100644 --- a/src/save.js +++ b/src/save.js @@ -2,7 +2,7 @@ save.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/setting.js b/src/setting.js index 86d2714..cd28c73 100644 --- a/src/setting.js +++ b/src/setting.js @@ -2,7 +2,7 @@ setting.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/simpleaudio.js b/src/simpleaudio.js index facddbf..a67f70d 100644 --- a/src/simpleaudio.js +++ b/src/simpleaudio.js @@ -2,7 +2,7 @@ simpleaudio.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/state.js b/src/state.js index 7e0a8c8..7759009 100644 --- a/src/state.js +++ b/src/state.js @@ -2,7 +2,7 @@ state.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/story.js b/src/story.js index 46f0276..b569cd3 100644 --- a/src/story.js +++ b/src/story.js @@ -2,7 +2,7 @@ story.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/sugarcube.js b/src/sugarcube.js index 39da637..5630c92 100644 --- a/src/sugarcube.js +++ b/src/sugarcube.js @@ -2,7 +2,7 @@ sugarcube.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/templates/twine1/html.tpl b/src/templates/twine1/html.tpl index 650bddd..76f5079 100644 --- a/src/templates/twine1/html.tpl +++ b/src/templates/twine1/html.tpl @@ -8,7 +8,7 @@ SugarCube (v'{{BUILD_VERSION_VERSION}}'): A free (gratis and libre) story format. -Copyright © 2013–2020 Thomas Michael Edwards . +Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/templates/twine1/sugarcube-2.py b/src/templates/twine1/sugarcube-2.py index 6fa77e9..b64b5c0 100644 --- a/src/templates/twine1/sugarcube-2.py +++ b/src/templates/twine1/sugarcube-2.py @@ -2,7 +2,7 @@ # # sugarcube-2.py # -# Copyright (c) 2013-2020 Thomas Michael Edwards . All rights reserved. +# Copyright (c) 2013-2021 Thomas Michael Edwards . All rights reserved. # Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. # ######################################################################################################################## diff --git a/src/templates/twine2/html.tpl b/src/templates/twine2/html.tpl index c39a6a1..a8e24a3 100644 --- a/src/templates/twine2/html.tpl +++ b/src/templates/twine2/html.tpl @@ -8,7 +8,7 @@ SugarCube (v'{{BUILD_VERSION_VERSION}}'): A free (gratis and libre) story format. -Copyright © 2013–2020 Thomas Michael Edwards . +Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/src/ui.js b/src/ui.js index 9115391..bc62bf5 100644 --- a/src/ui.js +++ b/src/ui.js @@ -2,7 +2,7 @@ ui.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ diff --git a/src/uibar.js b/src/uibar.js index 6c29da1..207e7b5 100644 --- a/src/uibar.js +++ b/src/uibar.js @@ -2,7 +2,7 @@ uibar.js - Copyright © 2013–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2013–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. ***********************************************************************************************************************/ From 75eef3cea3b1c0783a16643c043eba0c3f86dfd0 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Fri, 5 Feb 2021 23:11:55 -0600 Subject: [PATCH 04/22] UPDATE: Backport get type improvement from v3. --- src/lib/util.js | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/lib/util.js b/src/lib/util.js index 74d0fc5..cdace19 100644 --- a/src/lib/util.js +++ b/src/lib/util.js @@ -20,14 +20,38 @@ var Util = (() => { // eslint-disable-line no-unused-vars, no-var NOTE: In ≤ES5, returns the value of the `[[Class]]` internal slot for objects. */ - function utilGetType(obj) { - if (obj === null) { return 'null'; } - - const baseType = typeof obj; - return baseType === 'object' - ? Object.prototype.toString.call(obj).slice(8, -1) - : baseType; - } + const utilGetType = (() => { + // Cache the `.toString()` method. + const toString = Object.prototype.toString; + + // If the browser is using the `Map()` and `Set()` polyfills, then return + // a version of `utilGetType()` that contains special cases for them, since + // they do not have a `[[Class]]` internal slot and the `@@toStringTag` + // internal property is unavailable to them. + if (toString.call(new Map()) === '[object Object]') { + return function utilGetType(O) { + if (O === null) { return 'null'; } + + // Special cases for the `Map` and `Set` polyfills. + // + // NOTE: We don't special case the `WeakMap` and `WeakSet` polyfills + // here since they're (a) unlikely to be used and (b) broken anyway. + if (O instanceof Map) { return 'Map'; } + if (O instanceof Set) { return 'Set'; } + + const baseType = typeof O; + return baseType === 'object' ? toString.call(O).slice(8, -1) : baseType; + }; + } + + // Elsewise, return the regular `utilGetType()` function. + return function utilGetType(O) { + if (O === null) { return 'null'; } + + const baseType = typeof O; + return baseType === 'object' ? toString.call(O).slice(8, -1) : baseType; + }; + })(); /* Returns whether the passed value is a boolean or one of the strings "true" From e281651f9f5f74bb1997705e6dca190dced8b45b Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Fri, 5 Feb 2021 23:13:37 -0600 Subject: [PATCH 05/22] UPDATE: Disallow the core document elements in `stringFrom()`. --- src/lib/helpers.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/helpers.js b/src/lib/helpers.js index 34a18ab..25682ee 100644 --- a/src/lib/helpers.js +++ b/src/lib/helpers.js @@ -389,6 +389,14 @@ var { // eslint-disable-line no-var return value.toLocaleString(); } else if (value instanceof Element) { + if ( + value === document.documentElement + || value === document.head + || value === document.body + ) { + throw new Error('illegal operation; attempting to convert the , , or tags to string is not allowed'); + } + return value.outerHTML; } else if (value instanceof Node) { From d2639b5de1f89106aaf681914a8682ff30ab0feb Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Wed, 17 Feb 2021 17:12:50 -0600 Subject: [PATCH 06/22] UPDATE: Documentation > Test Mode Guide. --- docs/guides/guide-test-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/guide-test-mode.md b/docs/guides/guide-test-mode.md index 6a18611..7288c00 100644 --- a/docs/guides/guide-test-mode.md +++ b/docs/guides/guide-test-mode.md @@ -56,7 +56,7 @@ To enable test mode from the story editor/map screen while starting at a specifi To enable test mode while starting at a specific passage, right-click on a passage and select the *Test Play From Here* context menu item.

Note: -Unfortunately, due to limitations in the current release of Twine 1, the Build menu's Test Play menu item is not able to trigger test mode. You may, however, simply use the Test Play From Here context menu item on the `Start` passage to achieve the same result. +Unfortunately, due to limitations in the current release of Twine 1, the Build menu's Test Play menu item is not able to trigger test mode. You may, however, simply use the Test Play From Here context menu item on the Start passage to achieve the same result.

### Manually From 39c64e97f1c89d53da77db181317a9a1a531f747 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 18 Feb 2021 14:14:35 -0600 Subject: [PATCH 07/22] UPDATE: Clarified a part of the State, Sessions, and Saving guide. --- docs/guides/guide-state-sessions-and-saving.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/guide-state-sessions-and-saving.md b/docs/guides/guide-state-sessions-and-saving.md index b761d2f..7908aa1 100644 --- a/docs/guides/guide-state-sessions-and-saving.md +++ b/docs/guides/guide-state-sessions-and-saving.md @@ -86,7 +86,7 @@ Running that, you'll see `$x is 0` and `$y is 1`. Now, load the saved story fro ## Refreshing and Restarting {#guide-state-sessions-and-saving-refreshing-and-restarting} -Whenever your story is first started or, *for any reason*, restarted—e.g., the browser window/tab was refreshed/reloaded—it undergoes its startup sequence. Several things occur **each and every time startup happens**, regardless of whether or not a playthrough session will be restored, an autosave loaded, a regular save loaded, or the starting passage run. First, the CSS, JavaScript, and Widget sections are processed. Next, the `StoryInit` special passage is processed. Finally, one of three things happen (in order): the existing playthrough session is restored, if it exists, else the autosave is loaded, if it exists and is configured to do so, else the starting passage is run. +Whenever your story is first started or, *for any reason*, restarted—e.g., the browser window/tab was refreshed/reloaded—it undergoes its startup sequence. Several things occur **each and every time startup happens**, regardless of whether or not a playthrough session will be restored, an autosave loaded, or the starting passage run. First, the CSS, JavaScript, and Widget sections are processed. Next, the `StoryInit` special passage is processed. Finally, one of three things happen (in order): the existing playthrough session is restored, if it exists, else the autosave is loaded, if it exists and is configured to do so, else the starting passage is run. Some users have the false impression that `StoryInit` is not run when the story is restarted when the playthrough session is restored or autosave is loaded. Code like `<>` *seems* to have no effect because the startup state is replaced by the of the incoming state, **but they are still executed by the engine**. You can see this effect by changing data *outside* the state. For example, let's return to the example above and change it again: From a9f97fbdf3f6f96cdf1eb684f0682dab8e87c756 Mon Sep 17 00:00:00 2001 From: Mustafa Rawi <3381239+mrawi@users.noreply.github.com> Date: Sat, 20 Feb 2021 19:25:54 +0200 Subject: [PATCH 08/22] Create ar-EG.js Add ar-EG localization file. --- locale/ar-EG.js | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 locale/ar-EG.js diff --git a/locale/ar-EG.js b/locale/ar-EG.js new file mode 100644 index 0000000..17bda65 --- /dev/null +++ b/locale/ar-EG.js @@ -0,0 +1,100 @@ +/*********************************************************************************************************************** + + ar-EG.js – العربية (مصر) + Localization by: Mustafa Rawi + + Copyright © 2019–2020 Thomas Michael Edwards . All rights reserved. + Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. + + For more information about the guidelines used to create this localization, see: + http://www.motoslave.net/sugarcube/2/docs/#guide-localization + +***********************************************************************************************************************/ + +(function () { + /* General. */ + l10nStrings.identity = 'لعبة'; + l10nStrings.aborting = 'جاري الإلغاء'; + l10nStrings.cancel = 'إلغاء'; + l10nStrings.close = 'إغلاق'; + l10nStrings.ok = 'موافق'; + + /* Errors. */ + l10nStrings.errorTitle = 'خطأ'; + l10nStrings.errorToggle = 'تبديل عرض واجهة الأخطاء'; + l10nStrings.errorNonexistentPassage = 'القطعة "{passage}" غير موجودة'; // NOTE: `passage` is supplied locally + l10nStrings.errorSaveMissingData = 'خاصية الحفظ لم تجد بعض البيانات. إما أن الملف المحمل ليس ملفاً خاصة بالحفظ أو أن الملف متضرر'; + l10nStrings.errorSaveIdMismatch = 'ملف الحفظ من {identity} خاطئة'; + + /* Warnings. */ + l10nStrings._warningIntroLacking = 'متصفحك إما يفتقر إلى أو تم تعطيل '; + l10nStrings._warningOutroDegraded = ', لذا فهذه {identity} تعمل في وضع محدود. يمكنك المتابعة إلا أن بعض أجزاءها قد لا تعمل بشكل صحيح.'; + l10nStrings.warningNoWebStorage = '{_warningIntroLacking} واجهة برمجة تطبيقات ويب للحفظ{_warningOutroDegraded}'; + l10nStrings.warningDegraded = '{_warningIntroLacking} بعض الخصائص المطلوبة في {identity}{_warningOutroDegraded}'; + + /* Debug bar. */ + l10nStrings.debugBarToggle = 'تبديل عرض شريط استكشاف الأخطاء'; + l10nStrings.debugBarNoWatches = '\u2014 لم يتم تحديد مراقبين \u2014'; + l10nStrings.debugBarAddWatch = 'إضافة مراقب'; + l10nStrings.debugBarDeleteWatch = 'حذف مراقب'; + l10nStrings.debugBarWatchAll = 'مراقبة الكل'; + l10nStrings.debugBarWatchNone = 'حذف الكل'; + l10nStrings.debugBarLabelAdd = 'إضافة'; + l10nStrings.debugBarLabelWatch = 'مراقبة'; + l10nStrings.debugBarLabelTurn = 'الدور'; // (noun) chance to act (in a game), moment, period + l10nStrings.debugBarLabelViews = 'الواجهات'; + l10nStrings.debugBarViewsToggle = 'تبديل عرض واجهات استكشاف الأخطاء'; + l10nStrings.debugBarWatchToggle = 'تبديل عرض لوحة المراقبة'; + + /* UI bar. */ + l10nStrings.uiBarToggle = 'تبديل عرض شريط الواجهة'; + l10nStrings.uiBarBackward = 'تراجع عبر تاريخ {identity}'; + l10nStrings.uiBarForward = 'تقدم عبر تاريخ {identity}'; + l10nStrings.uiBarJumpto = 'قفز إلى نقطة معينة في تاريخ {identity}'; + + /* Jump To. */ + l10nStrings.jumptoTitle = 'قفز إلى'; + l10nStrings.jumptoTurn = 'دور'; // (noun) chance to act (in a game), moment, period + l10nStrings.jumptoUnavailable = 'لا توجد نقاط قفز متاحة حالياً\u2026'; + + /* Saves. */ + l10nStrings.savesTitle = 'الحفظ'; + l10nStrings.savesDisallowed = 'تم تعطيل خاصية الحفظ في هذه القطعة.'; + l10nStrings.savesIncapable = '{_warningIntroLacking} يفتقر إلى إمكانيات مطلوبة لدعم عملية الحفظ، لذا تم تعطيلها في هذه الجلسة.'; + l10nStrings.savesLabelAuto = 'الحفظ التلقائي'; + l10nStrings.savesLabelDelete = 'حذف'; + l10nStrings.savesLabelExport = 'حفظ إلى جهازك\u2026'; + l10nStrings.savesLabelImport = 'تحميل من جهازك\u2026'; + l10nStrings.savesLabelLoad = 'تحميل'; + l10nStrings.savesLabelClear = 'حذف الكل'; + l10nStrings.savesLabelSave = 'حفظ'; + l10nStrings.savesLabelSlot = 'حاوية'; + l10nStrings.savesUnavailable = 'لم يمكن العثور على حاويات حفظ\u2026'; + l10nStrings.savesUnknownDate = 'غير معروف'; + + /* Settings. */ + l10nStrings.settingsTitle = 'الإعدادات'; + l10nStrings.settingsOff = 'معطل'; + l10nStrings.settingsOn = 'مفعل'; + l10nStrings.settingsReset = 'استرداد الافتراضيات'; + + /* Restart. */ + l10nStrings.restartTitle = 'إعادة تشغيل'; + l10nStrings.restartPrompt = 'هل ترغب حقاً في إعادة التشغيل من البداية؟ ستفقد أي تقدم حققته ولم تحفظه.'; + + /* Share. */ + l10nStrings.shareTitle = 'مشاركة'; + + /* Alert. */ + l10nStrings.alertTitle = 'تنبيه'; + + /* Autoload. */ + l10nStrings.autoloadTitle = 'تحميل تلقائي'; + l10nStrings.autoloadCancel = 'الذهاب للبداية'; + l10nStrings.autoloadOk = 'تحميل من الحفظ التلقائي'; + l10nStrings.autoloadPrompt = 'تم العثور على حفظ تلقائي. هل ترغب في تحميله أم تريد الذهاب للبداية؟'; + + /* Macros. */ + l10nStrings.macroBackText = 'تراجع'; // (verb) rewind, revert + l10nStrings.macroReturnText = 'عودة'; // (verb) go/send back +})(); From 19feaa17e7ed478e08ee47188652770bcfa4ae26 Mon Sep 17 00:00:00 2001 From: KarimeChehbouni Date: Wed, 24 Feb 2021 13:54:09 +0100 Subject: [PATCH 09/22] Create Italian translation. --- locale/it-IT.js | 100 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 locale/it-IT.js diff --git a/locale/it-IT.js b/locale/it-IT.js new file mode 100644 index 0000000..57bc807 --- /dev/null +++ b/locale/it-IT.js @@ -0,0 +1,100 @@ +/*********************************************************************************************************************** + + it-IT.js – Italiano + + Localization by: Karime Chehbouni. + + Copyright © 2019–2020 Thomas Michael Edwards . All rights reserved. + Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. + + For more information about the guidelines used to create this localization, see: + http://www.motoslave.net/sugarcube/2/docs/#guide-localization + +***********************************************************************************************************************/ +(function () { + /* General. */ + l10nStrings.identity = 'gioco'; + l10nStrings.aborting = 'Interrompendo'; + l10nStrings.cancel = 'Annulla'; + l10nStrings.close = 'Chiudi'; + l10nStrings.ok = 'OK'; + + /* Errors. */ + l10nStrings.errorTitle = 'Errore'; + l10nStrings.errorToggle = 'Attiva visualizzazione errori'; + l10nStrings.errorNonexistentPassage = 'il passaggio "{passage}" non esiste'; // NOTE: `passage` is supplied locally + l10nStrings.errorSaveMissingData = 'al salvataggio mancano i dati richiesti. Il file caricato non è un salvataggio o il salvataggio è danneggiato'; + l10nStrings.errorSaveIdMismatch = 'il salvataggio non proviene da {identity}'; + + /* Warnings. */ + l10nStrings._warningIntroLacking = 'Il tuo browser necessita di \\ ha disabilitato'; + l10nStrings._warningOutroDegraded = ', quindi quest\'{identity} è in esecuzione in una modalità degradata. Puoi continuare, tuttavia alcune parti potrebbero non funzionare correttamente'; + l10nStrings.warningNoWebStorage = '{_warningIntroLacking} l\'API di archiviazione web{_warningOutroDegraded}'; + l10nStrings.warningDegraded = '{_warningIntroLacking} alcune delle capacità richieste da {identity}{_warningOutroDegraded}'; + + /* Debug bar. */ + l10nStrings.debugBarToggle = 'Mostra la barra debug'; + l10nStrings.debugBarNoWatches = '\u2014 nessuna sorveglianza attiva \u2014'; + l10nStrings.debugBarAddWatch = 'Aggiungi sorveglianza'; + l10nStrings.debugBarDeleteWatch = 'Elimina sorveglianza'; + l10nStrings.debugBarWatchAll = 'Sorveglia tutti'; + l10nStrings.debugBarWatchNone = 'Elimina tutti'; + l10nStrings.debugBarLabelAdd = 'Aggiungi'; + l10nStrings.debugBarLabelWatch = 'Sorveglia'; + l10nStrings.debugBarLabelTurn = 'Turno'; // (noun) chance to act (in a game), moment, period + l10nStrings.debugBarLabelViews = 'Visualizzazioni'; + l10nStrings.debugBarViewsToggle = 'Mostra visualizzazioni debug'; + l10nStrings.debugBarWatchToggle = 'Mostra pannello di sorveglianza'; + + /* UI bar. */ + l10nStrings.uiBarToggle = 'Mostra barra UI'; + l10nStrings.uiBarBackward = 'Vai indietro nella cronologia di {identity}'; + l10nStrings.uiBarForward = 'Vai avanti nella cronologia di {identity}'; + l10nStrings.uiBarJumpto = 'Salta a un punto specifico nella cronologia di {identity}'; + + /* Jump To. */ + l10nStrings.jumptoTitle = 'Salta A'; + l10nStrings.jumptoTurn = 'Turno'; // (noun) chance to act (in a game), moment, period + l10nStrings.jumptoUnavailable = 'Nessun punto di salto attualmente disponibile\u2026'; + + /* Saves. */ + l10nStrings.savesTitle = 'Salvataggi'; + l10nStrings.savesDisallowed = 'Salvare non è stato consentito in questo passaggio.'; + l10nStrings.savesIncapable = '{_warningIntroLacking} le capacità necessarie per supportare salvataggi, quindi i salvataggi sono stati disabilitati per questa sessione.'; + l10nStrings.savesLabelAuto = 'Salvataggio Automatico'; + l10nStrings.savesLabelDelete = 'Elimina'; + l10nStrings.savesLabelExport = 'Salva su Disco\u2026'; + l10nStrings.savesLabelImport = 'Carica dal Disco\u2026'; + l10nStrings.savesLabelLoad = 'Carica'; + l10nStrings.savesLabelClear = 'Elimina Tutto'; + l10nStrings.savesLabelSave = 'Salva'; + l10nStrings.savesLabelSlot = 'Slot'; + l10nStrings.savesUnavailable = 'Nessuno slot di salvataggio trovato\u2026'; + l10nStrings.savesUnknownDate = 'sconosciuto'; + + /* Settings. */ + l10nStrings.settingsTitle = 'Impostazioni'; + l10nStrings.settingsOff = 'Off'; + l10nStrings.settingsOn = 'On'; + l10nStrings.settingsReset = 'Ripristina Predefiniti'; + + /* Restart. */ + l10nStrings.restartTitle = 'Ricomincia'; + l10nStrings.restartPrompt = 'Siete certi di voler ricominciare? Il progresso non salvato verrà perso.'; + + /* Share. */ + l10nStrings.shareTitle = 'Condividi'; + + /* Alert. */ + l10nStrings.alertTitle = 'Segnalazione'; + + /* Autoload. */ + l10nStrings.autoloadTitle = 'Caricamento Automatico'; + l10nStrings.autoloadCancel = 'Vai all\'inizio'; + l10nStrings.autoloadOk = 'Carica salvataggio automatico'; + l10nStrings.autoloadPrompt = 'È presente un salvataggio automatico. Caricarlo adesso o andare all\'inizio?'; + + /* Macros. */ + l10nStrings.macroBackText = 'Indietro'; // (verb) rewind, revert + l10nStrings.macroReturnText = 'Ritorna'; // (verb) go/send back +})(); \ No newline at end of file From 48a28510b1dba109a70c94fdd5beb0831dff8215 Mon Sep 17 00:00:00 2001 From: TheUmnavigator Date: Wed, 3 Mar 2021 11:21:26 +1100 Subject: [PATCH 10/22] Fixed minor typo cone() => clone() --- docs/core/functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/functions.md b/docs/core/functions.md index 45a4fbf..82708c5 100644 --- a/docs/core/functions.md +++ b/docs/core/functions.md @@ -10,7 +10,7 @@ Returns a deep copy of the given value.

Note: -Only the primitives, generic objects, some JavaScript natives (specifically: Array, Date, Map, RegExp, and Set), and DOM node objects are supported by default. Unsupported object types, either native or custom, will need to implement .clone() method to be properly supported by the cone() function—when called on such an object, it will simply defer to the local method; see the Non-generic object types (a.k.a. classes) guide for more information. +Only the primitives, generic objects, some JavaScript natives (specifically: Array, Date, Map, RegExp, and Set), and DOM node objects are supported by default. Unsupported object types, either native or custom, will need to implement .clone() method to be properly supported by the clone() function—when called on such an object, it will simply defer to the local method; see the Non-generic object types (a.k.a. classes) guide for more information.

#### History: From ec0c171398134f35a0df0ef15bf44e8eef163214 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Sun, 7 Mar 2021 00:54:19 -0600 Subject: [PATCH 11/22] UPDATE: Backport `Alert` changes from v3. --- src/lib/alert.js | 59 ++++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/src/lib/alert.js b/src/lib/alert.js index 345d81b..091903b 100644 --- a/src/lib/alert.js +++ b/src/lib/alert.js @@ -25,45 +25,52 @@ var Alert = (() => { // eslint-disable-line no-unused-vars, no-var /******************************************************************************************************************* Error Functions. *******************************************************************************************************************/ - function _alertMesg(type, where, what, error) { - const isFatal = type === 'fatal'; - let mesg = `Apologies! ${isFatal ? 'A fatal' : 'An'} error has occurred.`; + function mesg(where, error, isFatal, isUncaught) { + let mesg = 'Error'; + let nice = `A${isFatal ? ' fatal' : 'n'} error has occurred.`; if (isFatal) { - mesg += ' Aborting.'; + nice += ' Aborting.'; } else { - mesg += ' You may be able to continue, but some parts may not work properly.'; + nice += ' You may be able to continue, but some parts may not work properly.'; } - if (where != null || what != null) { // lazy equality for null - mesg += '\n\nError'; + const isObject = error !== null && typeof error === 'object'; + const isExLike = isObject && 'message' in error; + const what = ( + isExLike ? String(error.message).replace(errorPrologRegExp, '') : String(error) + ).trim() || 'unknown error'; - if (where != null) { // lazy equality for null - mesg += ` [${where}]`; - } - - if (what != null) { // lazy equality for null - mesg += `: ${what.replace(errorPrologRegExp, '')}.`; - } - else { - mesg += ': unknown error.'; - } + if (where != null) { // lazy equality for null + mesg += ` [${where}]`; } - if (typeof error === 'object' && error !== null && error.stack) { + mesg += `: ${what}.`; + + if (isObject && 'stack' in error) { mesg += `\n\nStack Trace:\n${error.stack}`; } - window.alert(mesg); // eslint-disable-line no-alert + if (mesg) { + nice += `\n\n${mesg}`; + } + + // Log a plain message. + if (!isUncaught) { + console[isFatal ? 'error' : 'warn'](mesg); + } + + // Pop up a nice message. + window.alert(nice); // eslint-disable-line no-alert } - function alertError(where, what, error) { - _alertMesg(null, where, what, error); + function alertError(where, error) { + mesg(where, error); } - function alertFatal(where, what, error) { - _alertMesg('fatal', where, what, error); + function alertFatal(where, error) { + mesg(where, error, true); } @@ -75,14 +82,16 @@ var Alert = (() => { // eslint-disable-line no-unused-vars, no-var */ (origOnError => { window.onerror = function (what, source, lineNum, colNum, error) { + // console.error(what, source, lineNum, colNum, error); + // Uncaught exceptions during play may be recoverable/ignorable. if (document.readyState === 'complete') { - alertError(null, what, error); + mesg(null, error != null ? error : what, false, true); // lazy equality for null } // Uncaught exceptions during startup should be fatal. else { - alertFatal(null, what, error); + mesg(null, error != null ? error : what, true, true); // lazy equality for null window.onerror = origOnError; if (typeof window.onerror === 'function') { From b1701568fdba79c1279cab7ab76a388350a27b85 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Mon, 8 Mar 2021 16:19:26 -0600 Subject: [PATCH 12/22] UPDATE: `<>` docs to warn against auto-forwarding. See #106 . --- docs/core/macros.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/core/macros.md b/docs/core/macros.md index c4d03f5..8573924 100644 --- a/docs/core/macros.md +++ b/docs/core/macros.md @@ -2736,6 +2736,10 @@ Immediately forwards the player to the passage with the given name. May be call In most cases, you will not need to use <<goto>> as there are often better and easier ways to forward the player. For example, a common use of <<link>> is to perform various actions before forwarding the player to another passage. In that case, unless you need to dynamically determine the destination passage within the <<link>> body, <<goto>> is unnecessary as <<link>> already includes the ability to forward the player.

+

Warning: +Using <<goto>> to automatically forward players from one passage to another with no input from them will both create junk moments within the story history and make it extremely difficult for players to navigate the history. It is strongly recommended that you look into other methods to achieve your goals instead—e.g., Config.navigation.override. +

+

Warning: <<goto>> does not terminate passage rendering in the passage where it was encountered, so care must be taken to ensure that no unwanted state modifications occur after its call.

From e1ce74263ce96278fdbc56bde1c9dc1bff601344 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Mon, 8 Mar 2021 16:53:35 -0600 Subject: [PATCH 13/22] UPDATE: Supported types docs to warn against functions. --- docs/core/twinescript.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/core/twinescript.md b/docs/core/twinescript.md index 1c88dce..adda491 100644 --- a/docs/core/twinescript.md +++ b/docs/core/twinescript.md @@ -89,6 +89,15 @@ Any supported object type may itself contain any supported primitive or object t Neither ES5 property attributes—which includes getters/setters—nor symbol properties are directly supported in generic objects stored within story variables. If you need such features, then you'll need to use a non-generic object (a.k.a. a class).

+
Warning: +

Functions, including non-instance methods, are not directly supported within story variables because of a few issues.

+
    +
  1. A function's scope cannot be restored. Thus, if your function depends upon its scope, then it will not work properly when revived from sessions or saves.
  2. +
  3. Function behavior is immutable. Thus, storing them within story variables is generally wasteful.
  4. +
+

Methods of class instances are not affected by either issue, as they're never actually stored within story variables, being on their classes' prototypes.

+
+ Unsupported object types, either native or custom, can be made compatible by implementing `.clone()` and `.toJSON()` methods for them—see the [*Non-generic object types (a.k.a. classes)* guide](#guide-tips-non-generic-object-types) for more information. From 964af563e0c191a8de1705f94d30cc308cd33858 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Mon, 8 Mar 2021 23:56:06 -0600 Subject: [PATCH 14/22] FIX: Comments within macro arguments. Resolves #107 . --- src/markup/parserlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markup/parserlib.js b/src/markup/parserlib.js index 38aa178..f3b1f74 100644 --- a/src/markup/parserlib.js +++ b/src/markup/parserlib.js @@ -114,7 +114,7 @@ name : 'macro', profiles : ['core'], match : '<<', - lookahead : new RegExp(`<<(/?${Patterns.macroName})(?:\\s*)((?:(?:\`(?:\\\\.|[^\`\\\\])*\`)|(?:"(?:\\\\.|[^"\\\\])*")|(?:'(?:\\\\.|[^'\\\\])*')|(?:\\[(?:[<>]?[Ii][Mm][Gg])?\\[[^\\r\\n]*?\\]\\]+)|[^>]|(?:>(?!>)))*)>>`, 'gm'), + lookahead : new RegExp(`<<(/?${Patterns.macroName})(?:\\s*)((?:(?:/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/)|(?://.*\\n)|(?:\`(?:\\\\.|[^\`\\\\])*\`)|(?:"(?:\\\\.|[^"\\\\])*")|(?:'(?:\\\\.|[^'\\\\])*')|(?:\\[(?:[<>]?[Ii][Mm][Gg])?\\[[^\\r\\n]*?\\]\\]+)|[^>]|(?:>(?!>)))*)>>`, 'gm'), working : { source : '', name : '', arguments : '', index : 0 }, // the working parse object context : null, // last execution context object (top-level macros, hierarchically, have a null context) From a9984f94ad71ece027e66a619206c7d2f391e1a6 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Tue, 9 Mar 2021 11:48:58 -0600 Subject: [PATCH 15/22] UPDATE: `<>` keyboard on mobile devices. --- src/macros/macrolib.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/macros/macrolib.js b/src/macros/macrolib.js index 2ce3b6d..c37cca7 100644 --- a/src/macros/macrolib.js +++ b/src/macros/macrolib.js @@ -1666,10 +1666,11 @@ // Set up and append the input element to the output buffer. jQuery(el) .attr({ - id : `${this.name}-${varId}`, - name : `${this.name}-${varId}`, - type : asNumber ? 'number' : 'text', - tabindex : 0 // for accessiblity + id : `${this.name}-${varId}`, + name : `${this.name}-${varId}`, + type : asNumber ? 'number' : 'text', + inputmode : asNumber ? 'decimal' : 'text', + tabindex : 0 // for accessiblity }) .addClass(`macro-${this.name}`) .on('change.macros', this.createShadowWrapper(function () { From 0294708d24a4b0d0045eb9d3d213fc91aad823b2 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Tue, 9 Mar 2021 19:13:06 -0600 Subject: [PATCH 16/22] UPDATE: Tweak `<>` a bit. --- src/macros/macrolib.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/macros/macrolib.js b/src/macros/macrolib.js index c37cca7..f904255 100644 --- a/src/macros/macrolib.js +++ b/src/macros/macrolib.js @@ -3654,18 +3654,18 @@ return function () { let argsCache; - try { - // Cache the existing value of the `$args` variable, if necessary. - if (State.variables.hasOwnProperty('args')) { - argsCache = State.variables.args; - } + // Cache the existing value of the `$args` variable, if necessary. + if (State.variables.hasOwnProperty('args')) { + argsCache = State.variables.args; + } - // Set up the widget `$args` variable and add a shadow. - State.variables.args = [...this.args]; - State.variables.args.raw = this.args.raw; - State.variables.args.full = this.args.full; - this.addShadow('$args'); + // Set up the widget `$args` variable and add a shadow. + State.variables.args = [...this.args]; + State.variables.args.raw = this.args.raw; + State.variables.args.full = this.args.full; + this.addShadow('$args'); + try { // Set up the error trapping variables. const resFrag = document.createDocumentFragment(); const errList = []; From d31e1e50b8d5ab4c7071da1341fc208f62754aeb Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Tue, 9 Mar 2021 20:18:35 -0600 Subject: [PATCH 17/22] ADD: `<>` macro. --- docs/core/macros.md | 26 ++++++++++++++++++++++++++ docs/table-of-contents.md | 1 + src/macros/macrolib.js | 21 +++++++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/docs/core/macros.md b/docs/core/macros.md index 8573924..75ce797 100644 --- a/docs/core/macros.md +++ b/docs/core/macros.md @@ -2728,6 +2728,32 @@ This macro has been deprecated and should no longer be used. See the Tip: +If you need to run the same code on multiple passages, consider using the PassageDone special passage or, for a JavaScript/TwineScript solution, a :passagedisplay event instead. They serve the same basic purpose as the <<done>> macro, but are run each time passage navigation occurs. +

+ +#### History: + +* `v2.35.0`: Introduced. + +#### Arguments: *none* + +#### Examples: + +``` +@@#spy;@@ + +<> + <>I spy with my little eye, a crab rangoon.<> +<> +``` + + + ### `<>`
`<>` {#macros-macro-goto} Immediately forwards the player to the passage with the given name. May be called either with the passage name or with a link markup. diff --git a/docs/table-of-contents.md b/docs/table-of-contents.md index c4e3cee..25c479e 100644 --- a/docs/table-of-contents.md +++ b/docs/table-of-contents.md @@ -98,6 +98,7 @@ * [`<>`](#macros-macro-removeplaylist) * [`<>`](#macros-macro-waitforaudio) * [Miscellaneous Macros](#macros-miscellaneous) + * [`<>`](#macros-macro-done) * [`<>`](#macros-macro-goto) * [`<>`](#macros-macro-repeat) * [`<>`](#macros-macro-stop) diff --git a/src/macros/macrolib.js b/src/macros/macrolib.js index f904255..a5df9ef 100644 --- a/src/macros/macrolib.js +++ b/src/macros/macrolib.js @@ -3306,6 +3306,27 @@ /******************************************************************************************************************* Miscellaneous Macros. *******************************************************************************************************************/ + /* + <> + */ + Macro.add('done', { + skipArgs : true, + tags : null, + + handler() { + const contents = this.payload[0].contents.trim(); + + // Do nothing if there's no content to process. + if (contents === '') { + return; + } + + $(document).one(':passagedisplay', this.createShadowWrapper( + () => $.wiki(contents) + )); + } + }); + /* <> */ From b7b449bad9f449a25bc31415319d90b64ba5fda3 Mon Sep 17 00:00:00 2001 From: Grausicht <75050537+Grausicht@users.noreply.github.com> Date: Fri, 12 Mar 2021 17:56:57 +0100 Subject: [PATCH 18/22] Update de.js Typo: Autoload --- locale/de.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/de.js b/locale/de.js index 3738296..9c0ee66 100644 --- a/locale/de.js +++ b/locale/de.js @@ -86,10 +86,10 @@ l10nStrings.shareTitle = 'Teilen'; /* Autoload. */ - l10nStrings.autoloadTitle = 'Autmatisches Laden'; + l10nStrings.autoloadTitle = 'Automatisches Laden'; l10nStrings.autoloadCancel = 'Gehe zum Start'; l10nStrings.autoloadOk = 'Auto-Speicherstand laden'; - l10nStrings.autoloadPrompt = 'Ein Auto-Spiecherstand existiert bereits. Laden oder zurück an den Start?'; + l10nStrings.autoloadPrompt = 'Ein Auto-Speicherstand existiert bereits. Laden oder zurück an den Start?'; /* Macros. */ l10nStrings.macroBackText = 'Zurück'; From 83dc05cd3139643653719690bb33dfa2f7a5adc5 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 18 Mar 2021 12:56:55 -0500 Subject: [PATCH 19/22] UPDATE: Locale files. --- locale/README.md | 22 ++++++++++++---------- locale/ar-EG.js | 2 +- locale/chs.js | 1 + locale/de.js | 5 +++-- locale/es-ES.js | 1 + locale/es-UNKNOWN.js | 1 + locale/fr.js | 1 + locale/it-IT.js | 7 ++++--- locale/l10n-template.js | 3 ++- locale/pl.js | 1 + locale/pt-BR.js | 1 + locale/pt-PT.js | 1 + locale/ru.js | 1 + locale/tr.js | 1 + 14 files changed, 31 insertions(+), 17 deletions(-) diff --git a/locale/README.md b/locale/README.md index 0a1447f..aef2d4e 100644 --- a/locale/README.md +++ b/locale/README.md @@ -8,13 +8,15 @@ For the template that should be used as the basis of localizations, see the `l10 ## Contributors -* 简体中文 (`chs.js`) – Liyro Pen. -* Deutsch (`de.js`) – Phil Strahl. -* Español (Castellano) (`es-ES.js`) – Gerardo Galán. -* Español (*UNKNOWN*) (`es-UNKNOWN.js`) – Raúl Castellano. -* Français (`fr.js`) – Marc Cornette, Pierre Kessler. -* Polski (`pl.js`) – ciupac. -* Português (Brazil) (`pt-BR.js`) – Janos Biro. -* Português (Portugal) (`pt-PT.js`) – Magma. -* Ру́сский (`ru.js`) – Konstantin Kitmanov. -* Türkçe (`tr.js`) – Guena Varia. +* `ar-EG.js` – العربية (مصر), by: Mustafa Rawi. +* `chs.js` – 简体中文, by: Liyro Pen. +* `de.js` – Deutsch, by: Phil Strahl, Grausicht. +* `es-ES.js` – Español (Castellano), by: Gerardo Galán. +* `es-UNKNOWN.js` – Español (*UNKNOWN*), by: Raúl Castellano. +* `fr.js` – Français, by: Marc Cornette, Pierre Kessler. +* `it-IT.js` – Italiano (Italy), by: Karime Chehbouni. +* `pl.js` – Polski, by: ciupac. +* `pt-BR.js` – Português (Brazil), by: Janos Biro. +* `pt-PT.js` – Português (Portugal), by: Magma. +* `ru.js` – Ру́сский, by: Konstantin Kitmanov. +* `tr.js` – Türkçe, by: Guena Varia. diff --git a/locale/ar-EG.js b/locale/ar-EG.js index 17bda65..f8d6321 100644 --- a/locale/ar-EG.js +++ b/locale/ar-EG.js @@ -3,7 +3,7 @@ ar-EG.js – العربية (مصر) Localization by: Mustafa Rawi - Copyright © 2019–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. For more information about the guidelines used to create this localization, see: diff --git a/locale/chs.js b/locale/chs.js index 4e4f99f..0180ae3 100644 --- a/locale/chs.js +++ b/locale/chs.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = '游戏'; diff --git a/locale/de.js b/locale/de.js index 9c0ee66..3538934 100644 --- a/locale/de.js +++ b/locale/de.js @@ -2,15 +2,16 @@ de.js – Deutsch - Localization by: Phil Strahl . + Localization by: Phil Strahl , Grausicht. - Copyright © 2017–2018 Thomas Michael Edwards . All rights reserved. + Copyright © 2017–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. For more information about the guidelines used to create this localization, see: http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'spiel'; diff --git a/locale/es-ES.js b/locale/es-ES.js index 6696fae..154abea 100644 --- a/locale/es-ES.js +++ b/locale/es-ES.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'juego'; diff --git a/locale/es-UNKNOWN.js b/locale/es-UNKNOWN.js index bb2f796..291c053 100644 --- a/locale/es-UNKNOWN.js +++ b/locale/es-UNKNOWN.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'juego'; diff --git a/locale/fr.js b/locale/fr.js index d43fe43..a3500be 100644 --- a/locale/fr.js +++ b/locale/fr.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'aventure'; diff --git a/locale/it-IT.js b/locale/it-IT.js index 57bc807..7ca4fae 100644 --- a/locale/it-IT.js +++ b/locale/it-IT.js @@ -2,15 +2,16 @@ it-IT.js – Italiano - Localization by: Karime Chehbouni. + Localization by: Karime Chehbouni. - Copyright © 2019–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. For more information about the guidelines used to create this localization, see: http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'gioco'; @@ -97,4 +98,4 @@ /* Macros. */ l10nStrings.macroBackText = 'Indietro'; // (verb) rewind, revert l10nStrings.macroReturnText = 'Ritorna'; // (verb) go/send back -})(); \ No newline at end of file +})(); diff --git a/locale/l10n-template.js b/locale/l10n-template.js index fe8728f..3d03fb2 100644 --- a/locale/l10n-template.js +++ b/locale/l10n-template.js @@ -2,13 +2,14 @@ l10n-template.js – Localization Template - Copyright © 2019–2020 Thomas Michael Edwards . All rights reserved. + Copyright © 2019–2021 Thomas Michael Edwards . All rights reserved. Use of this source code is governed by a BSD 2-clause "Simplified" License, which may be found in the LICENSE file. For more information about the guidelines used to create this localization, see: http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + /* ATTENTION TRANSLATORS diff --git a/locale/pl.js b/locale/pl.js index 172d2aa..a4f39a7 100644 --- a/locale/pl.js +++ b/locale/pl.js @@ -28,6 +28,7 @@ field is appreciated. ***********************************************************************************************************************/ + (function () { /* General. */ // BUG: Polish has cases, so one noun in the nominative won’t cut it. diff --git a/locale/pt-BR.js b/locale/pt-BR.js index 1255cba..a6df1bc 100644 --- a/locale/pt-BR.js +++ b/locale/pt-BR.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'jogo'; diff --git a/locale/pt-PT.js b/locale/pt-PT.js index bc581ae..2598a31 100644 --- a/locale/pt-PT.js +++ b/locale/pt-PT.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'jogo'; diff --git a/locale/ru.js b/locale/ru.js index d5838da..5ec93a0 100644 --- a/locale/ru.js +++ b/locale/ru.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'игры'; diff --git a/locale/tr.js b/locale/tr.js index 4ef636d..0dd3183 100644 --- a/locale/tr.js +++ b/locale/tr.js @@ -11,6 +11,7 @@ http://www.motoslave.net/sugarcube/2/docs/#guide-localization ***********************************************************************************************************************/ + (function () { /* General. */ l10nStrings.identity = 'oyun'; From a19c8a37d0b5300a68040dba84df008ae86a5078 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 18 Mar 2021 12:59:02 -0500 Subject: [PATCH 20/22] UPDATE: DOM macro warning to reference `<>`. --- docs/core/macros.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/macros.md b/docs/core/macros.md index 75ce797..f7db219 100644 --- a/docs/core/macros.md +++ b/docs/core/macros.md @@ -1818,7 +1818,7 @@ The versions that forward to a specific passage are largely unnecessary, as you

Warning: -All DOM macros require the elements to be manipulated to be on the page. As a consequence, you cannot use them directly within a passage to modify elements within said passage, since the elements they are targeting are still rendering, thus not yet on the page. You must, generally, use them with a interactive macro—e.g., <<link>> macro—or within the PassageDone special passage. Elements that are already part of the page, on the other hand, present no issues. +All DOM macros require the elements to be manipulated to be on the page. As a consequence, you cannot use them directly within a passage to modify elements within said passage, since the elements they are targeting are still rendering, thus not yet on the page. You must, generally, use them with an interactive macro—e.g., <<link>> macro—the <<done>> macro, or within the PassageDone special passage. Elements that are already part of the page, on the other hand, present no issues.

From f408fb599c55ce603eea6b228154b698ae7997e2 Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 18 Mar 2021 13:00:54 -0500 Subject: [PATCH 21/22] PREPPING: v2.35.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f0253da..56282f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "SugarCube", - "version": "2.34.1", + "version": "2.35.0", "author": "Thomas Michael Edwards ", "description": "Dependency install configuration for SugarCube's Node.js-hosted build script, build.js.", "license": "BSD-2-Clause", From f4ad8c4cc15cedf66677deda5f8c256aed87cd6d Mon Sep 17 00:00:00 2001 From: "Thomas M. Edwards" Date: Thu, 18 Mar 2021 13:02:31 -0500 Subject: [PATCH 22/22] CDN: Publish `format.js`. --- dist/LICENSE | 2 +- dist/format.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/LICENSE b/dist/LICENSE index 95e2dab..5af7f67 100644 --- a/dist/LICENSE +++ b/dist/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2013-2020, Thomas Michael Edwards . +Copyright (c) 2013-2021, Thomas Michael Edwards . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/dist/format.js b/dist/format.js index 6991bd3..376379c 100644 --- a/dist/format.js +++ b/dist/format.js @@ -1 +1 @@ -window.storyFormat({"name":"SugarCube","version":"2.34.1","description":"A full featured, highly customizable story format. See its documentation.","author":"Thomas Michael Edwards","image":"icon.svg","url":"http://www.motoslave.net/sugarcube/","license":"BSD-2-Clause","proofing":false,"source":"\n\n\n\n{{STORY_NAME}}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t
\n\t\t
\n\t\t
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
\n\t\t
Loading…
\n\t
\n\t{{STORY_DATA}}\n\t\n\n\n"}); \ No newline at end of file +window.storyFormat({"name":"SugarCube","version":"2.35.0","description":"A full featured, highly customizable story format. See its documentation.","author":"Thomas Michael Edwards","image":"icon.svg","url":"http://www.motoslave.net/sugarcube/","license":"BSD-2-Clause","proofing":false,"source":"\n\n\n\n{{STORY_NAME}}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t
\n\t\t
\n\t\t
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
\n\t\t
Loading…
\n\t
\n\t{{STORY_DATA}}\n\t\n\n\n"}); \ No newline at end of file