You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributor_docs/es/contributing_to_the_p5js_reference.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,7 @@ Cualquier cosa en un bloque de estos se interpretará como documentación de ref
71
71
72
72
## Bloque de comentarios de referencia
73
73
74
-
Desglosemos el bloque de comentarios de referencia anterior para la función `sin()` y veamos qué hace cada sección. Puedes comparar lo que vez en estos comentarios con el contenido de la página de referencia para [`sin()`](https://p5js.org/reference/#/p5/sin).
74
+
Desglosemos el bloque de comentarios de referencia anterior para la función `sin()` y veamos qué hace cada sección. Puedes comparar lo que vez en estos comentarios con el contenido de la página de referencia para [`sin()`](https://p5js.org/reference/p5/sin).
75
75
76
76
```
77
77
/**
@@ -262,7 +262,7 @@ Si no quieres que el ejemplo se ejecute como parte de las pruebas automatizadas
262
262
* </code></div>
263
263
```
264
264
265
-
Si tu ejemplo utiliza archivos externos como recursos, colócalos en la carpeta [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) (o reutiliza uno que ya esté allí) y luego enlázalos con "assets/nombrearchivo.ext" en el código. Consulta la referencia de [tint()](http://p5js.org/reference/#/p5/tint) como ejemplo.
265
+
Si tu ejemplo utiliza archivos externos como recursos, colócalos en la carpeta [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) (o reutiliza uno que ya esté allí) y luego enlázalos con "assets/nombrearchivo.ext" en el código. Consulta la referencia de [tint()](http://p5js.org/reference/p5/tint) como ejemplo.
266
266
267
267
### Agregar descripción a un lienzo usando `describe()`
FES will generate the following message in the console:
258
258
259
259
```
260
-
🌸 p5.js says: [sketch.js, line 14] arc() was expecting Number for the first parameter, received string instead. (http://p5js.org/reference/#/p5/arc)
260
+
🌸 p5.js says: [sketch.js, line 14] arc() was expecting Number for the first parameter, received string instead. (http://p5js.org/reference/p5/arc)
261
261
```
262
262
263
263
@@ -336,7 +336,7 @@ function preload() {
336
336
FES will generate the following message in the console:
337
337
338
338
```
339
-
🌸 p5.js says: [sketch.js, line 8] An error with message "Cannot read properties of undefined (reading 'background')" occurred inside the p5js library when "background" was called. If not stated otherwise, it might be due to "background" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function. (http://p5js.org/reference/#/p5/preload)
339
+
🌸 p5.js says: [sketch.js, line 8] An error with message "Cannot read properties of undefined (reading 'background')" occurred inside the p5js library when "background" was called. If not stated otherwise, it might be due to "background" being called from preload. Nothing besides load calls (loadImage, loadJSON, loadFont, loadStrings, etc.) should be inside the preload function. (http://p5js.org/reference/p5/preload)
340
340
```
341
341
342
342
Internal Error Example 2:
@@ -351,7 +351,7 @@ function setup() {
351
351
FES will generate the following message in the console:
352
352
353
353
```js
354
-
🌸 p5.js says: [sketch.js, line 12] An error with message "Cannot read properties of undefined (reading 'bind')" occurred inside the p5js library when mouseClicked was called. If not stated otherwise, it might be an issue with the arguments passed to mouseClicked. (http://p5js.org/reference/#/p5/mouseClicked)
354
+
🌸 p5.js says: [sketch.js, line 12] An error with message "Cannot read properties of undefined (reading 'bind')" occurred inside the p5js library when mouseClicked was called. If not stated otherwise, it might be an issue with the arguments passed to mouseClicked. (http://p5js.org/reference/p5/mouseClicked)
355
355
```
356
356
357
357
Example of an Error (Scope):
@@ -386,7 +386,7 @@ function setup() {
386
386
FES will generate the following message in the console:
387
387
388
388
```
389
-
🌸 p5.js says: [sketch.js, line 2] It seems that you may have accidentally written "xolor" instead of"color". Please correct it to color if you wish to use the function from p5.js. (http://p5js.org/reference/#/p5/color)
389
+
🌸 p5.js says: [sketch.js, line 2] It seems that you may have accidentally written "xolor" instead of"color". Please correct it to color if you wish to use the function from p5.js. (http://p5js.org/reference/p5/color)
390
390
```
391
391
392
392
@@ -431,7 +431,7 @@ function preload() {
431
431
FES will generate the following message in the console:
432
432
433
433
```
434
-
🌸 p5.jssays:ItseemsthatyoumayhaveaccidentallywrittenpreLoadinsteadofpreload. Pleasecorrectitifit's not intentional. (http://p5js.org/reference/#/p5/preload)
434
+
🌸 p5.jssays:ItseemsthatyoumayhaveaccidentallywrittenpreLoadinsteadofpreload. Pleasecorrectitifit's not intentional. (http://p5js.org/reference/p5/preload)
Copy file name to clipboardExpand all lines: contributor_docs/hi/contributing_to_the_p5js_reference.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ p5.js के स्रोत कोड को देखने पर, आपक
73
73
74
74
## संदर्भ टिप्पणी ब्लॉक
75
75
76
-
ऊपर दिए गए `sin()` फ़ंक्शन के लिए संदर्भ टिप्पणियों ब्लॉक को विश्लेषित करें और देखें कि प्रत्येक खंड का क्या काम है। आप यहाँ टिप्पणियों में दिखने वाली जानकारी और `sin()` के संदर्भ पृष्ठ पर जो दिखता है, उनकी तुलना कर सकते हैं। ([`sin()`](https://p5js.org/reference/#/p5/sin))
76
+
ऊपर दिए गए `sin()` फ़ंक्शन के लिए संदर्भ टिप्पणियों ब्लॉक को विश्लेषित करें और देखें कि प्रत्येक खंड का क्या काम है। आप यहाँ टिप्पणियों में दिखने वाली जानकारी और `sin()` के संदर्भ पृष्ठ पर जो दिखता है, उनकी तुलना कर सकते हैं। ([`sin()`](https://p5js.org/reference/p5/sin))
77
77
78
78
```
79
79
/**
@@ -270,7 +270,7 @@ p5.js के स्रोत कोड को देखने पर, आपक
270
270
* </code></div>
271
271
```
272
272
273
-
यदि आपका उदाहरण बाहरी संसाधन फ़ाइलों का उपयोग करता है, तो उन्हें [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) फ़ोल्डर में रखें (या पहले से वहां मौजूद कोई उपयोग करें) फिर उन्हें कोड में "assets/filename.ext" के साथ लिंक करें। उदाहरण के लिए [tint()](http://p5js.org/reference/#/p5/tint) संदर्भ देखें।
273
+
यदि आपका उदाहरण बाहरी संसाधन फ़ाइलों का उपयोग करता है, तो उन्हें [/docs/yuidoc-p5-theme/assets](https://github.com/processing/p5.js/tree/main/docs/yuidoc-p5-theme/assets) फ़ोल्डर में रखें (या पहले से वहां मौजूद कोई उपयोग करें) फिर उन्हें कोड में "assets/filename.ext" के साथ लिंक करें। उदाहरण के लिए [tint()](http://p5js.org/reference/p5/tint) संदर्भ देखें।
274
274
275
275
276
276
### `describe()` का उपयोग करके कैनवास का विवरण जोड़ें
Copy file name to clipboardExpand all lines: contributor_docs/how-to-add-friendly-error-messages.md
+6-6
Original file line number
Diff line number
Diff line change
@@ -122,9 +122,9 @@ circle(100, 100, 'hello');
122
122
The code above should generate the following FE messages:
123
123
124
124
```
125
-
🌸 p5.js says: [sketch.js, line 9] circle() was expecting at least 3 arguments, but received only 1. (http://p5js.org/reference/#/p5/circle)
126
-
🌸 p5.js says: [sketch.js, line 14] circle() was expecting no more than 3 arguments, but received 4. (http://p5js.org/reference/#/p5/circle)
127
-
🌸 p5.js says: [sketch.js, line 12] circle() was expecting Number for the third parameter, received string instead. (http://p5js.org/reference/#/p5/circle)
125
+
🌸 p5.js says: [sketch.js, line 9] circle() was expecting at least 3 arguments, but received only 1. (http://p5js.org/reference/p5/circle)
126
+
🌸 p5.js says: [sketch.js, line 14] circle() was expecting no more than 3 arguments, but received 4. (http://p5js.org/reference/p5/circle)
127
+
🌸 p5.js says: [sketch.js, line 12] circle() was expecting Number for the third parameter, received string instead. (http://p5js.org/reference/p5/circle)
128
128
```
129
129
130
130
Congratulations 🎈! You are now done adding parameter validation for your new method.
@@ -247,7 +247,7 @@ p5._friendlyError(
247
247
This should generate the following FE messages:
248
248
249
249
```
250
-
🌸 p5.js says: [sketch.js, line 19] An error with the message "vertex() must be used once before calling bezierVertex()" occurred inside the p5js library when bezierVertex was called. If not stated otherwise, it might be an issue with the arguments passed to bezierVertex. (http://p5js.org/reference/#/p5/bezierVertex)
250
+
🌸 p5.js says: [sketch.js, line 19] An error with the message "vertex() must be used once before calling bezierVertex()" occurred inside the p5js library when bezierVertex was called. If not stated otherwise, it might be an issue with the arguments passed to bezierVertex. (http://p5js.org/reference/p5/bezierVertex)
251
251
```
252
252
253
253
Congratulations 🎈! You are now done adding library error messages for your method.
@@ -258,13 +258,13 @@ Congratulations 🎈! You are now done adding library error messages for your me
258
258
FES message writers should prioritize lowering the barrier of understanding error messages and increasing the accessibility of the debugging process. Here is one example:
259
259
260
260
```
261
-
🌸 p5.js says: [sketch.js, line 7] circle() was expecting at least 3 arguments, but received only 1. (http://p5js.org/reference/#/p5/circle)
261
+
🌸 p5.js says: [sketch.js, line 7] circle() was expecting at least 3 arguments, but received only 1. (http://p5js.org/reference/p5/circle)
262
262
```
263
263
264
264
The above parameter validation message will be shown in Korean if the browser is set to `ko-KR` (Korean) locale:
265
265
266
266
```
267
-
🌸 p5.js says: [sketch.js, 줄7] 최소 3개의 인수(argument)를 받는 함수 circle()에 인수가 1개만 입력되었습니다. (http://p5js.org/reference/#/p5/circle)
267
+
🌸 p5.js says: [sketch.js, 줄7] 최소 3개의 인수(argument)를 받는 함수 circle()에 인수가 1개만 입력되었습니다. (http://p5js.org/reference/p5/circle)
268
268
```
269
269
270
270
[Friendly Errors i18n Book](https://almchung.github.io/p5-fes-i18n-book/) discusses challenges and best practices for writing Friendly Error messages within the cross-cultural i18n context. Here are the main points from the book:
0 commit comments