@Override
  @Deprecated
  @SuppressWarnings("DuplicatedCode") // We need a default impl here - will be removed in 5.x
  default void registerAll(final @NotNull Locale locale, final @NotNull Set<String> keys, final Function<String, MessageFormat> function) {
    IllegalArgumentException firstError = null;
    int errorCount = 0;
    for (final String key : keys) {
      try {
        this.register(key, locale, function.apply(key));
      } catch (final IllegalArgumentException e) {
        if (firstError == null) {
          firstError = e;
        }
        errorCount++;
      }
    }
    if (firstError != null) {
      if (errorCount == 1) {
        throw firstError;
      } else if (errorCount > 1) {
        throw new IllegalArgumentException(String.format("Invalid key (and %d more)", errorCount - 1), firstError);
      }
    }
  }
Registers a resource bundle of translations.

@param locale a locale
@param keys the translation keys to register
@param function a function to transform a key into a message format
@throws IllegalArgumentException if a translation key already exists
@since 4.0.0
@deprecated For removal since 4.20.0. Use {@link TranslationStore#messageFormat(Key)} instead.
api/src/main/java/net/kyori/adventure/translation/TranslationRegistry.java