processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.41k stars 1.35k forks source link

Add `describe()` to default sketch #1954

Open catarak opened 3 years ago

catarak commented 3 years ago

Nature of issue?

New feature details:

As suggested in https://github.com/processing/p5.js/issues/5427, adding describe() would hopefully encourage folks to add a description to their sketches. We could also think about having different descriptions for each of the different translations.

nickmcintyre commented 3 years ago

@catarak I got started on this issue but am not too sure how translations work -- having descriptions in different languages is a great idea!

I think I should read up on i18next and figure out how to apply it along the lines of the following snippet.

import i18next from 'i18next';

const description = i18next.t('DefaultSketch.Description');

const defaultSketch = `function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  describe('${description}');
}`;

Does that seem like a route forward? Happy to test with /translations/locales/es-419/translations.json.

parteekcoder commented 1 year ago

hey @raclim is this issue still open to work as there is one PR

parteekcoder commented 1 year ago

hey @raclim can you please describe about this issue more as It is not clear from above discussion what is exactly required

Qianqianye commented 1 year ago

Thanks @parteekcoder for your interest in working on it. Let's revisit this issue after the describe() guideline is completed in processing/p5.js#6387