code: private I18nReader getI18nReader(File sourceFile) throws MojoFailureException {
      String extension = FileUtils.getExtension(sourceFile.getName());
      if (StringUtils.equalsIgnoreCase(extension, FILE_EXTENSION_PROPERTIES)) {
        return new PropertiesI18nReader();
      }
      if (StringUtils.equalsIgnoreCase(extension, FILE_EXTENSION_XML)) {
        return new XmlI18nReader();
      }
      if (StringUtils.equalsIgnoreCase(extension, FILE_EXTENSION_JSON)) {
        return new JsonI18nReader();
      }
      throw new MojoFailureException("Unsupported file extension '" + extension + "': " + sourceFile.getAbsolutePath());
    }
docs: Get i18n reader for source file.
  @param sourceFile Source file
  @return I18n reader
  @throws MojoFailureException