Skip to content

Commit b5165fa

Browse files
author
angelochiello
committed
Translated till "LIFT" (included)
1 parent 06b913d commit b5165fa

File tree

1 file changed

+72
-71
lines changed

1 file changed

+72
-71
lines changed

i18n/it-IT.md

Lines changed: 72 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
3535
1. [Annotazioni manuali per la Dependency Injection](#manual-annotating-for-dependency-injection)
3636
1. [Minificazione e Annotazioni](#minification-and-annotation)
3737
1. [Gestione delle eccezzioni](#exception-handling)
38-
1. [Dare i nomi](#naming)
38+
1. [Nomenclatura](#naming)
3939
1. [Principio "LIFT" per la struttura dell'applicazione](#application-structure-lift-principle)
4040
1. [Struttura dell'applicazione](#application-structure)
4141
1. [Modularità](#modularity)
@@ -1049,7 +1049,7 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
10491049
}
10501050
```
10511051
1052-
Nota: Ci sono molte opzioni per i nomi delle directive, in particolare dal momento che possono essere usate in ambiti stretti o largi. Scegline uno che sia chiaro e distino che dia senso alla directive e il suo nome del file. Alcuni esempi sono sotto ma vedi la sezione sul dare i nomi per maggiori raccomandazioni.
1052+
Nota: Ci sono molte opzioni per i nomi delle directive, in particolare dal momento che possono essere usate in ambiti stretti o largi. Scegline uno che sia chiaro e distino che dia senso alla directive e il suo nome del file. Alcuni esempi sono sotto ma vedi la sezione sulla nomenclatura per maggiori raccomandazioni.
10531053
10541054
### Limiti alla manipolazione del DOM
10551055
@@ -1639,29 +1639,29 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
16391639
16401640
**[Torna all'inizio](#table-of-contents)**
16411641
1642-
## Dare i nomi
1642+
## Nomenclatura
16431643
1644-
### Naming Guidelines
1644+
### Linee guida per assegnare i nomi
16451645
1646-
- Use consistent names for all components following a pattern that describes the component's feature then (optionally) its type. My recommended pattern is `feature.type.js`. There are 2 names for most assets:
1647-
* the file name (`avengers.controller.js`)
1648-
* the registered component name with Angular (`AvengersController`)
1646+
- Usa nomi consistenti per tutti i componenti seguendo uno schema che descriva le funzionalità dei componenti e poi (a scelta) il suo tipo. Lo schema che consiglio è `feature.type.js`. Ci sono 2 nomi per la maggior parte dei componenti:
1647+
* il nome del file (`avengers.controller.js`)
1648+
* il nome del componente registrato con Angular (`AvengersController`)
16491649
1650-
*Perché?*: Naming conventions help provide a consistent way to find content at a glance. Consistency within the project is vital. Consistency with a team is important. Consistency across a company provides tremendous efficiency.
1650+
*Perché?*: Convezioni sui nomi aiutano a fornire un modo consistente per trovate i contenuti a colpo d'occhio. Essere consisteni in un progetto è vitale. Essere consistenti in un team è importante. Essere consistenti nell'insieme di un'azienda è tremendamente efficiente.
16511651
1652-
*Perché?*: The naming conventions should simply help you find your code faster and make it easier to understand.
1652+
*Perché?*: Le convezioni sulla nomenclatura dovrebbe semplicemente aiutare a trovare il tuo codice più rapidamente e renderlo più semplice da comprendere.
16531653
1654-
### Feature File Names
1654+
### Nomi dei file per funzionalità
16551655
1656-
- Use consistent names for all components following a pattern that describes the component's feature then (optionally) its type. My recommended pattern is `feature.type.js`.
1656+
- Usa nomi consistenti per tutti i componenti seguendo uno schema che descriva le funzionalità dei componenti e poi (a scelta) il suo tipo. Lo schema che consiglio è `feature.type.js`.
16571657
1658-
*Perché?*: Provides a consistent way to quickly identify components.
1658+
*Perché?*: Fornisce un modo consistente per identificare facilmente i componenti.
16591659
1660-
*Perché?*: Provides pattern matching for any automated tasks.
1660+
*Perché?*: Fornisce uno schema di corrispondenza per qualsiasi processo di automatizzazione.
16611661
16621662
```javascript
16631663
/**
1664-
* common options
1664+
* opzioni compuni
16651665
*/
16661666

16671667
// Controllers
@@ -1677,7 +1677,7 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
16771677
16781678
```javascript
16791679
/**
1680-
* recommended
1680+
* raccomandato
16811681
*/
16821682

16831683
// controllers
@@ -1706,46 +1706,46 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
17061706
avenger-profile.directive.spec.js
17071707
```
17081708
1709-
Nota: Another common convention is naming controller files without the word `controller` in the file name such as `avengers.js` instead of `avengers.controller.js`. All other conventions still hold using a suffix of the type. Controllers are the most common type of component so this just saves typing and is still easily identifiable. I recommend you choose 1 convention and be consistent for your team.
1709+
Nota: Un'altra concenzione comune è dare il nome al file del controller senza la parola `controller` nel nome del file come `avengers.js` invece di `avengers.controller.js`. Tutte le altre convenzioni continuano ancora a mantenere il suffisso del tipo. I controller sono i tipi di componenti più comuni perciò questo risparmia digitazione continuando ad essere facilmente identificabili. Consiglio di scegliere 1 convenzione e rimanere consistente nel tuo team.
17101710
17111711
```javascript
17121712
/**
1713-
* recommended
1713+
* raccomandato
17141714
*/
17151715
// Controllers
17161716
avengers.js
17171717
avengers.spec.js
17181718
```
17191719
1720-
### Test File Names
1720+
### Nomi dei file di test
17211721
1722-
- Name test specifications similar to the component they test with a suffix of `spec`.
1722+
- Nomina le specifiche dei test in modo similare al componente che testano aggiundendo il suffisso `spec`.
17231723
1724-
*Perché?*: Provides a consistent way to quickly identify components.
1724+
*Perché?*: Fornisce un modo consistente per identificare facilmente i componenti.
17251725
1726-
*Perché?*: Provides pattern matching for [karma](http://karma-runner.github.io/) or other test runners.
1726+
*Perché?*: Fornisce uno schema di corrispondeza per [karma](http://karma-runner.github.io/) o altri esecutori di test.
17271727
17281728
```javascript
17291729
/**
1730-
* recommended
1730+
* raccomandato
17311731
*/
17321732
avengers.controller.spec.js
17331733
logger.service.spec.js
17341734
avengers.routes.spec.js
17351735
avenger-profile.directive.spec.js
17361736
```
17371737
1738-
### Controller Names
1738+
### Nomi dei controller
17391739
1740-
- Use consistent names for all controllers named after their feature. Use UpperCamelCase for controllers, as they are constructors.
1740+
- Usa nomi consistenti per tutti i controller nominandoli come le loro funzionalità. Usa UpperCamelCase per i constroller, dal momento che sono costruttori.
17411741
1742-
*Perché?*: Provides a consistent way to quickly identify and reference controllers.
1742+
*Perché?*: Fornisce un modo consistente per identificare e referenziare facilmente i controller.
17431743
1744-
*Perché?*: UpperCamelCase is conventional for identifying object that can be instantiated using a constructor.
1744+
*Perché?*: UpperCamelCase è una convezione per identificare un oggetto che può essere instanziato usando un costruttore.
17451745
17461746
```javascript
17471747
/**
1748-
* recommended
1748+
* raccomandato
17491749
*/
17501750

17511751
// avengers.controller.js
@@ -1756,17 +1756,17 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
17561756
function HeroAvengers(){ }
17571757
```
17581758
1759-
### Controller Name Suffix
1759+
### Suffisso nel nome di un controller
17601760
1761-
- Append the controller name with the suffix `Controller` or with no suffix. Choose 1, not both.
1761+
- Aggiungi `Controller` alla fine del nome del controller o no. Segline 1 non entrambi.
17621762
1763-
*Perché?*: The `Controller` suffix is more commonly used and is more explicitly descriptive.
1763+
*Perché?*: Il suffisso `Controller` è quello più comunemente usato ed è più esplicitamente descrittivo.
17641764
1765-
*Perché?*: Omitting the suffix is more succinct and the controller is often easily identifiable even without the suffix.
1765+
*Perché?*: L'omissione del sufficco è più coinciso ed il controller è spesso facilmente indentificabile anche senza suffisso.
17661766
17671767
```javascript
17681768
/**
1769-
* recommended: Option 1
1769+
* raccomandato: Opzione 1
17701770
*/
17711771

17721772
// avengers.controller.js
@@ -1779,7 +1779,7 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
17791779
17801780
```javascript
17811781
/**
1782-
* recommended: Option 2
1782+
* raccomandato: Opzione 2
17831783
*/
17841784

17851785
// avengers.controller.js
@@ -1790,15 +1790,15 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
17901790
function AvengersController(){ }
17911791
```
17921792
1793-
### Factory Names
1793+
### Nomi delle factory
17941794
1795-
- Use consistent names for all factories named after their feature. Use camel-casing for services and factories.
1795+
- Usa una nomenclatura consistente per tutte le factory dando i nomi date le loro funzionalità. Usa il camel-case per service e factory.
17961796
1797-
*Perché?*: Provides a consistent way to quickly identify and reference factories.
1797+
*Perché?*: Fornisce un modo consistente per identificare facilmente e referenziare le factory.
17981798
17991799
```javascript
18001800
/**
1801-
* recommended
1801+
* raccomandato
18021802
*/
18031803

18041804
// logger.service.js
@@ -1809,15 +1809,15 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
18091809
function logger(){ }
18101810
```
18111811
1812-
### Directive Component Names
1812+
### Nomi dei componenti directive
18131813
1814-
- Use consistent names for all directives using camel-case. Use a short prefix to describe the area that the directives belong (some example are company prefix or project prefix).
1814+
- Usa nomi consistenti per putte le directive usando il camel-case. Usa un breve previsso che descriva l'area alla quale la directive appartiene (alcuni esempi sono presiffi relativi all'azienda o al progetto).
18151815
1816-
*Perché?*: Provides a consistent way to quickly identify and reference components.
1816+
*Perché?*: Fornisce un modo consistente per identificare e referenziare facilmente i componenti.
18171817
18181818
```javascript
18191819
/**
1820-
* recommended
1820+
* raccomandato
18211821
*/
18221822

18231823
// avenger.profile.directive.js
@@ -1830,49 +1830,49 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
18301830
function xxAvengerProfile(){ }
18311831
```
18321832
1833-
### Modules
1833+
### Moduli
18341834
1835-
- When there are multiple modules, the main module file is named `app.module.js` while other dependent modules are named after what they represent. For example, an admin module is named `admin.module.js`. The respective registered module names would be `app` and `admin`. A single module app might be named `app.js`, omitting the module moniker.
1835+
- Quando di sono moduli multipli, il modulo principale è nominato come `app.module.js` mentre altri moduli dipendenti prendono i nomi da ciò che rappresentano. Per esempio, un modulo admin è nominato `admin.module.js`. I rispettivi nomi con i quali sono registrati saranno `app` e `admin`. Una app a modulo singolo si chiamerà `app.js`, omettendo l'appellativo module.
18361836
1837-
*Perché?*: An app with 1 module is named `app.js`. It is the app, so why not be super simple.
1837+
*Perché?*: Una app con 1 modulo si chiama `app.js`. È l'app, quindi perché non estremamente semplice.
18381838
1839-
*Perché?*: Provides consistency for multiple module apps, and for expanding to large applications.
1839+
*Perché?*: Fornisce consistenza per app che hanno più di un modulo e per poter espandare verso applicazioni a larga scala.
18401840
1841-
*Perché?*: Provides easy way to use task automation to load all module definitions first, then all other angular files (for bundling).
1841+
*Perché?*: Fornisci un modo semplice al fine di usare processi automatici per caricare prima tutte le definizioni di moduli, successivamente tutti gli altri file di Angular (per il bunndling).
18421842
1843-
### Configuration
1843+
### Configurazione
18441844
1845-
- Separate configuration for a module into its own file named after the module. A configuration file for the main `app` module is named `app.config.js` (or simply `config.js`). A configuration for a module named `admin.module.js` is named `admin.config.js`.
1845+
- Separa la configurazione di un modulo nel proprio file chiamato come il modulo. Un file di configurazione per il modulo principale `app` è chiamato `app.config.js` (o semplicemente `config.js`). Un file di configurazione per un modulo chiamato `admin.module.js` sarà `admin.config.js`.
18461846
1847-
*Perché?*: Separates configuration from module definition, components, and active code.
1847+
*Perché?*: Separa la configurazione dalla definizione, componenti e codice di attivazione del modulo.
18481848
1849-
*Perché?*: Provides a identifiable place to set configuration for a module.
1849+
*Perché?*: Fornisci una posiszione identificabile per settare la configurazione di un modulo.
18501850
1851-
### Routes
1851+
### Route
18521852
1853-
- Separate route configuration into its own file. Examples might be `app.route.js` for the main module and `admin.route.js` for the `admin` module. Even in smaller apps I prefer this separation from the rest of the configuration. An alternative is a longer name such as `admin.config.route.js`.
1853+
- Separa la configurazione delle route nei propri file. Esempi possono essere `app.route.js` per il modulo principale e `admin.route.js` per il modulo `admin`. Anche in piccole app preferisco questa separazione dal resto della configurazione. Una alternativa è un nome più esteso quale `admin.config.route.js`.
18541854
18551855
**[Torna all'inizio](#table-of-contents)**
18561856
18571857
## Principio "LIFT" per la struttura dell'applicazione
18581858
### LIFT
18591859
1860-
- Structure your app such that you can `L`ocate your code quickly, `I`dentify the code at a glance, keep the `F`lattest structure you can, and `T`ry to stay DRY. The structure should follow these 4 basic guidelines.
1860+
- Struttura la tua app tale da poter `L`ocate (localizzare) il codice facilmente, `I`dentify (identificare) il codice con uno sguardo, tenere la stuttura più `F`lattest (piatta) che puoi, e `T`ry (provare) a rimanere DRY (Don't Repeat Yourself - Non ripetersi). La struttura dovrebbe seguire queste 4 linee guida basilari.
18611861
1862-
*Why LIFT?*: Provides a consistent structure that scales well, is modular, and makes it easier to increase developer efficiency by finding code quickly. Another way to check your app structure is to ask yourself: How quickly can you open and work in all of the related files for a feature?
1862+
*Perché LIFT?*: Fornisce una struttura consistente che scala bene, è modulare e rende più semplice aumentare l'efficienza nel trovare facilmente il codice. Un altro modo per verificare la struttura della tua app è chiedeti: Quanto rapidamente puoi aprire e lavorare ad una funzionalità in tutti i file che sono collegati?
18631863
1864-
When I find my structure is not feeling comfortable, I go back and revisit these LIFT guidelines
1864+
Quando ritengo che la mia struttura non sia confortevole, torno indietro a rivedere le linee guida LIFT
18651865
1866-
1. `L`ocating our code is easy
1867-
2. `I`dentify code at a glance
1868-
3. `F`lat structure as long as we can
1869-
4. `T`ry to stay DRY (Don’t Repeat Yourself) or T-DRY
1866+
1. `L`ocalizzare il nostro codice con facilità
1867+
2. `I`dentificare il codice a vista
1868+
3. `F`lat (pitta) struttura quanto più possibile
1869+
4. `T`ry (prova) a rimanere DRY (Don’t Repeat Yourself) o T-DRY
18701870
1871-
### Locate
1871+
### Locate - localizzare
18721872
1873-
- Make locating your code intuitive, simple and fast.
1873+
- Rendi intuitivo, semplice e facile localizzare il codice.
18741874
1875-
*Perché?*: I find this to be super important for a project. If the team cannot find the files they need to work on quickly, they will not be able to work as efficiently as possible, and the structure needs to change. You may not know the file name or where its related files are, so putting them in the most intuitive locations and near each other saves a ton of time. A descriptive folder structure can help with this.
1875+
*Perché?*: Ritengo ciò essere estremamente importante per il progetto. Se il team non è in grado di trovare i file di cui necessita rapidamente, non sarà in grado di lavorare il più efficacemente possibile, per cui la struttura necessita un cambiamento. Potresti non sapere il nome del file o dove sono i file a questo correlati quindi posizionarli in nel posto più intuitivo e prossimi gli uni agli altri fa risparmiare un mucchio di tempo. Una descrittiva struttura delle cartelle può essere d'aiuto.
18761876
18771877
```
18781878
/bower_components
@@ -1892,23 +1892,24 @@ Nonostante questa guida speghi i *cosa*, *come* e *perché*, trovo che sia di ai
18921892
.bower.json
18931893
```
18941894
1895-
### Identify
1895+
### Identify - identificare
1896+
1897+
- Guardando un file dovresti istantaneamente sapere ciò che contiene e cosa rappresenta.
18961898
1897-
- When you look at a file you should instantly know what it contains and represents.
1899+
*Perché?*: Spendi meno tempo a rintracciare e beccare il codice e diventa più efficente. Se per fare ciò hai bisogno di nomi dei file più lunghi, fallo. Si descrittivo con i nomi dei file e tieni il contenuto del file con esattamente 1 componente. Evita file con più di un controller, diversi service o un misto. Ci sono delle eccezioni alla regola "1 per file" ovvero quando ho una serie di piccole funzionalità correlate l'un l'altra: continuano ad essere facilmente identificabili.
18981900
1899-
*Perché?*: You spend less time hunting and pecking for code, and become more efficient. If this means you want longer file names, then so be it. Be descriptive with file names and keeping the contents of the file to exactly 1 component. Avoid files with multiple controllers, multiple services, or a mixture. There are deviations of the 1 per file rule when I have a set of very small features that are all related to each other, they are still easily identifiable.
1901+
### Flat - piatto
19001902
1901-
### Flat
19021903
1903-
- Keep a flat folder structure as long as possible. When you get to 7+ files, begin considering separation.
1904+
- Tieni la struttura delle cartelle piatta il più a lungo possibile. Quando arrivi ad avere 7 o più file, inizia a considerarne una separazione.
19041905
1905-
*Perché?*: Nobody wants to search 7 levels of folders to find a file. Think about menus on web sites … anything deeper than 2 should take serious consideration. In a folder structure there is no hard and fast number rule, but when a folder has 7-10 files, that may be time to create subfolders. Base it on your comfort level. Use a flatter structure until there is an obvious value (to help the rest of LIFT) in creating a new folder.
1906+
*Perché?*: Nessuno vuole cercare 7 livelli di cartelle per trovare un file. Pensa ai menù di un sito web.. qualunche cosa oltre i 2 livelli dovrebbe esser presa in considerazione. Nella struttura di cartella non c'è una regola con un numero esattamente definito ma quando una cartella contiene 7-10 file, è il momento di creare una sottocartella. Basalo su un livello a te comodo. Usa una struttura più piatta fino a che c'è l'ovvia necessità (praticando il resto dei principi LIFT) di creare una nuova cartella.
19061907
1907-
### T-DRY (Try to Stick to DRY)
1908+
### T-DRY (Try to Stick to DRY) - Prova a non ripeterti
19081909
1909-
- Be DRY, but don't go nuts and sacrifice readability.
1910+
- Si DRY, ma non diventare pazzo e sacrificare la leggibilità.
19101911
1911-
*Perché?*: Being DRY is important, but not crucial if it sacrifices the others in LIFT, which is why I call it T-DRY. I don’t want to type session-view.html for a view because, well, it’s obviously a view. If it is not obvious or by convention, then I name it.
1912+
*Perché?*: Non ripetersi è importante ma non crocuale se sacrifica altri principi LIFT, per questo il principio è Try (provare) DRY. Non voglio digitare session-view.html perché è ovvio essere una view. Se non è ovvio o se per convenzione allora nominala così.
19121913
19131914
**[Torna all'inizio](#table-of-contents)**
19141915

0 commit comments

Comments
 (0)