Skip to content

Commit 6b432ef

Browse files
committed
italian translation
1 parent 928a215 commit 6b432ef

File tree

5 files changed

+53
-2
lines changed

5 files changed

+53
-2
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ module API. Options include:
157157
container: '#some-query-selector'; // container to attach to
158158
APIUrl: 'https://www.example.com/.netlify/functions/identity'; // Absolute url to endpoint. ONLY USE IN SPECIAL CASES!
159159
namePlaceholder: 'some-placeholder-for-Name'; // custom placeholder for name input form
160-
locale: 'en'; // language code for translations - available: en, fr, es, pt, hu, pl, cs, sk - default to en
160+
locale: 'en'; // language code for translations - available: en, fr, es, pt, hu, pl, cs, sk, it - default to en
161161
```
162162
163163
Generally avoid setting the `APIUrl`. You should only set this when your app is

Diff for: src/index.ejs

+1
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@
317317
<option value="pt">Portugu&ecirc;s</option>
318318
<option value="cs">Česky</option>
319319
<option value="sk">Slovensky</option>
320+
<option value="it">Italiano</option>
320321
</select>
321322
</div>
322323
</div>

Diff for: src/translations/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import * as pt from "./pt.json";
66
import * as pl from "./pl.json";
77
import * as cs from "./cs.json";
88
import * as sk from "./sk.json";
9+
import * as it from "./it.json";
910

1011
export const defaultLocale = "en";
11-
const translations = { en, fr, es, hu, pt, pl, cs, sk };
12+
const translations = { en, fr, es, hu, pt, pl, cs, sk, it };
1213

1314
export const getTranslation = (key, locale = defaultLocale) => {
1415
const translated = translations[locale] && translations[locale][key];

Diff for: src/translations/index.test.js

+7
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ describe("translations", () => {
4848
expect(getTranslation("log_in", "sk")).toEqual("Prihlásiť sa");
4949
});
5050

51+
it("should return translation for 'it' locale", () => {
52+
const { getTranslation } = require("./");
53+
expect(getTranslation("log_in", "it")).toEqual("Login");
54+
});
55+
5156
it("should return key for non existing translation", () => {
5257
const { getTranslation } = require("./");
5358
expect(getTranslation("unknown_key")).toEqual("unknown_key");
@@ -62,6 +67,7 @@ describe("translations", () => {
6267
jest.mock("./cs.json", () => ({}));
6368
jest.mock("./sk.json", () => ({}));
6469
jest.mock("./pl.json", () => ({}));
70+
jest.mock("./it.json", () => ({}));
6571

6672
const { getTranslation } = require("./");
6773
expect(getTranslation("log_in")).toEqual("Log in");
@@ -72,5 +78,6 @@ describe("translations", () => {
7278
expect(getTranslation("log_in", "pl")).toEqual("Log in");
7379
expect(getTranslation("log_in", "cs")).toEqual("Log in");
7480
expect(getTranslation("log_in", "sk")).toEqual("Log in");
81+
expect(getTranslation("log_in", "it")).toEqual("Log in");
7582
});
7683
});

Diff for: src/translations/it.json

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"log_in": "Login",
3+
"log_out": "Logout",
4+
"logged_in_as": "Connesso come",
5+
"logged_in": "Connesso",
6+
"logging_in": "Connessione",
7+
"logging_out": "Disconnessione",
8+
"sign_up": "Registrati",
9+
"signing_up": "Registrazione",
10+
"forgot_password": "Password dimenticata?",
11+
"recover_password": "Recupera password",
12+
"send_recovery_email": "Invia email di recupero",
13+
"sending_recovery_email": "Invio email di recupero",
14+
"never_mind": "Annulla",
15+
"update_password": "Aggiorna password",
16+
"updating_password": "Aggiornamento password",
17+
"complete_your_signup": "Completa la registrazione",
18+
"site_url_title": "Impostazioni di sviluppo",
19+
"site_url_link_text": "Elimina l'URL localhost",
20+
"site_url_message": "Esecuzione su server locale rilevata. Inserisci l'URL del tuo sito Netlify.",
21+
"site_url_label": "Inserisci l'URL del tuo sito Netlify",
22+
"site_url_placeholder": "URL del tuo sito Netlify",
23+
"site_url_submit": "Imposta URL",
24+
"message_confirm": "Un messaggio di conferma è stato inviato alla tua email, clicca sul link al suo interno per continuare.",
25+
"message_password_mail": "Abbiamo inviato un email di recupero al tuo account, clicca sul link al suo interno per reimpostare la password.",
26+
"message_email_changed": "Indirizzo email aggiornato!",
27+
"message_verfication_error": "Errore durante la verifica del tuo account. Riprova più tardi o contatta un amministratore.",
28+
"message_signup_disabled": "La registrazione pubblica è disabilitata. Contatta un amministratore per chiedere un invito.",
29+
"form_name_placeholder": "Nome",
30+
"form_email_label": "Inserisci la tua email",
31+
"form_name_label": "Inserisci il tuo nome",
32+
"form_email_placeholder": "Email",
33+
"form_password_label": "Inserisci password",
34+
"form_password_placeholder": "Password",
35+
"coded_by": "Coded by Netlify",
36+
"continue_with": "Continua con",
37+
"No user found with this email": "Nessun utente trovato per questa email",
38+
"Invalid Password": "Password non valida",
39+
"Email not confirmed": "Email non confermata",
40+
"User not found": "Utente non trovato"
41+
}
42+

0 commit comments

Comments
 (0)