From 78fe1e4d0b26cb87db8b3b73f13984e4aa623883 Mon Sep 17 00:00:00 2001 From: Thomas Weber Date: Sat, 11 Dec 2021 22:14:48 -0600 Subject: [PATCH 1/6] Android support --- src/locales/en.json | 5 +- src/p4/P4.svelte | 2 +- src/p4/PackagerOptions.svelte | 133 +++++++++++++++++++++++++++++++++- src/p4/template.ejs | 2 +- src/packager/packager.js | 17 +++++ 5 files changed, 153 insertions(+), 6 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index fbd9117f..162338bc 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1,7 +1,7 @@ { "p4": { "description1": { - "string": "Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, and Linux." + "string": "Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, Linux, and Android." }, "description2": { "string": "If you just want an easy way to embed a project into your website, you may be interested in {embedding}." @@ -367,6 +367,9 @@ "string": "{type} Linux application (64-bit only)", "context": "type will become something like 'NW.js' or 'Electron'. Do not translate 'Linux'." }, + "application-android": { + "string": "Android app (Highly experimental)" + }, "otherEnvironments": { "string": "Other environments (Click to open)", "context": "Text that can be clicked to expand list of environments to include some unrecommended ones." diff --git a/src/p4/P4.svelte b/src/p4/P4.svelte index c57483a0..dba55ed2 100644 --- a/src/p4/P4.svelte +++ b/src/p4/P4.svelte @@ -83,7 +83,7 @@ :global([theme="dark"] .is-not-safari select:hover) { border-color: #bbb; } - :global(p), :global(h1), :global(h2), :global(h3) { + :global(p), :global(pre), :global(h1), :global(h2), :global(h3) { margin: 12px 0; } :global(summary) { diff --git a/src/p4/PackagerOptions.svelte b/src/p4/PackagerOptions.svelte index 526df358..1fc558ab 100644 --- a/src/p4/PackagerOptions.svelte +++ b/src/p4/PackagerOptions.svelte @@ -203,8 +203,9 @@ font-weight: bold; background: yellow; color: black; - padding: 10px; - border-radius: 10px; + padding: 12px; + border-radius: 12px; + margin: 12px 0; } .small { font-size: small; @@ -648,6 +649,13 @@ +
+ +
+
{$_('options.otherEnvironments')}

{$_('options.otherEnvironmentsHelp')}

@@ -699,7 +707,8 @@ {#if $options.target.startsWith('zip')}

Zip

The zip environment is intended to be used for publishing to a website. Other uses such as sending your project to a friend over a chat app or email should use "Plain HTML" instead as zip will not work.

- {:else} + {/if} + {#if !$options.target.startsWith('zip')}

{$_('options.applicationSettings')}