Skip to content

Commit b6a1f95

Browse files
authored
Merge branch 'develop' into pr05/setup_server_ts_deps
2 parents a6adfec + 397f65b commit b6a1f95

File tree

8 files changed

+86
-48
lines changed

8 files changed

+86
-48
lines changed

client/index.jsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,25 @@ const initialState = window.__INITIAL_STATE__;
2020

2121
const store = configureStore(initialState);
2222

23-
// Add a banner to the page
24-
const banner = document.createElement('div');
25-
banner.id = 'processing-banner';
26-
document.body.appendChild(banner);
23+
if (
24+
window.location.href.indexOf('full') === -1 &&
25+
window.location.href.indexOf('embed') === -1
26+
) {
27+
// Add a banner to the page
28+
const banner = document.createElement('div');
29+
banner.id = 'processing-banner';
30+
document.body.appendChild(banner);
2731

28-
const link = document.createElement('link');
29-
link.rel = 'stylesheet';
30-
link.href = 'https://foundation-donate-banner.netlify.app/static/css/main.css';
31-
document.head.appendChild(link);
32+
const link = document.createElement('link');
33+
link.rel = 'stylesheet';
34+
link.href =
35+
'https://foundation-donate-banner.netlify.app/static/css/main.css';
36+
document.head.appendChild(link);
3237

33-
const script = document.createElement('script');
34-
script.src = 'https://foundation-donate-banner.netlify.app/static/js/main.js';
35-
document.body.appendChild(script);
38+
const script = document.createElement('script');
39+
script.src = 'https://foundation-donate-banner.netlify.app/static/js/main.js';
40+
document.body.appendChild(script);
3641

37-
if (window.location.href.indexOf('full') === -1) {
3842
const buttonScript = document.createElement('script');
3943
buttonScript.type = 'text/javascript';
4044
buttonScript.defer = true;

client/modules/IDE/components/Header/MobileNav.jsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,17 +437,16 @@ const MoreMenu = () => {
437437
<MobileMenuItem onClick={() => dispatch(newFolder(rootFile.id))}>
438438
{t('Nav.Sketch.AddFolder')}
439439
</MobileMenuItem>
440-
{/* TODO: Add Translations */}
441-
<b>Settings</b>
440+
<b>{t('MobilePreferences.Settings')}</b>
442441
<MobileMenuItem
443442
onClick={() => {
444443
dispatch(openPreferences());
445444
}}
446445
>
447-
Preferences
446+
{t('MobilePreferences.Preferences')}
448447
</MobileMenuItem>
449448
<MobileMenuItem onClick={() => setIsLanguageModalVisible(true)}>
450-
Language
449+
{t('MobilePreferences.Language')}
451450
</MobileMenuItem>
452451
<b>{t('Nav.Help.Title')}</b>
453452
<MobileMenuItem onClick={() => dispatch(showKeyboardShortcutModal())}>

client/modules/IDE/components/SketchList.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ const SketchList = ({
148148
context: mobile ? 'mobile' : ''
149149
})
150150
)}
151-
{userIsOwner && renderFieldHeader('visibility', 'Visibility')}
151+
{userIsOwner &&
152+
renderFieldHeader('visibility', t('Visibility.Label'))}
152153
<th scope="col"></th>
153154
</tr>
154155
</thead>

client/modules/User/components/VisibilityDropdown.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { useState, useRef, useEffect } from 'react';
22
import PropTypes from 'prop-types';
3+
import { useTranslation } from 'react-i18next';
34
import LockIcon from '../../../images/lock.svg';
45
import EarthIcon from '../../../images/earth.svg';
56
import CheckmarkIcon from '../../../images/checkmark.svg';
@@ -8,18 +9,20 @@ const VisibilityDropdown = ({ sketch, onVisibilityChange, location }) => {
89
const [isOpen, setIsOpen] = useState(false);
910
const dropdownRef = useRef(null);
1011

12+
const { t } = useTranslation();
13+
1114
const visibilityOptions = [
1215
{
1316
value: 'Public',
14-
label: 'Public',
17+
label: t('Visibility.Public.Label'),
1518
icon: <EarthIcon className="visibility-icon" />,
16-
description: 'Anyone can see this sketch'
19+
description: t('Visibility.Public.Description')
1720
},
1821
{
1922
value: 'Private',
20-
label: 'Private',
23+
label: t('Visibility.Private.Label'),
2124
icon: <LockIcon className="visibility-icon" />,
22-
description: 'Only you can see this sketch'
25+
description: t('Visibility.Private.Description')
2326
}
2427
];
2528

package-lock.json

Lines changed: 19 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "p5.js-web-editor",
3-
"version": "2.18.1",
3+
"version": "2.18.2",
44
"description": "The web editor for p5.js.",
55
"scripts": {
66
"clean": "rimraf dist",
@@ -204,7 +204,7 @@
204204
"@redux-devtools/log-monitor": "^4.0.2",
205205
"@reduxjs/toolkit": "^1.9.3",
206206
"async": "^3.2.3",
207-
"axios": "^1.8.2",
207+
"axios": "^1.12.1",
208208
"babel-plugin-styled-components": "^1.13.2",
209209
"bcryptjs": "^2.4.3",
210210
"blob-util": "^1.2.1",

translations/locales/en-US/translations.json

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"EmailAddress": "[email protected]",
123123
"Socials": "Socials",
124124
"LinkDescriptions": {
125-
"Home": "Learn more about p5.js and our community.",
125+
"Home": "Learn more about p5.js and our community.",
126126
"Examples": "Explore the possibilities of p5.js with short examples.",
127127
"CodeOfConduct": "Read our Community State and Code of Conduct.",
128128
"Libraries": "Expand the possibilities of p5.js with community-created libraries.",
@@ -143,7 +143,7 @@
143143
"SettingsSaved": "Settings saved.",
144144
"EmptyCurrentPass": "Current password field is empty",
145145
"IncorrectCurrentPass": "Current password is incorrect",
146-
"DefaultError":"Something went wrong",
146+
"DefaultError": "Something went wrong",
147147
"UserNotFound": "User not found",
148148
"NetworkError": "Network error"
149149
},
@@ -295,9 +295,9 @@
295295
"SubmitFeedback": "Submit Feedback",
296296
"SubmitFeedbackARIA": "submit-feedback",
297297
"AddCollectionTitle": "Add to collection",
298-
"AddCollectionARIA":"add to collection",
298+
"AddCollectionARIA": "add to collection",
299299
"ShareTitle": "Share",
300-
"ShareARIA":"share"
300+
"ShareARIA": "share"
301301
},
302302
"NewFileModal": {
303303
"Title": "Create File",
@@ -342,7 +342,7 @@
342342
"errorShortPassword": "Password must be at least 6 characters",
343343
"errorConfirmPassword": "Please confirm your password",
344344
"errorNewPassword": "Please enter a new password or leave the current password empty.",
345-
"errorNewPasswordRepeat":"Your New Password must differ from the current one.",
345+
"errorNewPasswordRepeat": "Your New Password must differ from the current one.",
346346
"errorEmptyUsername": "Please enter a username.",
347347
"errorLongUsername": "Username must be less than 20 characters.",
348348
"errorValidUsername": "Username must only consist of numbers, letters, periods, dashes, and underscores."
@@ -498,7 +498,7 @@
498498
"Description": "description",
499499
"NumSketches": "{{count}} sketch",
500500
"NumSketches_plural": "{{count}} sketches",
501-
"By":"Collection by ",
501+
"By": "Collection by ",
502502
"NoSketches": "No sketches in collection",
503503
"TableSummary": "table containing all collections",
504504
"HeaderName": "Name",
@@ -562,7 +562,7 @@
562562
"Overlay": {
563563
"AriaLabel": "Close {{title}} overlay"
564564
},
565-
"QuickAddList":{
565+
"QuickAddList": {
566566
"ButtonRemoveARIA": "Remove from collection",
567567
"ButtonAddToCollectionARIA": "Add to collection",
568568
"View": "View"
@@ -644,7 +644,9 @@
644644
"UsedScreenReader": "Used with screen reader",
645645
"PlainText": "Plain-text",
646646
"TableText": "Table-text",
647-
"Sound": "Sound"
647+
"Sound": "Sound",
648+
"Preferences": "Preferences",
649+
"Language": "Language"
648650
},
649651
"PreferenceCreators": {
650652
"On": "On",
@@ -675,5 +677,16 @@
675677
},
676678
"SkipLink": {
677679
"PlaySketch": "Skip to Play Sketch"
680+
},
681+
"Visibility": {
682+
"Label": "Visibility",
683+
"Public": {
684+
"Description": "Anyone can see this sketch.",
685+
"Label": "Public"
686+
},
687+
"Private": {
688+
"Description": "Only you can see this sketch.",
689+
"Label": "Private"
690+
}
678691
}
679692
}

translations/locales/pt-BR/translations.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,11 @@
589589
"EditSketchARIA": "Editar esboço",
590590
"ByUser": "por"
591591
},
592+
"MobilePreferences": {
593+
"Settings": "Configurações",
594+
"Preferences": "Preferências",
595+
"Language": "Idioma"
596+
},
592597
"PreferenceCreators": {
593598
"On": "Ligado",
594599
"Off": "Desligado"
@@ -606,5 +611,16 @@
606611
},
607612
"SkipLink": {
608613
"PlaySketch": "Pule para reproduzir o esboço"
614+
},
615+
"Visibility": {
616+
"Label": "Visibilidade",
617+
"Public": {
618+
"Description": "Qualquer um pode ver este esboço.",
619+
"Label": "Público"
620+
},
621+
"Private": {
622+
"Description": "Apenas você pode ver este esboço.",
623+
"Label": "Privado"
624+
}
609625
}
610626
}

0 commit comments

Comments
 (0)