Introduction and adding Italian as new language

Hi, I’m Yuki, and I’m a computer science at Sapienza University of Rome.
I’m interested in the Internationalization improvements project for the GSoC20 and, as a native Italian speaker, I would like to work on an Italian translation of the p5.js website.
I understand that adding a new language is less of a priority than bringing the work in progress ones to full implementation, but regardless I would like to know if this could be an interesting/useful project.

2 Likes

Hi @Yuki, sounds like a good project idea. Have you taken a look here? - https://github.com/processing/p5.js-website/blob/master/contributor_docs/i18n_contribution.md

Hi @saberkhan, thank you for your answer!
Yes, I did. I also spoke with Kenneth Lim on Github (https://github.com/processing/p5.js-website/pull/573) and he pointed out that I should take the long term sustainability of the translation project into account. I wouldn’t want to propose a project that can’t be mantained once the GSoC program is over. Who should I talk to about this topic?

1 Like

Kenneth is probably the best person to talk to about this. But perhaps the translation project is worth proposing while noting that there needs to be some sort consideration of sustainability.

2 Likes

One last thing, what do you suggest focusing on, writing the proposal or starting to translate right away? (or both?)

I think writing the proposal while attempting some translation would be best. It would ensure you understood the logistics on translation/

1 Like

Okay, thank you for your help :slight_smile:

I went through the “Contributing to p5.js website internationalization” guide and from what I understand, in order to translate the p5.js website we have to translate the documentation from the example files (185 files), the YAML file (about 669 lines) and create the JSON file for the translation of Reference (about 1717 lines).
Did I understand the guide correctly or did I miss something? @saberkhan @limzykenneth

Yup, that’s the three main areas of where translations lie. The YAML file will be the easiest and probably the first one most people will do, then the JSON for reference. The examples are a lot more tricky because they need to be done individually.

One thing to note is that while the YAML file is pretty up to date with latest English version of the site, the documentation JSON and the examples are less so.

1 Like

Hi @limzykenneth, I was wondering how the es.json file was first created.
Was it created by manually extracting the strings from each of the p5.js files or is there a script to extract all the strings automatically?
What I mean is: is there a way to generate an initial en.json file (containing all the strings that have to be translated) from which to start the translation?
If that’s not available, I was thinking of adding to my proposal the development of a script to generate that (en.json) first.

cc: @lmccart

I don’t know how the files were initially created, looking at the commits it seems like it is added manually and gradually by @montoyamoraga as he’s creating the Spanish translation.

There probably is a way to generate a en.json from data.json (the main reference data file) but I personally would like to see another way of translating the reference. The system in place now is very hacky and while I did try to make it more reliable, the system is still hot swapping the English version of the reference with the translated version of the reference after everything is loaded. Rather than patching this system it would be nice to see something that would work in conjuction with the main website’s translation, if that is at all possible.

3 Likes

that’s true, the process involved a lot of manual steps, particularly when creating the first translation.
i havent’ done it in a while, is there any step i can look up to help? happy to add a new spanish translation to test the workflow over the weekend, feel free to tag me everyone :slight_smile:

2 Likes

Thank you for your answer :slight_smile:
I still have a few questions:

  1. Is the data.json generated automatically from the p5.js repository or is that also built/updated manually everytime? (sounds a bit tedious)
  2. Why is the swapping system so bad?
  3. What you mean by “something that would work in conjuction with the main website’s translation”? (Maybe with hbs files like the rest of the website?)

Sorry for late reply, I’m not usually on the forum.

  1. data.json is generated automatically from the inline documentation using yuidocs. The structure of it is not something we control.
  2. The swapping system is a bit unstable and it also isn’t working in the same way as how the rest of the site does translation, making it necessary for us to maintain multiple translation system. As a result it is drifting out of sync with the English version.
  3. Mentioned in 2, it means it doesn’t work in the same way, ie is a separate system to maintain. It doesn’t need to work the same way (built from hbs) but to the translator one set of instructions should ideally cover both sets of translations.

It’s a bit hard to quantify what is the approach that I’m looking for, which is where your proposal can come in and suggest ways to make the translation process more streamlined, more easily monitored and updated.

3 Likes

Thanks for the detailed answer. Should I add this to the i18n_contribution.md file?

1 Like

If you feel it is missing and it should be mentioned, do go ahead and add it.

1 Like