#------------------------------------------------------------------------#
# Copyright 2013; 3D-AlbertSoft
#
#------------------------------------------------------------------------#
# Date           23/03/2013
# Email          3dalbertsoft@gmail.com
#------------------------------------------------------------------------#

module TraducirHelix
  def self.defecto
     default = []
     default[0] = 'Helix along curve'
     default[1] = 'Radius 1'
     default[2] = 'Radius 2'
     default[3] = 'Laps'
     default[4] = 'Sections per lap'
     default[5] = 'Phase (degrees)'
     default[6] = 'Noise (between 0...1)'
     default[7] = 'Adherence to the curve'
     default[8] = 'Calculation mode'
     default[9] = 'Direction of rotation'
     default[10] = 'Left'
     default[11] = 'Right'
     default[12] = 'Create tube'
     default[13] = 'Yes'
     default[14] = 'No'
     default[15] = 'Tube Radius'
     default[16] = 'Sides of the tube'
     default[17] = 'Recommended'
     default[18] = 'Please first select a curve'
     default[19] = 'PROCESSING'
     default[20] = 'DONE'
     default[21] = 'To avoid accidents, the maximum allowed value '+
                   'for the radius of the tube in this curve is'
     default[22] = 'Tip: Reducing the number of Sections per lap o'+
                   'r increase the value of radius 1 and radius 2,'+
                   ' or better yet; construct a smooth curve. It c'+
                   'an also help, eliminate sharp corners of your '+
                   'current curve.'
     default[23] = 'To avoid accidents, the maximum allowed for th'+
                   'e number of sides of the tube in this particul'+
                   'ar case is'
     default[24] = 'Tip: Increase the radius of the tube.'
     default[25] = 'Unable to create a tube for this curve with th'+
                   'e values entered.'
     default[26] = 'Tip: Take a curve bigger and softer than the c'+
                   'urrent curve.'
     return default             
  end
  def self.hallar_traduccion
     directorio = File.dirname(__FILE__)
     lengua = Sketchup.get_locale.upcase
     ruta = directorio+"/idioms/"+"helix-"+lengua+".lang"
     if File.exist?(ruta) && FileTest.exist?(ruta)
        traduc = []; tx = []
        texto = IO.readlines(ruta)
        for i in 0..texto.size-1
           tx = texto[i].split("<==>")
           traduc[i] = tx[1].chomp
        end
        return traduc
     else
        defaul = self.defecto
        return defaul
     end
  end
end
