constants: add LEGO registered trademark

This shouldn't be translated so we make a constant to ensure that. Also
makes it easy to get the registered trademark symbol which isn't
trivial to type on the keyboard.
This commit is contained in:
David Lechner
2022-11-18 19:28:00 -06:00
committed by David Lechner
parent f944948a44
commit 745d09df7a
7 changed files with 24 additions and 9 deletions
+6 -1
View File
@@ -11,6 +11,7 @@ import {
appVersion,
changelogUrl,
legoDisclaimer,
legoRegisteredTrademark,
pybricksCopyright,
pybricksWebsiteUrl,
} from '../app/constants';
@@ -41,7 +42,11 @@ const AboutDialog: React.VoidFunctionComponent<AboutDialogProps> = ({
<img src="favicon.ico" />
</div>
<p>
<strong>{i18n.translate('description')}</strong>
<strong>
{i18n.translate('description', {
lego: legoRegisteredTrademark,
})}
</strong>
</p>
<p>{`v${firmwareVersion} (${appName} v${appVersion})`}</p>
<p>{pybricksCopyright}</p>
+1 -1
View File
@@ -1,6 +1,6 @@
{
"title": "About {appName}",
"description": "MicroPython for LEGO® Powered Up smart hubs.",
"description": "MicroPython for {lego} Powered Up smart hubs.",
"licenseButton": { "label": "Software Licenses" },
"changelogButton": { "label": "Changelog" },
"websiteButton": { "label": "Pybricks Website" }
+3 -2
View File
@@ -50,11 +50,12 @@ export const pybricksUsbLinuxUdevRulesUrl =
export const pybricksBleFirmwareRestoreVideoUrl =
'https://pybricks.com/install/technic-boost-city/#restoring-the-original-firmware';
export const pybricksDfuRestoreUrl = 'https://dfu.pybricks.com';
/** Pybricks copyright statement. */
export const pybricksCopyright = 'Copyright (c) 2020-2022 The Pybricks Authors';
/** The LEGO name with registered trademark symbol. */
export const legoRegisteredTrademark = 'LEGO®';
// https://www.lego.com/en-us/legal/notices-and-policies/fair-play/
/** LEGO "fair play" disclaimer */
export const legoDisclaimer =
+4 -1
View File
@@ -14,6 +14,7 @@ import { useTernaryDarkMode } from 'usehooks-ts';
import AboutDialog from '../about/AboutDialog';
import { appCheckForUpdate, appReload, appShowInstallPrompt } from '../app/actions';
import {
legoRegisteredTrademark,
pybricksBugReportsUrl,
pybricksGitterUrl,
pybricksProjectsUrl,
@@ -106,7 +107,9 @@ const Settings: React.VoidFunctionComponent = () => {
id="pb-settings-flash-official-button"
minimal={true}
icon="download"
label={i18n.translate('firmware.flashLegoButton.label')}
label={i18n.translate('firmware.flashLegoButton.label', {
lego: legoRegisteredTrademark,
})}
onPress={() => dispatch(firmwareRestoreOfficialDialogShow())}
/>
</FormGroup>
+1 -1
View File
@@ -20,7 +20,7 @@
"label": "Install Pybricks Firmware"
},
"flashLegoButton": {
"label": "Restore Official LEGO® Firmware"
"label": "Restore Official {lego} Firmware"
}
},
"help": {
+8 -2
View File
@@ -15,7 +15,7 @@ import Joyride, {
import { useDispatch } from 'react-redux';
import { useEffectOnce, useLocalStorage, useTernaryDarkMode } from 'usehooks-ts';
import { Activity, useActivitiesSelectedActivity } from '../activities/hooks';
import { appName } from '../app/constants';
import { appName, legoRegisteredTrademark } from '../app/constants';
import { useSelector } from '../reducers';
import { tourStart, tourStop } from './actions';
import { useI18n } from './i18n';
@@ -77,7 +77,13 @@ const FlashPybricksFirmwareStep = React.memo(function FlashPybricksFirmwareStep(
const RestoreOfficialFirmwareStep = React.memo(function RestoreOfficialFirmwareStep() {
const i18n = useI18n();
return <p>{i18n.translate('steps.restoreOfficialFirmware.message')}</p>;
return (
<p>
{i18n.translate('steps.restoreOfficialFirmware.message', {
lego: legoRegisteredTrademark,
})}
</p>
);
});
const ConnectToHubStep = React.memo(function ConnectToHubStep() {
+1 -1
View File
@@ -21,7 +21,7 @@
"message": "{appName} requires a special firmware to be flashed to your hub in order to run the program on the hub."
},
"restoreOfficialFirmware": {
"message": "You can always restore the official LEGO® firmware after using the special Pybricks firmware."
"message": "You can always restore the official {lego} firmware after using the special Pybricks firmware."
},
"connectToHub": {
"message": "One you have flashed the Pybricks firmware, click the Bluetooth button to connect to the hub."