Devographics / StateOfJS-2019

State of JS 2019 survey report website
https://2019.stateofjs.com/
Other
143 stars 35 forks source link

[i18n]: seems some paragraph missing from src #51

Open seognil opened 4 years ago

seognil commented 4 years ago

e.g.

Destructuring The destructuring assignment syntax is a JavaScript expression that makes it possible to unpack values from arrays, or properties from objects, into distinct variables.

can't find it for translation

impodracer commented 4 years ago

It looks like those descriptions in 'Features' crawls the definition of MDN except Decorator. I think there's a way to crawl definition depending on current language which I do not know.

SachaG commented 4 years ago

Oh right. Currently we get those descriptions through our own API which makes it a little harder to get the correct language. I think for now we can leave them in English, or maybe just hide them?

norskeld commented 4 years ago

Faced this issue as well. The absence of these blocks in locale file leads to displaying descriptions like on the screenshot.

image

For now, I'm adding these blocks into our locale yml for consistency of translation. @SachaG is this ok, at least as a temporary solution?

- key: block.description.proxies
  t: >
    ... [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy)

- key: block.description.async_await
  t: >
    ... [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function)

- key: block.description.promises
    ... [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)