Skip to content

Commit e20eb18

Browse files
committed
Move message into translation
1 parent 924396f commit e20eb18

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/core/friendly_errors/fes_core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ function fesCore(p5, fn){
295295
const fnNames = entryPoints;
296296

297297
if (context.preload) {
298-
p5._friendlyError('The preload() function has been removed in p5.js 2.0. Please load assets in setup() using async / await keywords or callbacks instead.', 'preload');
298+
p5._friendlyError(translator('fes.preloadDisabled'), 'preload');
299299
}
300300

301301
const fxns = {};

translations/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"misspelling": "{{location}} It seems that you may have accidentally written \"{{name}}\" instead of \"{{actualName}}\". Please correct it to {{actualName}} if you wish to use the {{type}} from p5.js.",
4848
"misspelling_plural": "{{location}} It seems that you may have accidentally written \"{{name}}\".\nYou may have meant one of the following: \n{{suggestions}}",
4949
"misusedTopLevel": "Did you just try to use p5.js's {{symbolName}} {{symbolType}}? If so, you may want to move it into your sketch's setup() function.\n\n+ More info: {{url}}",
50+
"preloadDisabled": "The preload() function has been removed in p5.js 2.0. Please load assets in setup() using async / await keywords or callbacks instead. See https://dev.to/limzykenneth/asynchronous-p5js-20-458f for more information.",
5051
"positions": {
5152
"p_1": "first",
5253
"p_10": "tenth",

0 commit comments

Comments
 (0)