     (cond
      (nil? vardir)
      (throw (IllegalArgumentException.
-             "Required setting 'vardir' is not specified. Please set it to a writable directory."))
+             (format "%s %s"
+                     (trs "Required setting ''vardir'' is not specified.")
+                     (trs "Please set it to a writable directory."))))
 
      (not (.isAbsolute vardir))
      (throw (IllegalArgumentException.
-             (format "Vardir %s must be an absolute path." vardir)))
+             (trs "Vardir {0} must be an absolute path." vardir)))
 
      (not (.exists vardir))
      (throw (java.io.FileNotFoundException.
-             (format "Vardir %s does not exist. Please create it and ensure it is writable." vardir)))
+             (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.
-             (format "Vardir %s is not a directory." vardir)))
+             (trs "Vardir {0} is not a directory." vardir)))
 
      (not (.canWrite vardir))
      (throw (java.io.FileNotFoundException.
-             (format "Vardir %s is not writable." vardir)))
+             (trs "Vardir {0} is not writable." vardir)))
 
      :else
      config)))

  [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]

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

(defn configure-globals
