chore(i18n,learn): processed translations (#45001)

This commit is contained in:
camperbot
2022-02-04 00:46:32 +05:30
committed by GitHub
parent 0d36c35207
commit f38d19132d
32 changed files with 374 additions and 354 deletions

View File

@ -1,6 +1,6 @@
---
id: 594810f028c0303b75339ad0
title: Align columns
title: Allineare colonne
challengeType: 5
forumTopicId: 302224
dashedName: align-columns
@ -8,11 +8,11 @@ dashedName: align-columns
# --description--
Given an array of many lines, where fields within a line are delineated by a single `$` character, write a program that aligns each column of fields by ensuring that words in each column are separated by at least one space. Further, allow for each word in a column to be either left justified, right justified, or center justified within its column.
Dato un array di molte righe, dove campi in una singola linea sono delimitati da un singolo carattere `$`, scrivi un programma che allinea ogni colonna di campi assicurandoti che le parole in ogni colonna sono separate da almeno uno spazio. In più, permetti ad ogni parola in una colonna di essere o allineata a destra, o allineata a sinistra, o allineata al centro nella sua colonna.
# --instructions--
Use the following text to test your programs:
Usa il seguente testo per testare i tuoi programmi:
```js
const testText = [
@ -29,16 +29,16 @@ const testText = [
];
```
**Note that:**
**Nota che:**
- The example input texts lines may, or may not, have trailing dollar characters.
- All columns should share the same alignment.
- Consecutive space characters produced adjacent to the end of lines are insignificant for the purposes of the task.
- Output text will be viewed in a mono-spaced font on a plain text editor or basic terminal. Lines in it should be joined using new line character (`\n`).
- The minimum space between columns should be computed from the text and not hard-coded.
- It is not a requirement to add separating characters between or around columns.
- Le righe di testo di esempio possono avere o no caratteri di dollaro finali.
- Tutte le colonne dovrebbero condividere lo stesso allineamento.
- I caratteri spazio consecutivi prodotti adiacenti alla fine delle linee sono insignificanti ai fini del compito.
- Il testo di output sarà visualizzato in un carattere mono-spaziato su un editor di testo semplice o un terminale base. Le righe in esso dovrebbero essere unite utilizzando un carattere nuova riga (`\n`).
- Lo spazio minimo tra le colonne dovrebbe essere calcolato dal testo e non codificato.
- Non è un requisito aggiungere caratteri di separazione tra colonne o intorno a colonne.
For example, one of the lines from the `testText`, after jusitifing to the right, left and center respectivelly:
Ad esempio, una delle righe del `testText`, dopo aver giustificato rispettivamente a destra, sinistra, e centro:
```js
' column are separated by at least one space.\n'
@ -48,25 +48,25 @@ For example, one of the lines from the `testText`, after jusitifing to the right
# --hints--
`formatText` should be a function.
`formatText` dovrebbe essere una funzione.
```js
assert(typeof formatText === 'function');
```
`formatText(testText, 'right')` should produce text with columns justified to the right.
`formatText(testText, 'right')` dovrebbe produrre testo con le colonne allineate a destra.
```js
assert.strictEqual(formatText(_testText, 'right'), rightAligned);
```
`formatText(testText, 'left')` should produce text with columns justified to the left.
`formatText(testText, 'left')` dovrebbe produrre testo con le colonne allineate a sinistra.
```js
assert.strictEqual(formatText(_testText, 'left'), leftAligned);
```
`formatText(testText, 'center')` should produce text with columns justified to the center.
`formatText(testText, 'center')` dovrebbe produrre testo con le colonne allineate al centro.
```js
assert.strictEqual(formatText(_testText, 'center'), centerAligned);