GSOC 2020 Spanish Internationalization Contribution

Hello,
I have seen that there is a project to work further in the already existing translations for p5.js in the internationalization process for GSoC 2020. I would be very interested in this. I speak native English and Spanish, and I’m also fluent in Italian. Is there any area where more work would be required or wanted? Any recommendations to make a proposal? I am willing to contribute to any translation needed.

1 Like

Hi @alarcocs,
If you haven’t look in here - https://github.com/processing/p5.js-website/blob/master/contributor_docs/i18n_contribution.md - I would start here.
Saber

2 Likes

Hello, I have examined the p5.js website, and I have seen that there is still a lot of work to be done with the translation, especially with some example descriptions and with some sections of the reference. I would really like to contribute to this for GSoC 2020. I have been familiarizing myself with the way the webpage handles internationalization. However, I have some doubts and I wonder if they could be answered here.
My main doubt is that when I update data for the reference translations in the es.json file, the update is not reflected on the website when the npm run watch command rebuilds the webpage. Is there a reason for this? Is it necessary to build it in another way?
Thank you very much for the assistance,

I have solved this by restarting the npm run watch command, as it would not reflect the changes automatically

I wanted to ask, how are new entries supposed to be added to the es.json file for the reference translation. Every time I try to add a new entry in the format of the other entries, the page seems to break and the reference translation stops working. Any idea why this might be?

Glad you’re thinking about working on the Spanish translation! I haven’t worked on the website previously, but I just managed to add an entry in the translation files. For example:

es.yml

reference:
  Reference: "Referencia"
  Stuff: "Cosas"

This didn’t render anything new or break anything. Then I modified templates/pages/reference/index.hbs as follows:

<h1>Reference</h1>
<br>
<h2>{{#i18n "Stuff"}}{{/i18n}}</h2>

and the new entry displays as expected. How does that compare to your experience?

1 Like

Hi!
Thanks for the help. That part did not give me trouble. What gives me trouble specifically are the translations for the reference sections. As I understand from the documentation, they run on a different mechanism. As I understood it, the modifications are supposed to be done on the es.json file, and then the front-end will pull the data from the file to substitute the generated inline documentation references. This works when I modify existing sections, however as soon as I try to add a new block for missing documentation the site breaks and the translation doesn’t show anymore
e.g. of missing reference translation:

"orbitControl": {
      "description": "Permite el movimiento alrededor de un boceto 3D con un ratón o un panel táctil. Al hacer clic y arrastrar hacia la izquierda, la posición
      de la cámara girará alrededor del centro del boceto, al hacer clic con el botón derecho y al arrastrar se moverá la posición de la cámara
      sin rotación, y al usar la rueda del ratón (desplazamiento) se moverá la cámara más cerca o más lejos del centro del bosquejo. Esta función
      se puede llamar con parámetros que determinan la sensibilidad al movimiento del ratón a lo largo de los ejes X e Y. Llamar a esta función sin
      parámetros es equivalente a orbitControl(1,1). Para invertir la dirección del movimiento en cualquier eje, use un número negativo para la sensibilidad.",
      "params": ["Número: sensibilidad al movimiento del ratón en el eje X (Opcional)",
      "Número: sensibilidad al movimiento del ratón en el eje Y (Opcional)",
      "Número: sensibilidad al movimiento del ratón en el eje X (Opcional)"]
    },
1 Like