docs: public static String buildFilePath(
        String filePathFormat, @Nullable String locale, @Nullable String inputFilePath) {
  
      String path = filePathFormat;
  
      if (locale != null) {
        path = path.replace("{LOCALE}", locale);
        path = path.replace("{LOCALE_LOWER_CASE}", locale.toLowerCase().replace('-', '_'));
      }
  
      if (inputFilePath != null) {
  
        // Compute directory and file name.
        int lastSlashIndex = inputFilePath.lastIndexOf(File.separatorChar);
        String directory = inputFilePath.substring(0, lastSlashIndex + 1);
        String fileName = inputFilePath.substring(lastSlashIndex + 1);
  
        // Compute file name without extension.
        int lastDotIndex = fileName.lastIndexOf('.');
        if (lastDotIndex == -1) {
          lastDotIndex = fileName.length();
        }
        String fileNameNoExt = fileName.substring(0, lastDotIndex);
  
        // Substitute placeholders.
        path = path.replace("{INPUT_DIRECTORY}", directory);
        path = path.replace("{INPUT_FILE_NAME}", fileName);
        path = path.replace("{INPUT_FILE_NAME_NO_EXT}", fileNameNoExt);
      }
  
      // Remove redundant /'s if any placeholder representing a directory was empty.
      path = path.replace("//", "/");
  
      return path;
    }