private Optional<String> resolvePluralMessage( final Options options, final I18nIdentifier i18nIdentifier, final List<Locale> locales) { if (containsPlural(options)) { final String pluralizedKey = i18nIdentifier.key + "_plural"; return i18n.get(locales, i18nIdentifier.bundle, pluralizedKey); } else { return Optional.empty(); } }
private String resolveMessage( final Options options, final I18nIdentifier i18nIdentifier, final List<Locale> locales) { return resolvePluralMessage(options, i18nIdentifier, locales) .orElseGet(() -> i18n.get(locales, i18nIdentifier.bundle, i18nIdentifier.key).orElse(null)); }