Hello,
This is my 17th contribution to Node.js. I’m currently translating this project into Spanish, along with an awesome group of translators and moderators from Utopian + Da Vinci, we are doing our best to do everything correctly. If you are interested in open-source projects, I encourage you to keep reading.
Node.js is a very extensive project, it may seem impossible to translate it completely, but the Spanish team is working really and we are slowly making progress. It’s currently at 28% on Crowdin (yay!).
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. It achieves low latency and high throughput by taking a “non-blocking” approach to serving requests. Basically, Node.js can open, create, read, write, close and delete files on a server, using JavaScript. It also includes tasks that will be executed on certain servers.
I know it can be a bit confusing at first, so let me explain it to you in simpler words:
Let’s say you want to build a software to keep record of your company’s earnings. A feature where viewing your monthly earnings is updated live can be very useful. In that way, if one of your sales employees is busy, another employee could still be seeing the updates live, without reloading the page.
This has been done before using another technologies. However, Node.js is way faster and better. So, yes it is the best option for developers who want to build real-time applications where both the server and the client can exchange data freely with no restrictions.
Contribution Specifications
Being such an important project, Node.js is being translated to several languages so it can reach many people around the world. As it for me, I am contributing to the Spanish language.
Translation Overview
This is my 5th contribution to the folder buffer.md on v6. The Spanish team started to translate Node’s files of the v10, now we’re progressively moving to the version 6 of this awesome project. Since I’m not a guru in computer science I had to read a lot before I could feel confident enough to translate the content of this folder, which is something you must regularly do while translating Node.js since it has many specific terms related to computer science.
buffer.md talks about the Buffer class and all of its functions inside Node.js. I translated the methods: buf.copy(target[, targetStart[, sourceStart[, sourceEnd]]]), buf.entries(), buf.equals(otherBuffer), buf.fill(value[, offset[, end]][, encoding]), buf.includes(value[, byteOffset][, encoding]), buf.indexOf(value[, byteOffset][, encoding]), buf.includes(value[, byteOffset][, encoding]), buf.keys() and buf.lastIndexOf(value[, byteOffset][, encoding]).
Like I did last time, I feel obligated to first describe a few important terms you will find inside this folder, in that way we can be on the same page:
In my previous contribution I explained how streams are basically a sequence of data (normally bytes) being moved from one point to another over time. Binary data is the only type of data that can be executed by a computer and it’s represented in combinations of ones and zeros. And a Buffer is a portion of the memory that stores a stream that's then collected and stored in variables inside the same Buffer.
So the Buffer class is basically a “waiting area” for information! When Node.js receives data that’s not ready to be processed yet it will send it to the Buffer and store it there until it’s ready.
Inside this folder there are all the Buffer methods with a brief explanation of how to use them, the values you have to use to active the method and an example of the code. Once you understand how they work it gets easier to translate the text.
I’ll explain some of the methods I translated this time:
It is basically used to compare two buffers. It will return true
if both buffers have the same amount of bytes. Otherwise, it will return false
. Just like you can see in the picture, the object otherBuffer
is the buffer you’re going to compare.
Here is how I translated that paragraph:
It is used to verify if the buffer contains a specified value. If the value you’re searching is present, it will return an integer that represents the index of the first occurrence of that value, otherwise it will return -1
. As you can see in the picture above, value
can be either a string, a buffer or an integer.
Here is how I translated that paragraph:
It is used to copy an specific amount of bytes from a source buffer to a target buffer. As you can see in the picture, target
is the buffer to which we need to copy, targetStart
refers to the position where the copy starts from source, on the other hand, sourceStart
represents the position from which copy starts, and lastly, sourceEnd
is the position till which copy is done.
It returns an integer that represents the amount of bytes copied into the target buffer.
Here is how I translated that paragraph:
Other translation samples:
English:
Copies data from a region of buf
to a region in target even if the target memory region overlaps with buf
.
Spanish:
Copia datos desde una región de buf
a una región en target, incluso si la región de la memoria de target se superpone con buf
.
English:
Fills buf
with the specified value
. If the offset
and end
are not given, the entire buf
will be filled. This is meant to be a small simplification to allow the creation and filling of a Buffer
to be done on a single line.
Spanish:
Llena buf
con el value
especificado. Si el offset
y end
no son dados, el buf
completo se llenará. Esto pretende ser una pequeña simplificación para permitir que la creación y llenado de un Buffer
sea realizado en una sola línea.
Some words and code values were left untranslated on purpose, otherwise, their true meaning would be lost in the translation.
Languages
Source Language: English
Translated Language: Spanish
I have worked as a translator for the project Da Vinci Polyglot and I am currently working as a language moderator for the Utopian + Da Vinci translation category.
And of course, I am part of the Spanish team!
Word Count
I translated 1060 words on this contribution.
Greetings, @marugy99. Thanks for submitting your contribution!
Your contribution has been approved. Congratulations!
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Chat with us on Discord
Thank you for your review, @alejohannes! Keep up the good work!
Hi @marugy99!
Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server
Hey, @marugy99!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Congratulations @marugy99! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
Click here to view your Board of Honor
If you no longer want to receive notifications, reply to this comment with the word
STOP
Do not miss the last post from @steemitboard: