From d0e42fb39c69e972770a755896ba25c33c394080 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Fri, 8 Jul 2022 15:51:35 -0700 Subject: [PATCH 1/2] add macOS troubleshooting info on all extension pages I created a new `ExtensionTroubleshooting` component to store shared troubleshooting steps. In the future I plan to move existing shared troubleshooting steps into this component, but I don't think it's a good idea to do this so close to the upcoming Scratch Conference. Moving those steps will disrupt their localization strings in at least three ways: * each page is currently its own "resource" so the strings will move from one resource to another * some of the strings include the device name, which I plan to replace using a `formatMessage` variable, changing the string in the process * reusing the existing string IDs won't make sense: I plan to replace `microbit.checkOSVersionTitle` with `extensions.checkOSVersionTitle` for example For now, all existing troubleshooting steps are being treated as extension-specific in order to avoid localization disruptions. The new versions of the strings are present, though, in order to allow translators to start working on them if they'd like. --- .../extension-troubleshooting.jsx | 52 +++++++++++++++++++ src/l10n.json | 13 +++++ src/views/boost/boost.jsx | 13 +++-- src/views/boost/l10n.json | 1 + src/views/ev3/ev3.jsx | 14 ++--- src/views/ev3/l10n.json | 1 + src/views/gdxfor/gdxfor.jsx | 14 ++--- src/views/gdxfor/l10n.json | 2 + src/views/microbit/l10n.json | 1 + src/views/microbit/microbit.jsx | 13 +++-- src/views/wedo2/l10n.json | 1 + src/views/wedo2/wedo2.jsx | 13 +++-- 12 files changed, 103 insertions(+), 35 deletions(-) create mode 100644 src/components/extension-landing/extension-troubleshooting.jsx diff --git a/src/components/extension-landing/extension-troubleshooting.jsx b/src/components/extension-landing/extension-troubleshooting.jsx new file mode 100644 index 000000000..7ca3df87c --- /dev/null +++ b/src/components/extension-landing/extension-troubleshooting.jsx @@ -0,0 +1,52 @@ +const FormattedMessage = require('react-intl').FormattedMessage; +const PropTypes = require('prop-types'); +const React = require('react'); + +const ExtensionSection = require('./extension-section.jsx'); + +// TODO: after the Scratch Conference 2022, migrate from the individual extension landing pages all the +// troubleshooting steps which are common to all extensions. +const ExtensionTroubleshooting = props => { + const sharedValues = { + deviceName: props.deviceName, + deviceNameShort: props.deviceNameShort || props.deviceName + }; + return ( + +

+

+

+ {props.children} + {!props.scratchLinkOnly && ( + +

+

+
+ )} +
+ ); +}; + +ExtensionTroubleshooting.propTypes = { + children: PropTypes.node, + deviceName: PropTypes.string.isRequired, + deviceNameShort: PropTypes.string, + scratchLinkOnly: PropTypes.bool +}; + +module.exports = ExtensionTroubleshooting; diff --git a/src/l10n.json b/src/l10n.json index 033d06e04..67b3dfd71 100644 --- a/src/l10n.json +++ b/src/l10n.json @@ -423,6 +423,19 @@ "helpWidget.submit": "Send", "helpWidget.confirmation": "Thank you for your message.", + "extensions.troubleshootingTitle": "Troubleshooting", + "extensions.browserCompatibilityTitle": "Make sure your browser is compatible with Scratch Link", + "extensions.browserCompatibilityText": "Scratch Link 1.4 is not compatible with Safari. If you use macOS, please use another supported browser, such as Chrome or Firefox.", + "extensions.checkOSVersionTitle": "Make sure your operating system is compatible with Scratch Link", + "extensions.checkOSVersionText": "The minimum operating system versions are listed at the top of this page. See instructions for checking your version of {winOSVersionLink} or {macOSVersionLink}.", + "extensions.checkOsVersionText2": "If you are using macOS 12, please update to macOS 12.3 or newer. Earlier versions of macOS 12 do not work correctly with Scratch Link.", + "extensions.winOSVersionLinkText": "Windows", + "extensions.macOSVersionLinkText": "Mac OS", + "extensions.closeScratchCopiesTitle": "Close other copies of Scratch", + "extensions.closeScratchCopiesText": "Only one copy of Scratch can connect with the {deviceName} at a time. If you have Scratch open in other browser tabs, close it and try again.", + "extensions.otherComputerConnectedTitle": "Make sure no other computer is connected to your {deviceNameShort}", + "extensions.otherComputerConnectedText": "Only one computer can be connected to a {deviceName} at a time. If you have another computer connected to your {deviceName}, disconnect the {deviceName} or close Scratch on that computer and try again.", + "bluetooth.enableLocationServicesTitle": "Make sure you have location services enabled on Chromebooks or Android tablets", "bluetooth.enableLocationServicesText": "Bluetooth can be used to provide location data to the app. In addition to granting the Scratch App permission to access location, location must be enabled in your general device settings. Search for 'Location' in your settings, and make sure it is on. On Chromebooks search for 'Location' in the Google Play Store Android preferences." } diff --git a/src/views/boost/boost.jsx b/src/views/boost/boost.jsx index 8924ba9e7..0eb695bd8 100644 --- a/src/views/boost/boost.jsx +++ b/src/views/boost/boost.jsx @@ -15,6 +15,7 @@ const ExtensionLanding = require('../../components/extension-landing/extension-l const ExtensionHeader = require('../../components/extension-landing/extension-header.jsx'); const ExtensionRequirements = require('../../components/extension-landing/extension-requirements.jsx'); const ExtensionSection = require('../../components/extension-landing/extension-section.jsx'); +const ExtensionTroubleshooting = require('../../components/extension-landing/extension-troubleshooting.jsx'); const InstallScratchLink = require('../../components/extension-landing/install-scratch-link.jsx'); const InstallScratch = require('../../components/install-scratch/install-scratch.jsx'); const ProjectCard = require('../../components/extension-landing/project-card.jsx'); @@ -191,8 +192,9 @@ class Boost extends ExtensionLanding { /> - -

+ {isDownloaded(this.state.OS) && (

@@ -225,6 +227,7 @@ class Boost extends ExtensionLanding { }} />

+

)}

@@ -235,11 +238,7 @@ class Boost extends ExtensionLanding {

-

-

- -

-
+ ); } diff --git a/src/views/boost/l10n.json b/src/views/boost/l10n.json index b99a7a056..48c8f5a22 100644 --- a/src/views/boost/l10n.json +++ b/src/views/boost/l10n.json @@ -1,4 +1,5 @@ { + "boost.deviceName": "BOOST", "boost.headerText": "The {boostLink} kit brings your LEGO creations to life with powerful motors, a color sensor and more. By combining it with Scratch, you can build your own robotic creatures, tell physical-digital stories, invent new game controllers, or whatever else you can imagine.", "boost.gettingStarted": "Getting Started", "boost.connectingBoost": "Connecting BOOST to Scratch", diff --git a/src/views/ev3/ev3.jsx b/src/views/ev3/ev3.jsx index 4a65ad760..2183b1802 100644 --- a/src/views/ev3/ev3.jsx +++ b/src/views/ev3/ev3.jsx @@ -26,6 +26,7 @@ const Step = require('../../components/steps/step.jsx'); const OS_ENUM = require('../../lib/os-enum.js'); const {isDownloaded, isFromGooglePlay} = require('../../components/install-scratch/install-util.js'); +const ExtensionTroubleshooting = require('../../components/extension-landing/extension-troubleshooting.jsx'); require('../../components/extension-landing/extension-landing.scss'); require('./ev3.scss'); @@ -279,8 +280,10 @@ class EV3 extends ExtensionLanding { /> - -

+ {isDownloaded(this.state.OS) && (

@@ -309,6 +312,7 @@ class EV3 extends ExtensionLanding { }} />

+

)}

@@ -357,11 +361,7 @@ class EV3 extends ExtensionLanding { }} />

-

-

- -

-
+ ); } diff --git a/src/views/ev3/l10n.json b/src/views/ev3/l10n.json index 6589b6ffa..04728a40c 100644 --- a/src/views/ev3/l10n.json +++ b/src/views/ev3/l10n.json @@ -1,4 +1,5 @@ { + "ev3.deviceName": "EV3", "ev3.headerText": "{ev3Link} is an invention kit with motors and sensors you can use to build interactive robotic creations. Connecting it to Scratch expands the possibilities: build a robotic puppet and tell stories, make your own musical instruments and game controllers, or whatever else you can imagine.", "ev3.gettingStarted": "Getting Started", "ev3.connectingEV3": "Connecting EV3 to Scratch", diff --git a/src/views/gdxfor/gdxfor.jsx b/src/views/gdxfor/gdxfor.jsx index 3f0e4d9ca..3100560be 100644 --- a/src/views/gdxfor/gdxfor.jsx +++ b/src/views/gdxfor/gdxfor.jsx @@ -15,6 +15,7 @@ const ExtensionLanding = require('../../components/extension-landing/extension-l const ExtensionHeader = require('../../components/extension-landing/extension-header.jsx'); const ExtensionRequirements = require('../../components/extension-landing/extension-requirements.jsx'); const ExtensionSection = require('../../components/extension-landing/extension-section.jsx'); +const ExtensionTroubleshooting = require('../../components/extension-landing/extension-troubleshooting.jsx'); const InstallScratchLink = require('../../components/extension-landing/install-scratch-link.jsx'); const InstallScratch = require('../../components/install-scratch/install-scratch.jsx'); const ProjectCard = require('../../components/extension-landing/project-card.jsx'); @@ -204,8 +205,10 @@ class GdxFor extends ExtensionLanding { /> - -

+ {isDownloaded(this.state.OS) && (

@@ -234,6 +237,7 @@ class GdxFor extends ExtensionLanding { }} />

+

)}

@@ -244,11 +248,7 @@ class GdxFor extends ExtensionLanding {

-

-

- -

-
+ ); } diff --git a/src/views/gdxfor/l10n.json b/src/views/gdxfor/l10n.json index a5f563c5f..aadfd1774 100644 --- a/src/views/gdxfor/l10n.json +++ b/src/views/gdxfor/l10n.json @@ -1,4 +1,6 @@ { + "gdxfor.deviceName": "Force and Acceleration sensor", + "gdxfor.deviceNameShort": "sensor", "gdxfor.headerText": "The {gdxforLink} sensor is a powerful scientific tool that unlocks new ways to connect the physical world to your Scratch projects. Measure force as you push and pull, and interact by shaking, spinning, free falling and more.", "gdxfor.gettingStarted": "Getting Started", "gdxfor.connectingGdxfor": "Connecting Force & Acceleration sensor to Scratch", diff --git a/src/views/microbit/l10n.json b/src/views/microbit/l10n.json index 4b57e29c2..1896fc529 100644 --- a/src/views/microbit/l10n.json +++ b/src/views/microbit/l10n.json @@ -1,4 +1,5 @@ { + "microbit.deviceName": "micro:bit", "microbit.headerText": "{microbitLink} is a tiny circuit board designed to help kids learn to code and create with technology. It has many features including an LED display, buttons, and a motion sensor. You can connect it to Scratch and build creative projects that combine the magic of the digital and physical worlds.", "microbit.gettingStarted": "Getting Started", "microbit.installMicrobitHex": "Install Scratch micro:bit HEX", diff --git a/src/views/microbit/microbit.jsx b/src/views/microbit/microbit.jsx index 3cb11d60e..2d164fdc5 100644 --- a/src/views/microbit/microbit.jsx +++ b/src/views/microbit/microbit.jsx @@ -16,6 +16,7 @@ const ExtensionLanding = require('../../components/extension-landing/extension-l const ExtensionHeader = require('../../components/extension-landing/extension-header.jsx'); const ExtensionRequirements = require('../../components/extension-landing/extension-requirements.jsx'); const ExtensionSection = require('../../components/extension-landing/extension-section.jsx'); +const ExtensionTroubleshooting = require('../../components/extension-landing/extension-troubleshooting.jsx'); const InstallScratchLink = require('../../components/extension-landing/install-scratch-link.jsx'); const InstallScratch = require('../../components/install-scratch/install-scratch.jsx'); const ProjectCard = require('../../components/extension-landing/project-card.jsx'); @@ -318,8 +319,9 @@ class MicroBit extends ExtensionLanding {
- -

+ {isDownloaded(this.state.OS) && (

@@ -348,6 +350,7 @@ class MicroBit extends ExtensionLanding { }} />

+

)}

@@ -362,11 +365,7 @@ class MicroBit extends ExtensionLanding {

-

-

- -

-
+ ); } diff --git a/src/views/wedo2/l10n.json b/src/views/wedo2/l10n.json index 28ed5799e..a61037d39 100644 --- a/src/views/wedo2/l10n.json +++ b/src/views/wedo2/l10n.json @@ -1,4 +1,5 @@ { + "wedo2.deviceName": "WeDo 2.0", "wedo2.headerText": "{wedo2Link} is an introductory invention kit you can use to build interactive robots and other creations. You can snap together Scratch programming blocks to interact with your WeDo 2.0 creations and add animations and sounds.", "wedo2.gettingStarted": "Getting Started", "wedo2.connectingWedo2": "Connecting WeDo 2.0 to Scratch", diff --git a/src/views/wedo2/wedo2.jsx b/src/views/wedo2/wedo2.jsx index a53d633cc..ef0660792 100644 --- a/src/views/wedo2/wedo2.jsx +++ b/src/views/wedo2/wedo2.jsx @@ -16,6 +16,7 @@ const ExtensionHeader = require('../../components/extension-landing/extension-he const ExtensionVideo = require('../../components/extension-landing/extension-video.jsx'); const ExtensionRequirements = require('../../components/extension-landing/extension-requirements.jsx'); const ExtensionSection = require('../../components/extension-landing/extension-section.jsx'); +const ExtensionTroubleshooting = require('../../components/extension-landing/extension-troubleshooting.jsx'); const InstallScratchLink = require('../../components/extension-landing/install-scratch-link.jsx'); const InstallScratch = require('../../components/install-scratch/install-scratch.jsx'); const ProjectCard = require('../../components/extension-landing/project-card.jsx'); @@ -190,8 +191,9 @@ class Wedo2 extends ExtensionLanding { /> - -

+ {isDownloaded(this.state.OS) && (

@@ -220,6 +222,7 @@ class Wedo2 extends ExtensionLanding { }} />

+

)}

@@ -251,11 +254,7 @@ class Wedo2 extends ExtensionLanding { }} />

-

-

- -

-
+ ); } From 804bbbcc2eb4ed9b536f4a35538c4b887a34d7f8 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Tue, 12 Jul 2022 07:22:30 -0700 Subject: [PATCH 2/2] don't translate most extension device names --- src/views/boost/boost.jsx | 4 +--- src/views/boost/l10n.json | 1 - src/views/ev3/ev3.jsx | 2 +- src/views/ev3/l10n.json | 1 - src/views/microbit/l10n.json | 1 - src/views/microbit/microbit.jsx | 4 +--- src/views/wedo2/l10n.json | 1 - src/views/wedo2/wedo2.jsx | 4 +--- 8 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/views/boost/boost.jsx b/src/views/boost/boost.jsx index 0eb695bd8..b96565a4d 100644 --- a/src/views/boost/boost.jsx +++ b/src/views/boost/boost.jsx @@ -192,9 +192,7 @@ class Boost extends ExtensionLanding { /> - + {isDownloaded(this.state.OS) && (

diff --git a/src/views/boost/l10n.json b/src/views/boost/l10n.json index 48c8f5a22..b99a7a056 100644 --- a/src/views/boost/l10n.json +++ b/src/views/boost/l10n.json @@ -1,5 +1,4 @@ { - "boost.deviceName": "BOOST", "boost.headerText": "The {boostLink} kit brings your LEGO creations to life with powerful motors, a color sensor and more. By combining it with Scratch, you can build your own robotic creatures, tell physical-digital stories, invent new game controllers, or whatever else you can imagine.", "boost.gettingStarted": "Getting Started", "boost.connectingBoost": "Connecting BOOST to Scratch", diff --git a/src/views/ev3/ev3.jsx b/src/views/ev3/ev3.jsx index 2183b1802..1ccb98b25 100644 --- a/src/views/ev3/ev3.jsx +++ b/src/views/ev3/ev3.jsx @@ -281,7 +281,7 @@ class EV3 extends ExtensionLanding { {isDownloaded(this.state.OS) && ( diff --git a/src/views/ev3/l10n.json b/src/views/ev3/l10n.json index 04728a40c..6589b6ffa 100644 --- a/src/views/ev3/l10n.json +++ b/src/views/ev3/l10n.json @@ -1,5 +1,4 @@ { - "ev3.deviceName": "EV3", "ev3.headerText": "{ev3Link} is an invention kit with motors and sensors you can use to build interactive robotic creations. Connecting it to Scratch expands the possibilities: build a robotic puppet and tell stories, make your own musical instruments and game controllers, or whatever else you can imagine.", "ev3.gettingStarted": "Getting Started", "ev3.connectingEV3": "Connecting EV3 to Scratch", diff --git a/src/views/microbit/l10n.json b/src/views/microbit/l10n.json index 1896fc529..4b57e29c2 100644 --- a/src/views/microbit/l10n.json +++ b/src/views/microbit/l10n.json @@ -1,5 +1,4 @@ { - "microbit.deviceName": "micro:bit", "microbit.headerText": "{microbitLink} is a tiny circuit board designed to help kids learn to code and create with technology. It has many features including an LED display, buttons, and a motion sensor. You can connect it to Scratch and build creative projects that combine the magic of the digital and physical worlds.", "microbit.gettingStarted": "Getting Started", "microbit.installMicrobitHex": "Install Scratch micro:bit HEX", diff --git a/src/views/microbit/microbit.jsx b/src/views/microbit/microbit.jsx index 2d164fdc5..3b955a224 100644 --- a/src/views/microbit/microbit.jsx +++ b/src/views/microbit/microbit.jsx @@ -319,9 +319,7 @@ class MicroBit extends ExtensionLanding {
- + {isDownloaded(this.state.OS) && (

diff --git a/src/views/wedo2/l10n.json b/src/views/wedo2/l10n.json index a61037d39..28ed5799e 100644 --- a/src/views/wedo2/l10n.json +++ b/src/views/wedo2/l10n.json @@ -1,5 +1,4 @@ { - "wedo2.deviceName": "WeDo 2.0", "wedo2.headerText": "{wedo2Link} is an introductory invention kit you can use to build interactive robots and other creations. You can snap together Scratch programming blocks to interact with your WeDo 2.0 creations and add animations and sounds.", "wedo2.gettingStarted": "Getting Started", "wedo2.connectingWedo2": "Connecting WeDo 2.0 to Scratch", diff --git a/src/views/wedo2/wedo2.jsx b/src/views/wedo2/wedo2.jsx index ef0660792..1d674faf8 100644 --- a/src/views/wedo2/wedo2.jsx +++ b/src/views/wedo2/wedo2.jsx @@ -191,9 +191,7 @@ class Wedo2 extends ExtensionLanding { /> - + {isDownloaded(this.state.OS) && (