Class: PhraseApp::RequestParams::TranslationOrderParams

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/phraseapp-ruby.rb

Overview

TranslationOrderParams

Parameters:

category

Category to use (required for orders processed by TextMaster). <a href=“#categories”>Category List</a>

include_untranslated_keys

Order translations for keys with untranslated content in the selected target locales.

include_unverified_translations

Order translations for keys with unverified content in the selected target locales.

lsp

Name of the LSP that should process this order. Can be one of gengo, textmaster.

message

Message that is displayed to the translators for description.

priority

Indicates whether the priority option should be ordered which decreases turnaround time by 30%. Available only for orders processed by TextMaster.

quality

Extra proofreading option to ensure consistency in vocabulary and style. Only available for orders processed by TextMaster.

source_locale_id

Source locale for the order. Can be the name or public id of the source locale. Preferred is the public id.

styleguide_id

Style guide for translators to be sent with the order.

tag

Tag you want to order translations for.

target_locale_ids

List of target locales you want the source content translate to. Can be the name or public id of the target locales. Preferred is the public id.

translation_type

Name of the quality level, availability depends on the LSP. Can be one of: standard, pro (for orders processed by Gengo) and one of regular, premium, enterprise (for orders processed by TextMaster)

unverify_translations_upon_delivery

Unverify translations upon delivery.

Instance Method Summary collapse

Instance Method Details

#category=(val) ⇒ Object



802
803
804
# File 'lib/phraseapp-ruby.rb', line 802

def category=(val)
  super(val)
end

#include_untranslated_keys=(val) ⇒ Object



806
807
808
809
810
811
812
813
814
# File 'lib/phraseapp-ruby.rb', line 806

def include_untranslated_keys=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#include_unverified_translations=(val) ⇒ Object



816
817
818
819
820
821
822
823
824
# File 'lib/phraseapp-ruby.rb', line 816

def include_unverified_translations=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#lsp=(val) ⇒ Object



826
827
828
# File 'lib/phraseapp-ruby.rb', line 826

def lsp=(val)
  super(val)
end

#message=(val) ⇒ Object



830
831
832
# File 'lib/phraseapp-ruby.rb', line 830

def message=(val)
  super(val)
end

#priority=(val) ⇒ Object



834
835
836
837
838
839
840
841
842
# File 'lib/phraseapp-ruby.rb', line 834

def priority=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#quality=(val) ⇒ Object



844
845
846
847
848
849
850
851
852
# File 'lib/phraseapp-ruby.rb', line 844

def quality=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#source_locale_id=(val) ⇒ Object



854
855
856
# File 'lib/phraseapp-ruby.rb', line 854

def source_locale_id=(val)
  super(val)
end

#styleguide_id=(val) ⇒ Object



858
859
860
# File 'lib/phraseapp-ruby.rb', line 858

def styleguide_id=(val)
  super(val)
end

#tag=(val) ⇒ Object



862
863
864
# File 'lib/phraseapp-ruby.rb', line 862

def tag=(val)
  super(val)
end

#target_locale_ids=(val) ⇒ Object



866
867
868
# File 'lib/phraseapp-ruby.rb', line 866

def target_locale_ids=(val)
  super(val.split(','))
end

#translation_type=(val) ⇒ Object



870
871
872
# File 'lib/phraseapp-ruby.rb', line 870

def translation_type=(val)
  super(val)
end

#unverify_translations_upon_delivery=(val) ⇒ Object



874
875
876
877
878
879
880
881
882
# File 'lib/phraseapp-ruby.rb', line 874

def unverify_translations_upon_delivery=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#validateObject



884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
# File 'lib/phraseapp-ruby.rb', line 884

def validate
  
  if category == nil || category == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"category\" of \"TranslationOrderParams\" not set")
  end
  if lsp == nil || lsp == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"lsp\" of \"TranslationOrderParams\" not set")
  end
  if source_locale_id == nil
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"source_locale_id\" of \"TranslationOrderParams\" not set")
  end
  if target_locale_ids == nil
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"target_locale_ids\" of \"TranslationOrderParams\" not set")
  end
  if translation_type == nil || translation_type == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"translation_type\" of \"TranslationOrderParams\" not set")
  end
end