   (let [lower-product-name (str/lower-case product-name)]
     (when-not (#{"puppetdb" "pe-puppetdb"} lower-product-name)
       (throw (IllegalArgumentException.
-              (format "product-name %s is illegal; either puppetdb or pe-puppetdb are allowed" product-name))))
+              (trs "product-name {0} is illegal; either puppetdb or pe-puppetdb are allowed" product-name))))
     lower-product-name))
 
 (defn configure-globals

  [config]
  (doseq [cmd-proc-key retired-cmd-proc-keys]
    (when (get-in config [:command-processing cmd-proc-key])
      (utils/println-err (format
                          (str "The configuration item `%s`"
                               " in the [command-processing] section is retired,"
                               " please remove this item from your config."
                               " Consult the documentation for more details.")
                          (name cmd-proc-key))))))

(defn configure-command-processing
  [config]

    (cond
     (nil? vardir)
     (throw (IllegalArgumentException.
             (format "%s %s"
                     (trs "Required setting ''vardir'' is not specified.")
                     (trs "Please set it to a writable directory."))))

     (not (.isAbsolute vardir))
     (throw (IllegalArgumentException.
             (trs "Vardir {0} must be an absolute path." vardir)))

     (not (.exists vardir))
     (throw (java.io.FileNotFoundException.
             (format "%s %s"
                     (trs "Vardir {0} does not exist." vardir)
                     (trs "Please create it and ensure it is writable."))))

     (not (.isDirectory vardir))
     (throw (java.io.FileNotFoundException.
             (trs "Vardir {0} is not a directory." vardir)))

     (not (.canWrite vardir))
     (throw (java.io.FileNotFoundException.
             (trs "Vardir {0} is not writable." vardir)))

     :else
     config)))
