Node.js Translation to Spanish - (1507 words) (Part-67)

Words
813
Reading
4 min
Listen
Play
7y

Repository

https://github.com/nodejs/i18n

Project Details

Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser.

Node.js came into existence when the original developers of JavaScript extended it from something you could only run in the browser to something you could run on your machine as a standalone application.

In simple words, it's an open source execution environment for developing web applications, which is event-based, it uses the V8 engine to provide an execution environment that compiles and executes JavaScript at a higher speed. It is possible to run Node.js without any restriction on Windows, Linux and Mac OS X.

It should be noted that it is NOT a server language, this means that it executes code, so it could be understood as an interpreter.

Contribution Specifications

Node.js is currently being translated into 33 languages. I'm contributing to translate it into the Spanish language.

67.PNG

So far, we have managed to translate 67% of the project!

Translation Overview

I started the translation of the folder N-api.md.

1_qwoA9FmZDrE5q_9qqBCQ.png

N-API (pronounced N as in the letter, followed by API) is an API for building native Addons. It is independent from the underlying JavaScript runtime (ex V8) and is maintained as part of Node.js itself.

Previously, I briefly explained what an API is. If you want to see more information about it, you can visit this post.

The N-API is an API that ensures ABI stability across Node.js versions and different compiler levels. And an ABI (application binary interface) it's the interface between two program modules, it determines details such as how to call functions, in which binary format information should be passed from one program component to the next, or to the operating system in the case of a system call.

In this part of the module, how to work with JavaScript functions is explained.

N-API provides a set of APIs that allow JavaScript code to call back into native code. N-API APIs that support calling back into native code take in a callback functions represented by the napi_callback type. When the JavaScript VM calls back to native code, the napi_callback function provided is invoked.

The APIs documented in this part allow the callback function to do the following:

  • Get information about the context in which the callback was invoked.
  • Get the arguments passed into the callback.
  • Return a napi_value back from the callback.

Additionally, N-API provides a set of functions which allow calling JavaScript functions from native code. One can either call a function like a regular JavaScript function call, or as a constructor function.

As an example of the work done, I will use the function napi_create_function:


English:

napi_create_function

Returns napi_ok if the API succeeded.

This API allows an add-on author to create a function object in native code. This is the primary mechanism to allow calling into the add-on's native code from JavaScript.

Note: The newly created function is not automatically visible from script after this call. Instead, a property must be explicitly set on any object that is visible to JavaScript, in order for the function to be accessible from script.

In order to expose a function as part of the add-on's module exports, set the newly created function on the exports object.

Spanish:

napi_create_function

Devuelve napi_ok si la API fue exitosa.

Esta API permite al autor de un complemento crear un objeto de función en código nativo. Este es el mecanismo primario para permitir llamar al código nativo del complemento desde JavaScript.

Nota: La función recién creada no es automáticamente visible desde el script después de esta llamada. En cambio, una propiedad debe estar explícitamente establecida en cualquier objeto que sea visible para JavaScript, para que la función sea accesible desde el script.

Para exponer una función como parte de las exportaciones del módulo del complemento, establezca la función recién creada en el objeto de exportaciones.


Languages

This contribution was translated from English to Spanish.

Word Count

The number of words reflected in the title doesn't include words that didn't require a translation.

  • In this contribution, I've translated 1507 words.
  • I've translated a total of 89782 words so far*

*Considering non-translatable content (proper names, functions, codes, etc.)

Previous translations on this project

From Part 62 to Part 66

Part 61

Parts 59 and 60

Parts 57 and 58

Part 56

Parts 54 and 55

Part 53

Part 52

From Part 41 to Part 51

From Part 14 to Part 40

Part 13

Parts 11 and 12.

From Part 7 to Part 10

From Part 1 to Part 6

Proof of Authorship

aa.PNG

This counter includes non-translatable words, so it is necessary to work on more content to extract an average of 1000 translatable words.

You can check My Crowdin Profile for verify my contribution in this project.

Node.js Translation to Spanish - (1507 words) (Part-67) | Ecency