Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-597 - add italian translation #598

Merged
merged 2 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
43 changes: 43 additions & 0 deletions src/main/resources/jsv-messages_it.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
$ref = {0}: c''� un problema con il tag ''refs''
additionalProperties = {0}.{1}: non � definito nello schema e lo schema non permette properties aggiuntive
allOf = {0}: dovrebbe essere valido per tutti gli schemas {1}
anyOf = {0}: dovrebbe essere valido per uno degli schemas {1}
const = {0}: dovrebbe essere un valore costante {1}
contains = {0}: non contiene un elemento che supera queste validazioni: {1}
crossEdits = {0}: ha un errore con il ''cross edits''
dateTime = {0}: {1} � un invalido {2}
dependencies = {0}: ha un errore con le dipendenze {1}
dependentRequired = {0}: ha una property mancante da cui dipende {1}
dependentSchemas = {0}: ha un errore con dependentSchemas {1}
edits = {0}: ha un errore con ''edits''
enum = {0}: non ha un valore nell''enumerazione {1}
exclusiveMaximum = {0}: deve avere un valore massimo esclusivo di {1}
exclusiveMinimum = {0}: deve avere un valore minimo esclusivo di {1}
false = Boolean schema false non � valido
format = {0}: non corrisponde il {1} pattern {2}
id = {0}: {1} � un segmento invalido per l''URI {2}
items = {0}[{1}]: nessun validatore trovato all''indice
maxItems = {0}: deve esserci un numero massimo di {1} elementi nell''array
maxLength = {0}: pu� avere lunghezza massima di {1}
maxProperties = {0}: pu� avere un numero massimo di properties di {1}
maximum = {0}: deve avere un valore massimo di {1}
minItems = {0}: deve esserci un numero minimo di {1} elementi nell''array
minLength = {0}: deve avere lunghezza minima di {1}
minProperties={0}: dovrebbe avere un numero minimo di properties di {1}
minimum={0}: deve avere un valore minimo di {1}
multipleOf={0}: deve essere un multiplo di {1}
not={0}: non dovrebbe essere valido per lo schema {1}
notAllowed={0}.{1}: non � consentito ma � nel dato
oneOf={0}: dovrebbe essere valido a uno e solo uno schema, ma pi� di uno sono validi: {1}
pattern={0}: non corrisponde alla regex {1}
patternProperties={0}: ha qualche errore con ''pattern properties''
prefixItems={0}[{1}]: nessun validatore trovato a quest''indice
properties={0}: ha un errore con ''properties''
propertyNames=Il nome della Property {0} non � valido per la validazione: {1}
readOnly={0}: il campo � in sola lettura, non pu� essere modificato
required={0}.{1}: � obbligatorio ma � mancante
type={0}: {1} trovato, {2} atteso
unevaluatedProperties=Ci sono properties non valutate nei seguenti percorsi {0}
unionType={0}: {1} trovato, ma {2} � obbligatorio
uniqueItems={0}: l''elemento nell''array deve essere unico
uuid={0}: {1} � un invalido {2}
10 changes: 9 additions & 1 deletion src/test/java/com/networknt/schema/Issue471Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import org.junit.jupiter.api.Test;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
Expand Down Expand Up @@ -55,6 +54,15 @@ void shouldFailV201909_with_frFR() throws Exception {
Assertions.assertEquals("$.pictures: doit avoir un maximum de 2 éléments dans le tableau", errorsMap.get("$.pictures"));
}

@Test
@Disabled
void shouldFailV201909_with_frIT() throws Exception {
Locale.setDefault(Locale.ITALIAN);
Map<String, String> errorsMap = validate();
Assertions.assertEquals("$.title: può avere lunghezza massima di 10", errorsMap.get("$.title"));
Assertions.assertEquals("$.pictures: deve esserci un numero massimo di 2 elementi nell'array", errorsMap.get("$.pictures"));
}

private Map<String, String> validate() throws Exception {
InputStream schemaInputStream = Issue471Test.class.getResourceAsStream(SCHEMA_PATH);
JsonSchema schema = getJsonSchemaFromStreamContentV201909(schemaInputStream);
Expand Down