private static int countFormatParameters(@NotNull MessageFormat mf) {
    Format[] formats = mf.getFormatsByArgumentIndex();
    int maxLength = formats.length;
    for (Format format : formats) {
      if (format instanceof ChoiceFormat) {
        for (Object o : ((ChoiceFormat) format).getFormats()) {
          maxLength = Math.max(maxLength, countFormatParameters(new MessageFormat((String) o)));
        }
      }
    }
    return maxLength;
  }
private static int countFormatParameters(@NotNull MessageFormat mf)