diff --git a/text-io/src/main/java/org/beryx/textio/BooleanInputReader.java b/text-io/src/main/java/org/beryx/textio/BooleanInputReader.java index 52010ce7..4f1a2c8d 100644 --- a/text-io/src/main/java/org/beryx/textio/BooleanInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/BooleanInputReader.java @@ -34,14 +34,14 @@ public BooleanInputReader(Supplier> textTerminalSupplier) { /** Configures the string value that corresponds to true. */ public BooleanInputReader withTrueInput(String trueInput) { - if(trueInput == null || trueInput.trim().isEmpty()) throw new IllegalArgumentException("trueInput is empty"); + if(trueInput == null || trueInput.trim().isEmpty()) throw new IllegalArgumentException(getMessage ("trueInput_is_empty")); this.trueInput = trueInput; return this; } /** Configures the string value that corresponds to false. */ public BooleanInputReader withFalseInput(String falseInput) { - if(falseInput == null || falseInput.trim().isEmpty()) throw new IllegalArgumentException("falseInput is empty"); + if(falseInput == null || falseInput.trim().isEmpty()) throw new IllegalArgumentException(getMessage ("falseInput_is_empty")); this.falseInput = falseInput; return this; } @@ -49,7 +49,7 @@ public BooleanInputReader withFalseInput(String falseInput) { @Override protected List getDefaultErrorMessages(String s) { List errList = super.getDefaultErrorMessages(s); - errList.add("Expected: " + trueInput + " / " + falseInput); + errList.add(getMessage ("expected_boolean", trueInput, falseInput)); return errList; } diff --git a/text-io/src/main/java/org/beryx/textio/ByteInputReader.java b/text-io/src/main/java/org/beryx/textio/ByteInputReader.java index 80a103c7..90c28485 100644 --- a/text-io/src/main/java/org/beryx/textio/ByteInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/ByteInputReader.java @@ -27,7 +27,7 @@ public ByteInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "a byte"; + return getMessage ("a_byte"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/CharInputReader.java b/text-io/src/main/java/org/beryx/textio/CharInputReader.java index 4a20206e..b2422597 100644 --- a/text-io/src/main/java/org/beryx/textio/CharInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/CharInputReader.java @@ -27,7 +27,7 @@ public CharInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "a single character"; + return getMessage ("a_single_character"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/ComparableInputReader.java b/text-io/src/main/java/org/beryx/textio/ComparableInputReader.java index 57ac83ce..6e3364fb 100644 --- a/text-io/src/main/java/org/beryx/textio/ComparableInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/ComparableInputReader.java @@ -56,10 +56,11 @@ protected List getMinMaxErrorMessage(T val) { } private String getStandardMinMaxErrorMessage() { - if(minVal != null && maxVal != null) return "Expected " + typeNameWithIndefiniteArticle() + " value between " + minVal + " and " + maxVal + "."; - if(minVal != null) return "Expected " + typeNameWithIndefiniteArticle() + " value greater than or equal to " + minVal + "."; - if(maxVal != null) return "Expected " + typeNameWithIndefiniteArticle() + " value less than or equal to " + maxVal + "."; - return "Expected " + typeNameWithIndefiniteArticle() + " value."; + + if(minVal != null && maxVal != null) return getMessage ("expected_value_between_minVal_and_maxVal", typeNameWithIndefiniteArticle(), minVal, maxVal); + if(minVal != null) return getMessage ("expected_value_greater_than_or_equal_to_minVal", typeNameWithIndefiniteArticle(), minVal); + if(maxVal != null) return getMessage ("expected_value_less_than_or_equal_to_maxVal", typeNameWithIndefiniteArticle(), maxVal); + return getMessage ("expected_value", typeNameWithIndefiniteArticle()); } /** In addition to the checks performed by {@link InputReader#checkConfiguration()}, it checks if minVal <= maxVal */ diff --git a/text-io/src/main/java/org/beryx/textio/DoubleInputReader.java b/text-io/src/main/java/org/beryx/textio/DoubleInputReader.java index 5a826348..5d70bcb6 100644 --- a/text-io/src/main/java/org/beryx/textio/DoubleInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/DoubleInputReader.java @@ -27,7 +27,7 @@ public DoubleInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "a double"; + return getMessage ("a_double"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/FloatInputReader.java b/text-io/src/main/java/org/beryx/textio/FloatInputReader.java index 28caa667..7067c01f 100644 --- a/text-io/src/main/java/org/beryx/textio/FloatInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/FloatInputReader.java @@ -27,7 +27,7 @@ public FloatInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "a float"; + return getMessage ("a_float"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/InputReader.java b/text-io/src/main/java/org/beryx/textio/InputReader.java index 461fdeaa..723c3ebc 100644 --- a/text-io/src/main/java/org/beryx/textio/InputReader.java +++ b/text-io/src/main/java/org/beryx/textio/InputReader.java @@ -15,13 +15,22 @@ */ package org.beryx.textio; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; import java.util.function.BiFunction; import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.IntStream; +import org.beryx.textio.i18n.TextIoI18nLanguageCode; +import org.beryx.textio.i18n.TextIoI18nService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -36,6 +45,8 @@ public abstract class InputReader> { public static final String PROPS_PREFIX_ERROR_MESSAGE = "error"; + private TextIoI18nLanguageCode i18nLanguageCode = null; + /** Functional interface for providing error messages */ @FunctionalInterface public interface ErrorMessagesProvider { @@ -169,6 +180,16 @@ public InputReader(Supplier> textTerminalSupplier) { this.textTerminalSupplier = textTerminalSupplier; } + @SuppressWarnings ("unchecked") + public B withLanguageCode (TextIoI18nLanguageCode i18nLanguageCode) { + this.i18nLanguageCode = i18nLanguageCode; + return (B) this; + } + + public TextIoI18nLanguageCode getLanguageCode () { + return i18nLanguageCode; + } + @SuppressWarnings("unchecked") public B withDefaultValue(T defaultValue) { this.defaultValue = defaultValue; @@ -331,13 +352,13 @@ public boolean isValueListMode() { /** Returns a generic error message. */ protected String getDefaultErrorMessage(String sVal) { - StringBuilder errBuilder = new StringBuilder("Invalid value"); + StringBuilder errBuilder = new StringBuilder (getMessage ("invalid_value")); if(valueListMode) { - errBuilder.append(" in the comma-separated list"); - if(itemName != null) errBuilder.append(" of '").append(itemName).append("'"); + errBuilder.append (" ").append (getMessage ("in_the_comma-separated_list")); + if (itemName != null) errBuilder.append (" ").append (getMessage ("of")).append (" '").append (itemName).append ("'"); if(sVal != null && !sVal.isEmpty()) errBuilder.append(": ").append(sVal); } else { - if(itemName != null) errBuilder.append(" for '").append(itemName).append("'"); + if (itemName != null) errBuilder.append (" ").append (getMessage ("or")).append (" '").append (itemName).append ("'"); } errBuilder.append('.'); return errBuilder.toString(); @@ -501,9 +522,9 @@ private T getValueFromString(String sVal, TextTerminal textTerminal) { String options = possibleValues.stream() .map(val -> "'" + valueFormatter.apply(val) + "'") .collect(Collectors.joining(", ")); - t.println(" Please enter one of: " + options + "."); + t.println (" " + getMessage ("please_enter_one_of", options)); } else { - t.println(" Please enter one of the displayed values."); + t.println (" " + getMessage ("please_enter_one_of_the_displayed_values")); } }); textTerminal.println(); @@ -528,7 +549,7 @@ private T getValueFromIndex(String sVal, TextTerminal textTerminal) { textTerminal.println(invalidIndexErrorMessagesProvider.getErrorMessages(sVal, itemName, 1, possibleValues.size())); } else { textTerminal.print(getDefaultErrorMessage(sVal)); - textTerminal.println(" Enter a value between 1 and " + possibleValues.size() + "."); + textTerminal.println (" " + getMessage ("enter_a_value_between_1_and", possibleValues.size ())); } }); textTerminal.println(); @@ -614,12 +635,12 @@ protected void printPrompt(List prompt, TextTerminal textTerminal) { String[] textLines = optionText.split("\\R", -1); if(textLines.length > 1) { String delimiter = String.format("\n%" + (digits + 4) + "s", ""); - optionText = Arrays.stream(textLines).collect(Collectors.joining(delimiter)); + optionText = String.join (delimiter, textLines); } } textTerminal.println((isDefault ? "* ": " ") + optionId + optionText); } - textTerminal.print(valueListMode ? "Enter your choices as comma-separated values: " : "Enter your choice: "); + textTerminal.print (valueListMode ? getMessage ("enter_your_choices_as_comma_separated_values") + " " : getMessage ("enter_your_choice") + " "); } } } @@ -630,19 +651,23 @@ private static boolean shouldappendColon(String s) { return "()[]{}".indexOf(lastChar) > 0 || Character.isJavaIdentifierPart(lastChar); } - public static ValueChecker> nonEmptyListChecker() { + public ValueChecker> nonEmptyListChecker () { return (list, propName) -> { - if(list == null || list.isEmpty()) return Collections.singletonList("Expected at least one element."); + if (list == null || list.isEmpty ()) return Collections.singletonList (getMessage ("expected_at_least_one_element")); else return null; }; } - public static ValueChecker> noDuplicatesChecker() { + public ValueChecker> noDuplicatesChecker () { return (list, propName) -> { if(list == null || list.size() < 2) return null; Set valueSet = new HashSet<>(list); - if(valueSet.size() < list.size()) return Collections.singletonList("Duplicate values are not allowed."); + if (valueSet.size () < list.size ()) return Collections.singletonList ("duplicate_values_are_not_allowed"); return null; }; } + + protected String getMessage (String messageKey, Object... args) { + return TextIoI18nService.getInstance ().getMessage (messageKey, getLanguageCode (), args); + } } diff --git a/text-io/src/main/java/org/beryx/textio/IntInputReader.java b/text-io/src/main/java/org/beryx/textio/IntInputReader.java index 184a7919..d30725bc 100644 --- a/text-io/src/main/java/org/beryx/textio/IntInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/IntInputReader.java @@ -27,7 +27,7 @@ public IntInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "an integer"; + return getMessage ("an_integer"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/LongInputReader.java b/text-io/src/main/java/org/beryx/textio/LongInputReader.java index 1654640d..2cf58fd5 100644 --- a/text-io/src/main/java/org/beryx/textio/LongInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/LongInputReader.java @@ -27,7 +27,7 @@ public LongInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "a long"; + return getMessage ("a_long"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/ShortInputReader.java b/text-io/src/main/java/org/beryx/textio/ShortInputReader.java index 268c3f4d..659c5b71 100644 --- a/text-io/src/main/java/org/beryx/textio/ShortInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/ShortInputReader.java @@ -27,7 +27,7 @@ public ShortInputReader(Supplier> textTerminalSupplier) { @Override protected String typeNameWithIndefiniteArticle() { - return "a short"; + return getMessage ("a_short"); } @Override diff --git a/text-io/src/main/java/org/beryx/textio/StringInputReader.java b/text-io/src/main/java/org/beryx/textio/StringInputReader.java index 35be149e..42c938af 100644 --- a/text-io/src/main/java/org/beryx/textio/StringInputReader.java +++ b/text-io/src/main/java/org/beryx/textio/StringInputReader.java @@ -57,7 +57,7 @@ public StringInputReader withMaxLength(int maxLength) { } public StringInputReader withIgnoreCase() { - return withEqualsFunc((s1, s2) -> s1.equalsIgnoreCase(s2)); + return withEqualsFunc (String::equalsIgnoreCase); } @Override @@ -74,14 +74,14 @@ protected void checkConfiguration() throws IllegalArgumentException { protected List getLengthValidationErrors(String s) { int len = (s == null) ? 0 : s.length(); - IntFunction chr = l -> l + " character" + ((l > 1) ? "s." : "."); - if(minLength > 0 && minLength > len) return Collections.singletonList("Expected a string with at least " + chr.apply(minLength)); - if(maxLength > 0 && maxLength < len) return Collections.singletonList("Expected a string with at most " + chr.apply(maxLength)); + IntFunction chr = l -> l + " " + getMessage ("character") + ((l > 1) ? "s." : "."); + if (minLength > 0 && minLength > len) return Collections.singletonList (getMessage ("expected_a_string_with_at_least", chr.apply (minLength))); + if (maxLength > 0 && maxLength < len) return Collections.singletonList (getMessage ("expected_a_string_with_at_most", chr.apply (maxLength))); return null; } protected List getPatternValidationErrors(String s) { - if((pattern != null) && !pattern.matcher(s).matches()) return Collections.singletonList("Expected format: " + pattern.pattern()); + if ((pattern != null) && !pattern.matcher (s).matches ()) return Collections.singletonList (getMessage ("expected_format", pattern.pattern ())); return null; } } diff --git a/text-io/src/main/java/org/beryx/textio/i18n/EnLanguageService.java b/text-io/src/main/java/org/beryx/textio/i18n/EnLanguageService.java new file mode 100644 index 00000000..7dfc8366 --- /dev/null +++ b/text-io/src/main/java/org/beryx/textio/i18n/EnLanguageService.java @@ -0,0 +1,39 @@ +package org.beryx.textio.i18n; + +import java.util.Objects; + +/* + * Copyright 2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class EnLanguageService implements ILanguageService { + + private EnLanguageService () { + super (); + } + + private static class Holder { + private static final EnLanguageService INSTANCE = new EnLanguageService (); + } + + private static class Messages { + private static final MessagesLoader INSTANCE = new MessagesLoader ("/org/beryx/textio/i18n/en.properties"); + } + + public static EnLanguageService getInstance () { return Holder.INSTANCE; } + + @Override public String getMessage (String messageKey, Object... args) { + return String.format (Objects.requireNonNull (Messages.INSTANCE.getProperties ().getProperty (messageKey)), args); + } +} diff --git a/text-io/src/main/java/org/beryx/textio/i18n/ILanguageService.java b/text-io/src/main/java/org/beryx/textio/i18n/ILanguageService.java new file mode 100644 index 00000000..a49af366 --- /dev/null +++ b/text-io/src/main/java/org/beryx/textio/i18n/ILanguageService.java @@ -0,0 +1,21 @@ +package org.beryx.textio.i18n; + +/* + * Copyright 2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +public interface ILanguageService { + + String getMessage (String messageKey, Object... args); +} diff --git a/text-io/src/main/java/org/beryx/textio/i18n/ItLanguageService.java b/text-io/src/main/java/org/beryx/textio/i18n/ItLanguageService.java new file mode 100644 index 00000000..4f5c0969 --- /dev/null +++ b/text-io/src/main/java/org/beryx/textio/i18n/ItLanguageService.java @@ -0,0 +1,39 @@ +package org.beryx.textio.i18n; + +import java.util.Objects; + +/* + * Copyright 2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class ItLanguageService implements ILanguageService { + + private ItLanguageService () { + super (); + } + + private static class Holder { + private static final ItLanguageService INSTANCE = new ItLanguageService (); + } + + private static class Messages { + private static final MessagesLoader INSTANCE = new MessagesLoader ("/org/beryx/textio/i18n/it.properties"); + } + + public static ItLanguageService getInstance () { return Holder.INSTANCE; } + + @Override public String getMessage (String messageKey, Object... args) { + return String.format (Objects.requireNonNull (Messages.INSTANCE.getProperties ().getProperty (messageKey)), args); + } +} diff --git a/text-io/src/main/java/org/beryx/textio/i18n/MessagesLoader.java b/text-io/src/main/java/org/beryx/textio/i18n/MessagesLoader.java new file mode 100644 index 00000000..c72f0c40 --- /dev/null +++ b/text-io/src/main/java/org/beryx/textio/i18n/MessagesLoader.java @@ -0,0 +1,36 @@ +package org.beryx.textio.i18n; + +import java.io.InputStream; +import java.util.Properties; + +/* + * Copyright 2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class MessagesLoader { + + protected final Properties properties = new Properties (); + + public MessagesLoader (String fileName) { + try (InputStream s = EnLanguageService.class.getResourceAsStream (fileName)) { + properties.load (s); + } catch (Exception e) { + throw new RuntimeException (e); + } + } + + public Properties getProperties () { + return properties; + } +} diff --git a/text-io/src/main/java/org/beryx/textio/i18n/TextIoI18nLanguageCode.java b/text-io/src/main/java/org/beryx/textio/i18n/TextIoI18nLanguageCode.java new file mode 100644 index 00000000..b0cf9fe5 --- /dev/null +++ b/text-io/src/main/java/org/beryx/textio/i18n/TextIoI18nLanguageCode.java @@ -0,0 +1,30 @@ +package org.beryx.textio.i18n; + +/* + * Copyright 2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +public enum TextIoI18nLanguageCode { + + EN (EnLanguageService.getInstance ()), IT (ItLanguageService.getInstance ()); + + private final ILanguageService languageService; + + TextIoI18nLanguageCode (ILanguageService languageService) { + this.languageService = languageService; + } + + ILanguageService getLanguageService () { return languageService; } + +} diff --git a/text-io/src/main/java/org/beryx/textio/i18n/TextIoI18nService.java b/text-io/src/main/java/org/beryx/textio/i18n/TextIoI18nService.java new file mode 100644 index 00000000..0a6f9479 --- /dev/null +++ b/text-io/src/main/java/org/beryx/textio/i18n/TextIoI18nService.java @@ -0,0 +1,46 @@ +package org.beryx.textio.i18n; + +import java.util.Objects; + +/* + * Copyright 2017 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +public class TextIoI18nService { + + private TextIoI18nLanguageCode defaultLanguage = TextIoI18nLanguageCode.EN; + + private TextIoI18nService () { } + + private static final class Holder { + private static final TextIoI18nService INSTANCE = new TextIoI18nService (); + } + + public void setDefaultLanguage (TextIoI18nLanguageCode defaultLanguage) { + Objects.requireNonNull (defaultLanguage); + this.defaultLanguage = defaultLanguage; + } + + public static TextIoI18nService getInstance () { return Holder.INSTANCE; } + + public TextIoI18nLanguageCode getDefaultLanguage () { return defaultLanguage; } + + public String getMessage (String messageKey, TextIoI18nLanguageCode languageCode, Object... args) { + if (languageCode != null) { + return Objects.requireNonNull (languageCode.getLanguageService ().getMessage (messageKey, args), defaultLanguage.getLanguageService ().getMessage (messageKey, args)); + } else { + return defaultLanguage.getLanguageService ().getMessage (messageKey, args); + } + } +} diff --git a/text-io/src/main/resources/org/beryx/textio/i18n/en.properties b/text-io/src/main/resources/org/beryx/textio/i18n/en.properties new file mode 100644 index 00000000..36aaec33 --- /dev/null +++ b/text-io/src/main/resources/org/beryx/textio/i18n/en.properties @@ -0,0 +1,28 @@ +a_byte=a byte +a_double=a double +a_float=a float +a_long=a long +a_short=a short +a_single_character=a single character +an_integer=an integer +character=character +duplicate_values_are_not_allowed=Duplicate values are not allowed. +enter_a_value_between_1_and=Enter a value between 1 and %s. +enter_your_choice=Enter your choice: +enter_your_choices_as_comma_separated_values=Enter your choices as comma-separated values: +expected_a_string_with_at_least=Expected a string with at least %s +expected_a_string_with_at_most=Expected a string with at most %s +expected_at_least_one_element=Expected at least one element. +expected_boolean=Expected: %s" + trueInput + " / " + falseInput); +expected_format=Expected format: %s +expected_value=Expected %s value. +expected_value_between_minVal_and_maxVal=Expected %s value between %s and %s. +expected_value_greater_than_or_equal_to_minVal=Expected %s value greater than or equal to %s. +expected_value_less_than_or_equal_to_maxVal=Expected %s value less than or equal to %s. +falseInput_is_empty=falseInput is empty +in_the_comma-separated_list=in the comma-separated list +invalid_value=Invalid value +of=of +please_enter_one_of=Please enter one of: %s. +please_enter_one_of_the_displayed_values=Please enter one of the displayed values. +trueInput_is_empty=trueInput is empty diff --git a/text-io/src/main/resources/org/beryx/textio/i18n/it.properties b/text-io/src/main/resources/org/beryx/textio/i18n/it.properties new file mode 100644 index 00000000..1604cdd9 --- /dev/null +++ b/text-io/src/main/resources/org/beryx/textio/i18n/it.properties @@ -0,0 +1,28 @@ +a_byte=un byte +a_double=un double +a_float=un float +a_long=un long +a_short=un short +a_single_character=un singolo carattere +an_integer=un intero +character=carattere +duplicate_values_are_not_allowed=Duplicati non sono consentiti. +enter_a_value_between_1_and=Inserisci un valore compreso tra 1 e %s. +enter_your_choice=Inserisci la tua scelta: +enter_your_choices_as_comma_separated_values=Inserisci le tue scelte come valori separati da virgola: +expected_a_string_with_at_least=Previsto una stringa con almeno %s +expected_a_string_with_at_most=Previsto una stringa con al massimo %s +expected_at_least_one_element=Previsto almeno un elemento. +expected_boolean=Previsto: %s/%s. +expected_format=Formato previsto: %s +expected_value=Valore previsto: %s +expected_value_between_minVal_and_maxVal=Valore %s previsto tra %s e %s. +expected_value_greater_than_or_equal_to_minVal=Valore %s previsto maggiore o uguale a %s. +expected_value_less_than_or_equal_to_maxVal=Valore %s previsto minore o uguale a %s. +falseInput_is_empty=falseInput è vuoto +in_the_comma-separated_list=nella lista separata da virgole +invalid_value=Valore non valido +of=di +please_enter_one_of=Si prega di inserire uno dei seguenti: %s. +please_enter_one_of_the_displayed_values=Si prega di inserire uno dei valori visualizzati. +trueInput_is_empty=trueInput è vuoto