Class: PhraseApp::RequestParams::LocaleParams

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

Overview

LocaleParams

Parameters:

code

Locale ISO code

default

Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.

main

Indicates whether locale is a main locale. Main locales are part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Verification System</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

name

Locale name

rtl

Indicates whether locale is a RTL (Right-to-Left) locale.

source_locale_id

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

unverify_new_translations

Indicates that new translations for this locale should be marked as unverified. Part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Advanced Workflows</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

unverify_updated_translations

Indicates that updated translations for this locale should be marked as unverified. Part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Advanced Workflows</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

Instance Method Summary collapse

Instance Method Details

#code=(val) ⇒ Object



807
808
809
# File 'lib/phraseapp-ruby.rb', line 807

def code=(val)
  super(val)
end

#default=(val) ⇒ Object



811
812
813
814
815
816
817
818
819
# File 'lib/phraseapp-ruby.rb', line 811

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

#main=(val) ⇒ Object



821
822
823
824
825
826
827
828
829
# File 'lib/phraseapp-ruby.rb', line 821

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

#name=(val) ⇒ Object



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

def name=(val)
  super(val)
end

#rtl=(val) ⇒ Object



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

def rtl=(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



845
846
847
# File 'lib/phraseapp-ruby.rb', line 845

def source_locale_id=(val)
  super(val)
end

#unverify_new_translations=(val) ⇒ Object



849
850
851
852
853
854
855
856
857
# File 'lib/phraseapp-ruby.rb', line 849

def unverify_new_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

#unverify_updated_translations=(val) ⇒ Object



859
860
861
862
863
864
865
866
867
# File 'lib/phraseapp-ruby.rb', line 859

def unverify_updated_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

#validateObject



869
870
871
872
873
874
875
876
877
# File 'lib/phraseapp-ruby.rb', line 869

def validate
  
  if code == nil || code == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"code\" of \"LocaleParams\" not set")
  end
  if name == nil || name == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"LocaleParams\" not set")
  end
end