text: /*
   * Copyright 2016 resin.io
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
   *
   *    http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an "AS IS" BASIS,
   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   * See the License for the specific language governing permissions and
   * limitations under the License.
   */
  
  'use strict';
  
  const _ = require('lodash');
  
  /**
   * @summary Application messages
   * @namespace messages
   * @public
   */
  module.exports = {
  
    /**
     * @summary Informational messages
     * @namespace info
     * @memberof messages
     */
    info: {
  
      flashComplete: _.template('Your flash is complete!')
  
    },
  
    /**
     * @summary Warning messages
     * @namespace warning
     * @memberof messages
     */
    warning: {
  
      unrecommendedDriveSize: _.template([
        'This image recommends a <%= image.recommendedDriveSize %>',
        'bytes drive, however <%= drive.device %> is only <%= drive.size %> bytes.'
      ].join(' ')),
  
      exitWhileFlashing: _.template([
        'You are currently flashing a drive.',
        'Closing Pilotetcher may leave your drive in an unusable state.'
      ].join(' ')),
  
      looksLikeWindowsImage: _.template([
        'It looks like you are trying to burn a Windows image.\n\n',
        'Unlike other images, Windows images require special processing to be made bootable.',
        'We suggest you use a tool specially designed for this purpose, such as',
        '<a href="https://rufus.akeo.ie">Rufus</a>.'
      ].join(' '))
  
    },
  
    /**
     * @summary Error messages
     * @namespace error
     * @memberof messages
     */
    error: {
  
      notEnoughSpaceInDrive: _.template([
        'Not enough space on the drive.',
        'Please insert larger one and try again.'
      ].join(' ')),
  
      downloadTimeout: _.template([
        'Connection has being interrupted.',
        'Please check your network connection and try again.'
      ].join(' ')),
  
      checksumFail: _.template([
        'Image corrupted',
        'Please download your image again.'
      ].join(' ')),
  
      notEnoughDownloadSpace: _.template([
        'Not enough space on download directory.',
        'Please squeeze some space for image downloading.'
      ].join(' ')),
  
      unmount: _.template([
        'Failed to unmount.',
        'Failed to unmount the drive.'
      ].join(' ')),
  
      genericFlashError: _.template('Oops, seems something went wrong.'),
  
      validation: _.template([
        'The write has been completed successfully but Pilotetcher Installer detected potential',
        'corruption issues when reading the image back from the drive.',
        '\n\nPlease consider writing the image to a different drive.'
      ].join(' ')),
  
      invalidImage: _.template('<%= image.path %> is not a supported image type.'),
  
      elevationRequired: _.template('This should should be run with root/administrator permissions.'),
  
      flashFailure: _.template('Looks like your flash has failed!')
  
    }
  
  };
  