# Introduction and adding Italian as new language

**URL:** <https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370>\
**Category:** Summer of Code\
**Created:** [March 3, 2020, 10:56pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370 "2020-03-03T22:56:38Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 3, 2020, 10:56pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/1 "2020-03-03T22:56:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![saberkhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/saberkhan/32/1541_2.png) [@saberkhan](https://discourse.processing.org/u/saberkhan)\
**Post date:** [March 9, 2020, 1:08pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/2 "2020-03-09T13:08:24Z")

</div>

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](https://github.com/processing/p5.js-website/blob/master/contributor_docs/i18n_contribution.md)

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 9, 2020, 2:53pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/3 "2020-03-09T14:53:37Z")

</div>

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](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?

---

<div class="post-metadata">

**Author:** ![saberkhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/saberkhan/32/1541_2.png) [@saberkhan](https://discourse.processing.org/u/saberkhan)\
**Post date:** [March 9, 2020, 3:43pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/4 "2020-03-09T15:43:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 9, 2020, 4:59pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/5 "2020-03-09T16:59:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![saberkhan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/saberkhan/32/1541_2.png) [@saberkhan](https://discourse.processing.org/u/saberkhan)\
**Post date:** [March 9, 2020, 5:01pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/6 "2020-03-09T17:01:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 9, 2020, 5:03pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/7 "2020-03-09T17:03:39Z")

</div>

Okay, thank you for your help 🙂

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 15, 2020, 5:49pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/8 "2020-03-15T17:49:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![limzykenneth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/limzykenneth/32/1449_2.png) [@limzykenneth](https://discourse.processing.org/u/limzykenneth)\
**Post date:** [March 15, 2020, 6:47pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/9 "2020-03-15T18:47:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 18, 2020, 6:00pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/10 "2020-03-18T18:00:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![limzykenneth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/limzykenneth/32/1449_2.png) [@limzykenneth](https://discourse.processing.org/u/limzykenneth)\
**Post date:** [March 20, 2020, 10:47am UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/11 "2020-03-20T10:47:59Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![montoyamoraga](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/montoyamoraga/32/16457_2.png) [@montoyamoraga](https://discourse.processing.org/u/montoyamoraga)\
**Post date:** [March 21, 2020, 12:57am UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/12 "2020-03-21T00:57:04Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [March 21, 2020, 6:35pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/13 "2020-03-21T18:35:55Z")

</div>

Thank you for your answer 🙂  
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?)

---

<div class="post-metadata">

**Author:** ![limzykenneth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/limzykenneth/32/1449_2.png) [@limzykenneth](https://discourse.processing.org/u/limzykenneth)\
**Post date:** [April 1, 2020, 12:11pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/14 "2020-04-01T12:11:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Yuki](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/yuki/32/8283_2.png) [@Yuki](https://discourse.processing.org/u/Yuki)\
**Post date:** [April 3, 2020, 3:53pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/15 "2020-04-03T15:53:04Z")

</div>

Thanks for the detailed answer. Should I add this to the i18n\_contribution.md file?

---

<div class="post-metadata">

**Author:** ![limzykenneth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/limzykenneth/32/1449_2.png) [@limzykenneth](https://discourse.processing.org/u/limzykenneth)\
**Post date:** [April 3, 2020, 4:04pm UTC](https://discourse.processing.org/t/introduction-and-adding-italian-as-new-language/18370/16 "2020-04-03T16:04:05Z")

</div>

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