private static @Nls @Nullable String getString(ResourceBundle bundle, @NonNls String resource) {
    if (bundle == null) {
      return null;
    }

    if (bundle instanceof IntelliJResourceBundle b) {
      return b.getMessageOrNull(resource);
    }

    try {
      return bundle.getString(resource);
    }
    catch (MissingResourceException ignored) {
      return null;
    }
  }
private static @Nls @Nullable String getString(ResourceBundle bundle, @NonNls String resource)